out.write("<!-- [oldFunctions.jsp] End -->\r\n\r\n");
out.write("\r\n");
out.write("<!-- [oldDeclarations.jsp] Start -->\r\n\r\n");
GenericValue userLogin = (GenericValue)session.getAttribute("_USER_LOGIN_");
out.write("\r\n");
UserInfo userInfo = (UserInfo) session.getAttribute("userInfo");
out.write("\r\n\r\n");
String partyId = "";
if (userLogin != null )
partyId = userLogin.getString("partyId");
out.write("\r\n\r\n");
DecimalFormat decimalFormat = new DecimalFormat("#,###.##");
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("MM/dd/yyyy");
SimpleDateFormat simpleTimeFormat = new SimpleDateFormat("K:mm a");
out.write("\r\n\r\n");
String controlPath=(String)request.getAttribute("_CONTROL_PATH_");
out.write("\r\n");
String contextRoot=(String)request.getAttribute("_CONTEXT_ROOT_");
out.write("\r\n\r\n");
String pageName = UtilFormatOut.checkNull((String)pageContext.getAttribute("PageName"));
out.write("\r\n\r\n");
String companyName = UtilProperties.getPropertyValue(contextRoot + "/WEB-INF/sfa.properties", "company.name");
out.write("\r\n");
String companySubtitle = UtilProperties.getPropertyValue(contextRoot + "/WEB-INF/sfa.properties", "company.subtitle");
out.write("\r\n");
String headerImageUrl = UtilProperties.getPropertyValue(contextRoot + "/WEB-INF/sfa.properties", "header.image.url");
out.write("\r\n\r\n");
String headerBoxBorderColor = UtilProperties.getPropertyValue(contextRoot + "/WEB-INF/sfa.properties", "header.box.border.color", "black");
out.write("\r\n");
String headerBoxBorderWidth = UtilProperties.getPropertyValue(contextRoot + "/WEB-INF/sfa.properties", "header.box.border.width", "1");
out.write("\r\n");
String headerBoxTopColor = UtilProperties.getPropertyValue(contextRoot + "/WEB-INF/sfa.properties", "header.box.top.color", "#336699");
out.write("\r\n");
String headerBoxBottomColor = UtilProperties.getPropertyValue(contextRoot + "/WEB-INF/sfa.properties", "header.box.bottom.color", "#cccc99");
out.write("\r\n");
String headerBoxBottomColorAlt = UtilProperties.getPropertyValue(contextRoot + "/WEB-INF/sfa.properties", "header.box.bottom.alt.color", "#eeeecc");
out.write("\r\n");
String headerBoxTopPadding = UtilProperties.getPropertyValue(contextRoot + "/WEB-INF/sfa.properties", "header.box.top.padding", "4");
out.write("\r\n");
String headerBoxBottomPadding = UtilProperties.getPropertyValue(contextRoot + "/WEB-INF/sfa.properties", "header.box.bottom.padding", "2");
out.write("\r\n\r\n");
String boxBorderColor = UtilProperties.getPropertyValue(contextRoot + "/WEB-INF/sfa.properties", "box.border.color", "black");
out.write("\r\n");
String boxBorderWidth = UtilProperties.getPropertyValue(contextRoot + "/WEB-INF/sfa.properties", "box.border.width", "1");
out.write("\r\n");
String boxTopColor = UtilProperties.getPropertyValue(contextRoot + "/WEB-INF/sfa.properties", "box.top.color", "#336699");
out.write("\r\n");
String boxBottomColor = UtilProperties.getPropertyValue(contextRoot + "/WEB-INF/sfa.properties", "box.bottom.color", "white");
out.write("\r\n");
String boxBottomColorAlt = UtilProperties.getPropertyValue(contextRoot + "/WEB-INF/sfa.properties", "box.bottom.alt.color", "white");
out.write("\r\n");
String boxTopPadding = UtilProperties.getPropertyValue(contextRoot + "/WEB-INF/sfa.properties", "box.top.padding", "4");
out.write("\r\n");
String boxBottomPadding = UtilProperties.getPropertyValue(contextRoot + "/WEB-INF/sfa.properties", "box.bottom.padding", "4");
out.write("\r\n");
String userStyleSheet = "/sfa/includes/maincss.css";
out.write("\r\n");
String alphabet[]={"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "*"};
out.write("\r\n\r\n");
out.write("<!-- [oldDeclarations.jsp] End -->\r\n\r\n");
out.write("\r\n\r\n");
out.write("<HTML>\r\n");
out.write("<HEAD>\r\n\r\n");
String clientRequest = (String)session.getAttribute("_CLIENT_REQUEST_");
//out.write("Client request: " + clientRequest + "<BR>");
String hostName = "";
if (clientRequest!=null && clientRequest.indexOf("//") > 0) {
int startPos = clientRequest.indexOf("//") + 2;
int endPos = clientRequest.indexOf(":", startPos);
if ( endPos < startPos )
endPos = clientRequest.indexOf("/", startPos);
if ( endPos < startPos )
hostName = clientRequest.substring(startPos);
else
hostName = clientRequest.substring(startPos, endPos);
} else {
hostName = "";
}
//out.write("Host name: " + hostName + "<BR>");
out.write("\r\n\r\n");
out.write("<title>");
out.print(hostName);
out.write(" - Sales Force Automation - ");
out.print(companyName);
out.write("</title>\r\n\r\n");
out.write("\r\n");
out.write("<!-- [userStyle.jsp] Start -->\r\n\r\n");
//------------ Get the style sheet
String styleSheetId = null;
ModelEntity entityStyleUser = delegator.getModelEntity("UiUserTemplate");
HashMap hashMapStyleUser = new HashMap();
if ( userLogin != null ) {
String ulogin = userLogin.getString("userLoginId");
hashMapStyleUser.put("userLoginId", ulogin);
} else {
hashMapStyleUser.put("userLoginId", "Default");
}
GenericPK stylePk = new GenericPK(entityStyleUser, hashMapStyleUser);
GenericValue userTemplate = delegator.findByPrimaryKey(stylePk);
if ( userTemplate != null ) {
styleSheetId = userTemplate.getString("styleSheetId");
}
if (styleSheetId == null){
hashMapStyleUser.put("userLoginId", "Default");
stylePk = new GenericPK(entityStyleUser, hashMapStyleUser);
userTemplate = delegator.findByPrimaryKey(stylePk);
if ( userTemplate != null ) {
styleSheetId = userTemplate.getString("styleSheetId");
}
}
if (styleSheetId != null){
ModelEntity entityStyle = delegator.getModelEntity("UiStyleTemplate");
HashMap hashMapStyle = new HashMap();
hashMapStyle.put("styleSheetId", styleSheetId);
stylePk = new GenericPK(entityStyle, hashMapStyle);
GenericValue styleTemplate = delegator.findByPrimaryKey(stylePk);
userStyleSheet = styleTemplate.getString("styleSheetLoc");
if ( userStyleSheet == null ){
userStyleSheet = "/sfa/includes/maincss.css";
}
}
out.write("\r\n");
out.write("<link rel=\"stylesheet\" href=\"");
out.print(userStyleSheet);
out.write("\" type=\"text/css\">\r\n\r\n");
out.write("<!-- [userStyle.jsp] End -->\r\n\r\n");
out.write("\r\n");
out.write("<LINK rel=\"stylesheet\" type=\"text/css\" href=\"/sfa/css/gridstyles.css\">\r\n");
out.write("<script language=\"JavaScript\" >\r\n\r\n function sendDropDown(elementName, idName, fieldName, findClass, paramName, paramValue, frm, action)\r\n {\r\n var sUrl = '");
if (_jspx_meth_ofbiz_url_0(pageContext))
return;
out.write("?findMode=filter&fieldName=' +\r\n\t\t\tfieldName + '&idName=' + idName + '¶m_' + paramName + '=' + paramValue +\r\n\t\t\t'&formName=' + frm.name + '&elementName=' + elementName + '&findClass=' + findClass + '&action=' + action;\r\n document.anchors('searchA').href=sUrl;\r\n document.anchors('searchA').click();\r\n }\r\n\r\n\r\n function sendData(ele, frm, action){\r\n if(ele.tagName != 'SELECT'){\r\n if(ele.value.length > 0){\r\n entity = ele.getAttribute(\"entityName\");\r\n field = ele.getAttribute(\"fieldName\");\r\n idName = ele.getAttribute(\"idName\");\r\n findClass = ele.getAttribute(\"findClass\");\r\n findValue = ele.value;\r\n elementName = ele.name;\r\n var sUrl = '");
if (_jspx_meth_ofbiz_url_1(pageContext))
return;
out.write("?entityName=' + entity + '&fieldName=' +\r\n\t\t\tfield + '&idName=' + idName + '&findByLikeValue=' + findValue + '&formName=' + frm.name +\r\n\t\t\t'&elementName=' + elementName + '&findClass=' + findClass + '&action=' + action;\r\n document.anchors('searchA').href=sUrl;\r\n document.anchors('searchA').click();\r\n } else {\r\n //alert('Enter search criteria to find a value.');\r\n //frm.item(ele.name).value = 'Enter search criteria.';\r\n }\r\n }\r\n }\r\n\r\n function updateForm(){\r\n var innDoc = document.frames('searchIFrame').document;\r\n var innHtml = innDoc.body.innerHTML;\r\n if(innHtml.length > 0){\r\n var sDiv = innDoc.all('searchResultDiv');\r\n if(sDiv != null){\r\n var formName = sDiv.getAttribute(\"formName\");\r\n var fieldName = sDiv.getAttribute(\"fieldName\");\r\n var elementName = sDiv.getAttribute(\"elementName\");\r\n var findClass = sDiv.getAttribute(\"findClass\");\r\n var findMode = sDiv.getAttribute(\"findMode\");\r\n var showMultiple = sDiv.getAttribute(\"showMultiple\");\r\n");
out.write(" var nde = innDoc.all(elementName);\r\n var existingNode = document.all(elementName);\r\n if(nde != null){\r\n var frm = document.forms(formName);\r\n if(nde.tagName == 'SELECT'){\r\n var opts = nde.children.tags('OPTION');\r\n if ( findMode == 'filter')\r\n {\r\n\t\t\t\tvar oldOpts = existingNode.children.tags('OPTION');\r\n//\t\t\t\talert('oldOpts.length = ' + oldOpts.length);\r\n//\t\t\t\talert('opts.length = ' + opts.length);\r\n\t\t\t\tvar numOpt = existingNode.options.length;\r\n//\t\t\t\talert('numOpt = ' + numOpt);\r\n\t\t\t\tfor (var i=0; i");
out.write("<numOpt;i++)\r\n\t\t\t\t\texistingNode.options.remove(numOpt - 1 - i);\r\n\t\t\t\tfor (var i=0; i");
out.write("<opts.length;i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tvar opt = document.createElement(\"option\");\r\n\t\t\t\t\topt.setAttribute(\"value\", opts(i).value);\r\n\t\t\t\t\topt.innerText = opts(i).innerText;\r\n\t\t\t\t\texistingNode.appendChild(opt);\r\n\t\t\t\t}\r\n }\r\n else if(opts.length");
out.write("<=0){\r\n //alert('No results were found. Please try another search.');\r\n existingNode.focus();\r\n } else {\r\n var ele = document.createElement(nde.tagName);\r\n ele.id = nde.name;\r\n ele.name = nde.name;\r\n ele.setAttribute(\"className\", existingNode.getAttribute(\"className\"));\r\n\t\t\t ele.setAttribute(\"entityName\", sDiv.getAttribute(\"entityName\"));\r\n ele.setAttribute(\"fieldName\", sDiv.getAttribute(\"fieldName\"));\r\n ele.setAttribute(\"elementName\", sDiv.getAttribute(\"elementName\"));\r\n ele.setAttribute(\"idName\", sDiv.getAttribute(\"idName\"));\r\n ele.setAttribute(\"findClass\", sDiv.getAttribute(\"findClass\"));\r\n if (showMultiple == \"true\") ele.multiple = true;\r\n ele.tabIndex = existingNode.tabIndex;\r\n ele.attachEvent(\"onchange\", searchAgain);\r\n for(var i=0;i");
out.write("<opts.length;i++){\r\n var opt = document.createElement(\"option\");\r\n opt.setAttribute(\"value\", opts(i).value);\r\n opt.innerText = opts(i).innerText;\r\n ele.appendChild(opt);\r\n }\r\n var opt = document.createElement(\"option\");\r\n opt.setAttribute(\"value\", \"search again\");\r\n opt.innerText = \"Search again...\";\r\n ele.appendChild(opt);\r\n var sRepNde = elementName + 'Holder';\r\n var repNde = document.all(sRepNde);\r\n repNde.replaceChild(ele, existingNode);\r\n ele.focus();\r\n\t ele.fireEvent(\"onchange\");\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n function searchAgain(sel, frm){\r\n if(sel.tagName == 'SELECT'){\r\n var fieldName = sel.getAttribute('fieldName');\r\n var findClass = sel.getAttribute('findClass');\r\n var elementName = sel.name;\r\n var formName = frm.name;\r\n var existingNode = document.all(elementName);\r\n");
out.write(" if(sel.value == 'search again'){\r\n var ele = document.createElement(\"INPUT\");\r\n ele.id = sel.name;\r\n ele.name = sel.name;\r\n ele.type = \"TEXT\";\r\n ele.setAttribute(\"className\", existingNode.getAttribute(\"className\"));\r\n ele.setAttribute(\"entityName\", sel.getAttribute(\"entityName\"));\r\n ele.setAttribute(\"fieldName\", fieldName);\r\n ele.setAttribute(\"elementName\", elementName);\r\n ele.setAttribute(\"idName\", sel.getAttribute(\"idName\"));\r\n ele.setAttribute(\"findClass\", findClass);\r\n ele.tabIndex = sel.tabIndex;\r\n var sRepNde = elementName + 'Holder';\r\n var repNde = document.all(sRepNde);\r\n repNde.replaceChild(ele, existingNode);\r\n ele.focus();\r\n }\r\n }\r\n }\r\n\r\n // currently only used by accountPopup to force activity_accountId to be a select field\r\n function forceSearchAgain(sel, frm){\r\n if(sel.tagName == 'SELECT'){\r\n var fieldName = sel.getAttribute('fieldName');\r\n var findClass = sel.getAttribute('findClass');\r\n");
out.write(" var elementName = sel.name;\r\n var formName = frm.name;\r\n var existingNode = document.all(elementName);\r\n\t var ele = document.createElement(\"INPUT\");\r\n\t ele.id = sel.name;\r\n\t ele.name = sel.name;\r\n\t ele.type = \"TEXT\";\r\n\t ele.setAttribute(\"className\", existingNode.getAttribute(\"className\"));\r\n\t ele.setAttribute(\"entityName\", sel.getAttribute(\"entityName\"));\r\n\t ele.setAttribute(\"fieldName\", fieldName);\r\n\t ele.setAttribute(\"elementName\", elementName);\r\n\t ele.setAttribute(\"idName\", sel.getAttribute(\"idName\"));\r\n\t ele.setAttribute(\"findClass\", findClass);\r\n\t ele.tabIndex = sel.tabIndex;\r\n\t var sRepNde = elementName + 'Holder';\r\n\t var repNde = document.all(sRepNde);\r\n\t repNde.replaceChild(ele, existingNode);\r\n }\r\n }\r\n\r\nvar currentCol = 0;\r\nvar previousCol = -1;\r\nvar reverse = false;\r\n\r\n function CompareAlpha(a, b) {\r\n if (a[currentCol] ");
out.write("< b[currentCol]) { return -1; }\r\n if (a[currentCol] > b[currentCol]) { return 1; }\r\n return 0;\r\n }\r\n\r\n function CompareAlphaIgnore(a, b) {\r\n strA = a[currentCol].toLowerCase();\r\n strB = b[currentCol].toLowerCase();\r\n if (strA ");
out.write("< strB) { return -1;\r\n } else {\r\n if (strA > strB) { return 1;\r\n } else { return 0;\r\n }\r\n }\r\n }\r\n\r\n function CompareDate(a, b) {\r\n datA = new Date(a[currentCol]);\r\n datB = new Date(b[currentCol]);\r\n if (datA ");
out.write("< datB) { return -1;\r\n } else {\r\n if (datA > datB) { return 1;\r\n } else { return 0;\r\n }\r\n }\r\n }\r\n\r\n function CompareDateEuro(a, b) {\r\n strA = a[currentCol].split(\".\");\r\n strB = b[currentCol].split(\".\");\r\n datA = new Date(strA[2], strA[1], strA[0]);\r\n datB = new Date(strB[2], strB[1], strB[0]);\r\n if (datA ");
out.write("< datB) { return -1;\r\n } else {\r\n if (datA > datB) { return 1;\r\n } else { return 0;\r\n }\r\n }\r\n }\r\n\r\n function CompareNumeric(a, b) {\r\n numA = a[currentCol];\r\n numB = b[currentCol];\r\n if (isNaN(numA)) { return 0;\r\n } else {\r\n if (isNaN(numB)) { return 0;\r\n } else { return numA - numB;\r\n }\r\n }\r\n }\r\n\r\nfunction TableSort(myTable, myCol, myType) {\r\n\r\n var mySource = document.all(myTable);\r\n var myRows = mySource.rows.length;\r\n var myCols = mySource.rows(0).cells.length;\r\n currentCol = myCol\r\n\r\n var theadrow = mySource.parentElement.tHead;\r\n var imgcol= theadrow.all('srtImg');\r\n for(var x = 0; x ");
out.write("< imgcol.length; x++){\r\n imgcol[x].src = \"dude07232001blank.gif\";\r\n imgcol[x].alt = \"sort\";\r\n }\r\n\r\n if(previousCol == myCol){\r\n if(reverse == false){\r\n imgcol[myCol-1].src = \"dude07232001down.gif\";\r\n reverse = true;\r\n } else {\r\n imgcol[myCol-1].src = \"dude07232001up.gif\";\r\n reverse = false;\r\n }\r\n } else {\r\n reverse = false;\r\n imgcol[myCol-1].src = \"dude07232001up.gif\";\r\n }\r\n\r\n myArray = new Array(myRows)\r\n for (i=0; i ");
out.write("< myRows; i++) {\r\n myArray[i] = new Array(myCols)\r\n for (j=0; j ");
out.write("< myCols; j++) {\r\n myArray[i][j] = document.all(myTable).rows(i).cells(j).innerHTML;\r\n }\r\n }\r\n\r\n if (myCol == previousCol) {\r\n myArray.reverse();\r\n } else {\r\n switch (myType) {\r\n case \"a\":\r\n myArray.sort(CompareAlpha);\r\n break;\r\n case \"ai\":\r\n myArray.sort(CompareAlphaIgnore);\r\n break;\r\n case \"d\":\r\n myArray.sort(CompareDate);\r\n break;\r\n case \"de\":\r\n myArray.sort(CompareDateEuro);\r\n break;\r\n case \"n\":\r\n myArray.sort(CompareNumeric);\r\n break;\r\n default:\r\n myArray.sort();\r\n }\r\n }\r\n\r\n\r\n // Re-write the table contents\r\n for (i=0; i ");
out.write("< myRows; i++) {\r\n for (j=0; j ");
out.write("< myCols; j++) {\r\n mySource.rows(i).cells(j).innerHTML = myArray[i][j];\r\n }\r\n }\r\n\r\n previousCol = myCol;\r\n highlightSelectedRow();\r\n return 0;\r\n\r\n}\r\n\r\n function fixSize() {\r\n // The body represents the outer-most frameset for frameset documents.\r\n if ( parent.name == \"content\" )\r\n {\r\n\t maxH = parent.document.body.clientHeight - 150;\r\n\t topH = document.body.scrollHeight + 10;\r\n\t if ( topH > maxH )\r\n\t \ttopH = maxH;\r\n\t \t\r\n\t parent.document.body.rows = topH + \", *\"\r\n\t //window.frames.headerFrame.document.body.rows = window.frames.headerFrame.document.body.scrollHeight + \", *\" \r\n\t // Walk into the header frame and get the scrollHeight - \r\n\t // this represents the height of the contents in pixels. \r\n\t }\r\n }\r\n");
out.write("</script>\r\n\r\n\r\n");
out.write("\r\n\r\n");
out.write("</HEAD>\r\n\r\n");
out.write("<BASE TARGET=\"content\">\r\n");
out.write("<!--");
out.write("<BODY CLASS=\"bodyform\" onbeforeunload=\"verifyClose()\">-->\r\n");
out.write("<BODY CLASS=\"bodyform\"\">\r\n\r\n");
out.write("\r\n");
out.write("<!-- onBeforeUnload.jsp - Start -->\r\n\r\n");
out.write("<SCRIPT LANGUAGE=\"JScript\" TYPE=\"text/javascript\" FOR=window EVENT=onbeforeunload>\r\n return doOnBeforeUnload();\r\n");
out.write("</SCRIPT>\r\n\r\n");
out.write("<SCRIPT LANGUAGE=\"JScript\" TYPE=\"text/javascript\">\r\n\r\n // Create variable we can change to prevent the check from being done.\r\n var checkForChanges = true;\r\n \r\n function doOnBeforeUnload() {\r\n // This script fires when anything is about to cause the current page to be unloaded.\r\n // If any unsaved changes have been made, this script returns a non-empty string, which\r\n // causes a response window to warn the user that changes will be lost, and to allow\r\n // them to cancel.\r\n \r\n // In free form, tabular, and select screen sections built by the UI builder,\r\n // the preSubmit method fired by the onSubmit event of the form removes this script from\r\n // the onBeforeUnload event, which prevents this check from happening if the Save button\r\n // was just clicked.\r\n \r\n // alert(\"event.fromElement: \" + event.fromElement);\r\n \r\n // See if the checkForChanges flag has been cleared. If so, just allow the\r\n // body unload to continue.\r\n if (!checkForChanges) return;\r\n \r\n // Look at all forms on the page to see if any of them have any changes.\r\n");
out.write(" var vFormC = document.forms;\r\n for (var vFormNbr = 0; vFormNbr ");
out.write("< vFormC.length; vFormNbr++) {\r\n //alert(\"[verifyClose] Window name: \" + window.name);\r\n //alert(\"[verifyClose] Checking form #\" + vFormNbr);\r\n var vFormObj = vFormC.item(vFormNbr);\r\n //alert(\"[verifyClose] Form name is \" + vFormObj.name);\r\n \r\n // Check the action. If it's query or view mode, don't bother checking this form.\r\n var vActionObj = vFormObj.elements.item(\"action\");\r\n if (vActionObj != null) {\r\n var vAction = vActionObj.value;\r\n if (vAction!=null) {\r\n //alert(\"Action: \" + vAction);\r\n if (vAction==\"");
out.print(UIScreenSection.ACTION_INSERT);
out.write("\" ||\r\n vAction==\"");
out.print(UIScreenSection.ACTION_UPDATE);
out.write("\" ||\r\n vAction==\"");
out.print(UIScreenSection.ACTION_UPDATE_SELECT);
out.write("\") {\r\n \r\n // This is an updateable form in an updateable mode. Check for changes.\r\n \r\n // Look through all the objects in the form to see if there are any unsaved changes.\r\n var vElemC = vFormObj.elements;\r\n for (var vElemNbr = 0; vElemNbr ");
out.write("< vElemC.length; vElemNbr++) {\r\n var vElemObj = vElemC.item(vElemNbr);\r\n \r\n // Find out if this is the \"add\" or \"delete\" select object that appears on a \"select\" type screen section.\r\n //alert(\"[window.onbeforeunload] Object name: \" + vElemObj.name);\r\n if (vElemObj.name.indexOf(\"DBSel\")>=0) {\r\n // This is the add or delete select object. See if there are any items in it. If so, it means\r\n // the user has made changes.\r\n if (vElemObj.length > 0) {\r\n // Changes have been made. Trigger the response window.\r\n return \"IF YOU CLICK OK, YOUR CHANGES WILL BE LOST.\";\r\n } else {\r\n // No changes in this add or delete select object.\r\n }\r\n } else {\r\n // Object is not the add or delete select object.\");\r\n // See if this element is an original value field.\r\n var vOrigPrefix = \"");
out.print(UIWebUtility.HTML_NAME_PREFIX_ORIGINAL);
out.write("\";\r\n if (vElemObj.name.indexOf(vOrigPrefix)==0) {\r\n // This is an original value field. Compare its value to the current value field.\r\n var vOrigElemObj = vElemObj;\r\n var vOrigElemName = vOrigElemObj.name;\r\n var vCurElemName = vOrigElemName.substring(vOrigPrefix.length, vOrigElemName.length);\r\n var vCurElemObj = vElemC.item(vCurElemName);\r\n var vCurElemTagName = vCurElemObj.tagName;\r\n var vCurElemType = vCurElemObj.type;\r\n if (vCurElemObj!=null) {\r\n // Got the current field. Compare the values.\r\n var vCurValue;\r\n if (vCurElemTagName==\"INPUT\" && vCurElemType==\"checkbox\") {\r\n // This is a check box. Use special processing to get current value.\r\n vCurValue = vCurElemObj.checked ? \"Y\" : \"N\";\r\n } else {\r\n // Not a check box.\r\n vCurValue = vCurElemObj.value;\r\n }\r\n var vOrigValue = vOrigElemObj.value;\r\n if (vCurValue != vOrigValue) {\r\n // This field was changed. Trigger the response window.\r\n");
out.write(" // alert('Field ' + vCurElemName + ' changed.');\r\n // alert('Original Value: ' + vOrigValue);\r\n // alert('Current Value: ' + vCurValue);\r\n return \"IF YOU CLICK OK, YOUR CHANGES WILL BE LOST.\";\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n");
out.write("</SCRIPT>\r\n\r\n");
out.write("<!-- onBeforeUnload.jsp - End -->\r\n\r\n\r\n");
out.write("\r\n\r\n");
out.write("<script>\r\n// Title: Timestamp picker\r\n// Description: See the demo at url\r\n// URL: http://us.geocities.com/tspicker/\r\n// Script featured on: http://javascriptkit.com/script/script2/timestamp.shtml\r\n// Version: 1.0\r\n// Date: 12-05-2001 (mm-dd-yyyy)\r\n// Author: Denis Gritcyuk ");
out.write("<denis@softcomplex.com>; ");
out.write("<tspicker@yahoo.com>\r\n// Notes: Permission given to use this script in any kind of applications if\r\n// header lines are left unchanged. Feel free to contact the author\r\n// for feature requests and/or donations\r\n\r\nfunction setCalendarHasFocus(aFormObj, aHasFocus) {\r\n\t// Set hidden variable to show that a popup calendar is about to\r\n\t// be displayed. This variable will be tested in the onBeforeUnload\r\n\t// handling to avoid popping up a confimation prompt.\r\n\talert(\"setCalendarHasFocus start - \" + aHasFocus);\r\n\tvar vCalendarHasFocusObj = aFormObj.elements.item(\"calendarHasFocus\");\r\n\tif (vCalendarHasFocusObj == null) {\r\n\t\t//alert(\"Did not find calendarHasFocus hidden field\");\r\n\t} else {\r\n\t\t//alert(\"Found calendarHasFocus hidden field\");\r\n\t\tif (aHasFocus) {\r\n\t\t\t//alert(\"Setting calendarHasFocus to true\");\r\n\t\t\tvCalendarHasFocusObj.value = \"true\";\r\n\t\t} else {\r\n\t\t\t//alert(\"Setting calendarHasFocus to false\");\r\n\t\t\tvCalendarHasFocusObj.value = \"false\";\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n}\r\n\r\nfunction show_calendar(str_target, str_datetime, isDateTime) {\r\n");
out.write("//\talert(\"show_calendar start\");\r\n\tvar arr_months = [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\",\r\n\t\t\"July\", \"August\", \"September\", \"October\", \"November\", \"December\"];\r\n\tvar week_days = [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"];\r\n\tvar n_weekstart = 1; // day week starts from (normally 0 or 1)\r\n\r\n\tvar dt_datetime = (str_datetime == null || str_datetime ==\"\" ? new Date() : str2datetime(str_datetime) );\r\n\tvar dt_prev_month = new Date(dt_datetime);\r\n\tdt_prev_month.setMonth(dt_datetime.getMonth()-1);\r\n\tvar dt_next_month = new Date(dt_datetime);\r\n\tdt_next_month.setMonth(dt_datetime.getMonth()+1);\r\n\tvar dt_firstday = new Date(dt_datetime);\r\n\tdt_firstday.setDate(1);\r\n\tdt_firstday.setDate(1-(7+dt_firstday.getDay()-n_weekstart)%7);\r\n\tvar dt_lastday = new Date(dt_next_month);\r\n\tdt_lastday.setDate(0);\r\n\t\r\n\t// html generation (feel free to tune it for your particular application)\r\n\t// print calendar header\r\n\tvar str_buffer = new String (\r\n\t\t\"");
out.write("<html>\\n\"+\r\n\t\t\" ");
out.write("<head>\\n\"+\r\n\t\t\" ");
out.write("<title>Calendar");
out.write("</title>\\n\"+\r\n\t\t\" ");
out.write("</head>\\n\"+\r\n\t\t\" ");
out.write("<body bgcolor=\\\"White\\\">\\n\"+\r\n\t\t\" ");
out.write("<table class=\\\"clsOTable\\\" cellspacing=\\\"0\\\" border=\\\"0\\\" width=\\\"100%\\\">\\n\" +\r\n\t\t\" ");
out.write("<tr>\\n\" +\r\n\t\t\" ");
out.write("<td bgcolor=\\\"#4682B4\\\">\\n\" +\r\n\t\t\" ");
out.write("<table cellspacing=\\\"1\\\" cellpadding=\\\"3\\\" border=\\\"0\\\" width=\\\"100%\\\">\\n\" +\r\n\t\t\" ");
out.write("<tr>\\n\" +\r\n\t\t\" ");
out.write("<td bgcolor=\\\"#4682B4\\\">\\n\" +\r\n\t\t\" ");
out.write("<a href=\\\"javascript:window.opener.show_calendar('\"+\r\n\t\t str_target + \"', '\" + dt2dtstr(dt_prev_month)+\"'+' ' +document.cal.time.value);\\\">\" +\r\n\t\t\" ");
out.write("<img src=\\\"/sfaimages/prev.gif\\\" width=\\\"16\\\" height=\\\"16\\\" border=\\\"0\\\"\" +\r\n\t\t\" alt=\\\"previous month\\\">\\n\" +\r\n\t\t\" ");
out.write("</a>\\n\" +\r\n\t\t\" ");
out.write("</td>\\n\" +\r\n\t\t\" ");
out.write("<td bgcolor=\\\"#4682B4\\\" colspan=\\\"5\\\">\\n\" +\r\n\t\t\" ");
out.write("<font color=\\\"white\\\" face=\\\"tahoma, verdana\\\" size=\\\"2\\\">\\n\" +\r\n\t\t\" \" + arr_months[dt_datetime.getMonth()] + \" \" + dt_datetime.getFullYear() + \"\\n\" +\r\n\t\t\" ");
out.write("</font>\\n\" +\r\n\t\t\" ");
out.write("</td>\\n\" +\r\n\t\t\" ");
out.write("<td bgcolor=\\\"#4682B4\\\" align=\\\"right\\\">\\n\" +\r\n\t\t\" ");
out.write("<a href=\\\"javascript:window.opener.show_calendar('\" +\r\n\t\t str_target+\"', '\"+dt2dtstr(dt_next_month)+\"'+' ' +document.cal.time.value);\\\">\\n\" +\r\n\t\t\" ");
out.write("<img src=\\\"/sfaimages/next.gif\\\" width=\\\"16\\\" height=\\\"16\\\" border=\\\"0\\\"\" +\r\n\t\t\" alt=\\\"next month\\\">\\n\" +\r\n\t\t\" ");
out.write("</a>\\n\" +\r\n\t\t\" ");
out.write("</td>\\n\" +\r\n\t\t\" ");
out.write("</tr>\\n\"\r\n\t);\r\n\r\n\tvar dt_current_day = new Date(dt_firstday);\r\n\t// print weekdays titles\r\n\tstr_buffer += \" ");
out.write("<tr>\\n\";\r\n\tfor (var n=0; n");
out.write("<7; n++)\r\n\t\tstr_buffer += \" ");
out.write("<td bgcolor=\\\"#87CEFA\\\">\\n\" +\r\n\t\t\" ");
out.write("<font color=\\\"white\\\" face=\\\"tahoma, verdana\\\" size=\\\"2\\\">\\n\" +\r\n\t\t\" \" + week_days[(n_weekstart+n)%7] + \"\\n\" +\r\n\t\t\" ");
out.write("</font>");
out.write("</td>\\n\";\r\n\t// print calendar table\r\n\tstr_buffer += \" ");
out.write("</tr>\\n\";\r\n\twhile (dt_current_day.getMonth() == dt_datetime.getMonth() ||\r\n\t\tdt_current_day.getMonth() == dt_firstday.getMonth()) {\r\n\t\t// print row heder\r\n\t\tstr_buffer += \" ");
out.write("<tr>\\n\";\r\n\t\tfor (var n_current_wday=0; n_current_wday");
out.write("<7; n_current_wday++) {\r\n\t\t\t\tif (dt_current_day.getDate() == dt_datetime.getDate() &&\r\n\t\t\t\t\tdt_current_day.getMonth() == dt_datetime.getMonth())\r\n\t\t\t\t\t// print current date\r\n\t\t\t\t\tstr_buffer += \" ");
out.write("<td bgcolor=\\\"#FFB6C1\\\" align=\\\"right\\\">\\n\";\r\n\t\t\t\telse if (dt_current_day.getDay() == 0 || dt_current_day.getDay() == 6)\r\n\t\t\t\t\t// weekend days\r\n\t\t\t\t\tstr_buffer += \" ");
out.write("<td bgcolor=\\\"#DBEAF5\\\" align=\\\"right\\\">\\n\";\r\n\t\t\t\telse\r\n\t\t\t\t\t// print working days of current month\r\n\t\t\t\t\tstr_buffer += \" ");
out.write("<td bgcolor=\\\"white\\\" align=\\\"right\\\">\\n\";\r\n\r\n\t\t\t\tif (isDateTime == \"1\" )\r\n\t\t\t\t\tstr_buffer += \" ");
out.write("<a href=\\\"javascript:window.opener.\" + str_target +\r\n\t\t\t\t\t\t\".value='\"+dt2dtstr(dt_current_day)+\"'+' ' +document.cal.time.value;window.close();\\\">\\n\";\r\n\t\t\t\telse\r\n\t\t\t\t\tstr_buffer += \" ");
out.write("<a href=\\\"javascript:window.opener.\" + str_target +\r\n\t\t\t\t\t\t\".value='\"+dt2dtstr(dt_current_day)+\"';window.close();\\\">\\n\";\r\n\t\t\t\t\t\r\n\t\t\t\tif (dt_current_day.getMonth() == dt_datetime.getMonth())\r\n\t\t\t\t\t// print days of current month\r\n\t\t\t\t\tstr_buffer += \" ");
out.write("<font color=\\\"black\\\" face=\\\"tahoma, verdana\\\" size=\\\"2\\\">\\n\";\r\n\t\t\t\telse \r\n\t\t\t\t\t// print days of other months\r\n\t\t\t\t\tstr_buffer += \" ");
out.write("<font color=\\\"gray\\\" face=\\\"tahoma, verdana\\\" size=\\\"2\\\">\\n\";\r\n\t\t\t\t\t\r\n\t\t\t\tstr_buffer += \" \" + dt_current_day.getDate() + \"\\n\" +\r\n\t\t\t\t\" ");
out.write("</font>\\n\" +\r\n\t\t\t\t\" ");
out.write("</a>\\n\" +\r\n\t\t\t\t\" ");
out.write("</td>\\n\";\r\n\t\t\t\tdt_current_day.setDate(dt_current_day.getDate()+1);\r\n\t\t}\r\n\t\t// print row footer\r\n\t\tstr_buffer += \" ");
out.write("</tr>\\n\";\r\n\t}\r\n\t// print calendar footer\r\n\tstr_buffer +=\r\n\t\t\" ");
out.write("<form name=\\\"cal\\\">\\n\" +\r\n\t\t\" ");
out.write("<tr>\\n\" +\r\n\t\t\" ");
out.write("<td colspan=\\\"7\\\" bgcolor=\\\"#87CEFA\\\">\\n\" +\r\n\t\t\" ");
out.write("<font color=\\\"White\\\" face=\\\"tahoma, verdana\\\" size=\\\"2\\\">\\n\" +\r\n\t\t\" Time:\\n\" +\r\n\t\t\" ");
out.write("<input type=\\\"text\\\" name=\\\"time\\\" value=\\\"\" + dt2tmstr(dt_datetime) +\r\n\t\t\"\\\" size=\\\"8\\\" maxlength=\\\"8\\\">\\n\" +\r\n\t\t\" ");
out.write("</font>\\n\" +\r\n\t\t\" ");
out.write("</td>\\n\" +\r\n\t\t\" ");
out.write("</tr>\\n\" +\r\n\t\t\" ");
out.write("</form>\\n\" +\r\n\t\t\" ");
out.write("</table>\\n\" +\r\n\t\t\" ");
out.write("</tr>\\n\" +\r\n\t\t\" ");
out.write("</td>\\n\" +\r\n\t\t\" ");
out.write("</table>\\n\" +\r\n\t\t\" ");
out.write("</body>\\n\" +\r\n\t\t\"");
out.write("</html>\\n\";\r\n\r\n\t//alert(\"Fixin to open window\");\r\n\tvar vWinCal = window.open(\"\", \"Calendar\", \r\n\t\t\"width=200,height=250,status=no,resizable=yes,top=200,left=200\");\r\n\t//alert(\"Fixin to set window opener to self\");\r\n\tvWinCal.opener = self;\r\n\tvar calc_doc = vWinCal.document;\r\n\t//alert(\"Fixin to write str_buffer\");\r\n\tcalc_doc.write (str_buffer);\r\n\tcalc_doc.close();\r\n}\r\n// datetime parsing and formatting routimes. modify them if you wish other datetime format\r\nfunction str2datetime (str_datetime) {\r\n\tvar re_date = /^(\\d+)\\/(\\d+)\\/(\\d+)\\s+(\\d+)\\:(\\d+)\\:(\\d+)$/;\r\n\tif (!re_date.exec(str_datetime))\r\n\t\treturn str2date(str_datetime)\r\n\treturn (new Date (RegExp.$3, RegExp.$1-1, RegExp.$2, RegExp.$4, RegExp.$5, RegExp.$6));\r\n}\r\nfunction str2date (str_date) {\r\n\tvar re_date = /^(\\d+)\\/(\\d+)\\/(\\d+)$/;\r\n\tif (!re_date.exec(str_date))\r\n\t\treturn alert(\"Invalid Date format: \"+ str_date);\r\n\treturn (new Date (RegExp.$3, RegExp.$1-1, RegExp.$2, 0, 0, 0));\r\n}\r\n\r\nfunction dt2dtstr (dt_datetime) {\r\n\treturn (new String (\r\n\t\t\t(dt_datetime.getMonth()+1)+\"/\"+dt_datetime.getDate()+\"/\"+dt_datetime.getFullYear()));\r\n");
out.write("}\r\nfunction dt2tmstr (dt_datetime) {\r\n\treturn (new String (\r\n\t\t\tdt_datetime.getHours()+\":\"+dt_datetime.getMinutes()+\":\"+dt_datetime.getSeconds()));\r\n}\r\n\r\n");
out.write("</script>\r\n");
out.write("\r\n\r\n");
out.write("\r\n");
// Define the roles.
String ROLE_SFA_ADMIN = "SFA_ADMIN";
String ROLE_SFA_USER = "SFA_USER";
String ROLE_SFA_LEADS_ADMIN = "SFA_LEADS_ADMIN";
String ROLE_SFA_LEADS_USER = "SFA_LEADS_USER";
// Define menu items on Sales menu.
Integer MENU_DASHBOARD = new Integer(100);
Integer MENU_LEADS = new Integer(101);
Integer MENU_ACCOUNTS = new Integer(102);
Integer MENU_CONTACTS = new Integer(103);
Integer MENU_OPPORTUNITIES = new Integer(104);
Integer MENU_ACTIVITIES = new Integer(105);
Integer MENU_TIME_MANAGEMENT = new Integer(106);
Integer MENU_FORECASTS = new Integer(107);
Integer MENU_PRODUCTS = new Integer(108);
Integer MENU_TERRITORIES = new Integer(109);
Integer MENU_XFER = new Integer(110);
// Define menu items on Services menu.
Integer MENU_ISSUE_TRACKING = new Integer(200);
Integer MENU_CURRENT_ISSUES = new Integer(201);
Integer MENU_ISSUE_CHARTS = new Integer(202);
// Define menu items on Reports menu.
Integer MENU_ACCOUNT_LIST_RPT = new Integer(300);
Integer MENU_CONTACT_LIST_RPT = new Integer(301);
Integer MENU_PIPELINE_RPT = new Integer(302);
Integer MENU_PIPELINE_CHART = new Integer(303);
Integer MENU_WIN_LOSS_RPT = new Integer(304);
Integer MENU_ACTIVITIES_RPT = new Integer(305);
Integer MENU_OPPORTUNITY_OVERVIEW_RPT = new Integer(306);
Integer MENU_REPORT_BUILDER_RPT = new Integer(307);
// Define menu items on Admin menu.
Integer MENU_MY_COMPANY = new Integer(400);
Integer MENU_APPLICATIONS = new Integer(401);
Integer MENU_SCREENS = new Integer(402);
Integer MENU_ENTITIES = new Integer(403);
Integer MENU_CODES = new Integer(404);
Integer MENU_DISPLAY_TYPES = new Integer(405);
Integer MENU_PREFERENCES = new Integer(406);
Integer MENU_LEAD_QUEUES = new Integer(407);
Integer MENU_LEAD_RULES = new Integer(408);
Integer MENU_STEPS_TO_CLOSE = new Integer(409);
Integer MENU_REPLICATION = new Integer(410);
Integer MENU_SQL_QUERY = new Integer(411);
Integer MENU_USER_TRANSFER = new Integer(412);
// Define privileges for SFA Admin role.
ArrayList menuPrivsSfaAdmin = new ArrayList();
menuPrivsSfaAdmin.add( MENU_DASHBOARD );
menuPrivsSfaAdmin.add( MENU_LEADS );
menuPrivsSfaAdmin.add( MENU_ACCOUNTS );
menuPrivsSfaAdmin.add( MENU_CONTACTS );
menuPrivsSfaAdmin.add( MENU_OPPORTUNITIES );
menuPrivsSfaAdmin.add( MENU_ACTIVITIES );
menuPrivsSfaAdmin.add( MENU_TIME_MANAGEMENT );
menuPrivsSfaAdmin.add( MENU_FORECASTS );
menuPrivsSfaAdmin.add( MENU_PRODUCTS );
menuPrivsSfaAdmin.add( MENU_TERRITORIES );
menuPrivsSfaAdmin.add( MENU_XFER );
menuPrivsSfaAdmin.add( MENU_ISSUE_TRACKING );
menuPrivsSfaAdmin.add( MENU_CURRENT_ISSUES );
menuPrivsSfaAdmin.add( MENU_ISSUE_CHARTS );
menuPrivsSfaAdmin.add( MENU_ACCOUNT_LIST_RPT );
menuPrivsSfaAdmin.add( MENU_CONTACT_LIST_RPT );
menuPrivsSfaAdmin.add( MENU_PIPELINE_RPT );
menuPrivsSfaAdmin.add( MENU_PIPELINE_CHART );
menuPrivsSfaAdmin.add( MENU_WIN_LOSS_RPT );
menuPrivsSfaAdmin.add( MENU_ACTIVITIES_RPT );
menuPrivsSfaAdmin.add( MENU_OPPORTUNITY_OVERVIEW_RPT );
menuPrivsSfaAdmin.add( MENU_REPORT_BUILDER_RPT );
menuPrivsSfaAdmin.add( MENU_MY_COMPANY );
menuPrivsSfaAdmin.add( MENU_APPLICATIONS );
menuPrivsSfaAdmin.add( MENU_SCREENS );
menuPrivsSfaAdmin.add( MENU_ENTITIES );
menuPrivsSfaAdmin.add( MENU_CODES );
menuPrivsSfaAdmin.add( MENU_DISPLAY_TYPES );
menuPrivsSfaAdmin.add( MENU_PREFERENCES );
menuPrivsSfaAdmin.add( MENU_LEAD_QUEUES );
menuPrivsSfaAdmin.add( MENU_LEAD_RULES );
menuPrivsSfaAdmin.add( MENU_STEPS_TO_CLOSE );
menuPrivsSfaAdmin.add( MENU_REPLICATION );
menuPrivsSfaAdmin.add( MENU_SQL_QUERY );
menuPrivsSfaAdmin.add( MENU_USER_TRANSFER );
// Define privileges for SFA User role.
ArrayList menuPrivsSfaUser = new ArrayList();
menuPrivsSfaUser.add( MENU_DASHBOARD );
menuPrivsSfaUser.add( MENU_LEADS );
menuPrivsSfaUser.add( MENU_ACCOUNTS );
menuPrivsSfaUser.add( MENU_CONTACTS );
menuPrivsSfaUser.add( MENU_OPPORTUNITIES );
menuPrivsSfaUser.add( MENU_ACTIVITIES );
menuPrivsSfaUser.add( MENU_TIME_MANAGEMENT );
menuPrivsSfaUser.add( MENU_FORECASTS );
menuPrivsSfaUser.add( MENU_PRODUCTS );
menuPrivsSfaUser.add( MENU_XFER );
menuPrivsSfaUser.add( MENU_ISSUE_TRACKING );
menuPrivsSfaUser.add( MENU_CURRENT_ISSUES );
menuPrivsSfaUser.add( MENU_ISSUE_CHARTS );
menuPrivsSfaUser.add( MENU_ACCOUNT_LIST_RPT );
menuPrivsSfaUser.add( MENU_CONTACT_LIST_RPT );
menuPrivsSfaUser.add( MENU_PIPELINE_RPT );
menuPrivsSfaUser.add( MENU_PIPELINE_CHART );
menuPrivsSfaUser.add( MENU_WIN_LOSS_RPT );
menuPrivsSfaUser.add( MENU_ACTIVITIES_RPT );
menuPrivsSfaUser.add( MENU_OPPORTUNITY_OVERVIEW_RPT );
menuPrivsSfaUser.add( MENU_REPORT_BUILDER_RPT );
menuPrivsSfaUser.add( MENU_REPLICATION );
menuPrivsSfaUser.add( MENU_XFER );
// Define privileges for SFA Leads Admin role.
ArrayList menuPrivsSfaLeadsAdmin = new ArrayList();
menuPrivsSfaLeadsAdmin.add( MENU_DASHBOARD );
menuPrivsSfaLeadsAdmin.add( MENU_LEADS );
menuPrivsSfaLeadsAdmin.add( MENU_ACCOUNTS );
menuPrivsSfaLeadsAdmin.add( MENU_CONTACTS );
menuPrivsSfaLeadsAdmin.add( MENU_ACTIVITIES );
menuPrivsSfaLeadsAdmin.add( MENU_TIME_MANAGEMENT );
menuPrivsSfaLeadsAdmin.add( MENU_TERRITORIES );
menuPrivsSfaLeadsAdmin.add( MENU_XFER );
menuPrivsSfaLeadsAdmin.add( MENU_ISSUE_TRACKING );
menuPrivsSfaLeadsAdmin.add( MENU_CURRENT_ISSUES );
menuPrivsSfaLeadsAdmin.add( MENU_ISSUE_CHARTS );
menuPrivsSfaLeadsAdmin.add( MENU_ACTIVITIES_RPT );
menuPrivsSfaLeadsAdmin.add( MENU_REPORT_BUILDER_RPT );
menuPrivsSfaLeadsAdmin.add( MENU_MY_COMPANY );
menuPrivsSfaLeadsAdmin.add( MENU_SCREENS );
menuPrivsSfaLeadsAdmin.add( MENU_CODES );
menuPrivsSfaLeadsAdmin.add( MENU_PREFERENCES );
menuPrivsSfaLeadsAdmin.add( MENU_LEAD_QUEUES );
menuPrivsSfaLeadsAdmin.add( MENU_LEAD_RULES );
menuPrivsSfaLeadsAdmin.add( MENU_XFER );
// Define privileges for SFA Leads User role.
ArrayList menuPrivsSfaLeadsUser = new ArrayList();
menuPrivsSfaLeadsUser.add( MENU_DASHBOARD );
menuPrivsSfaLeadsUser.add( MENU_LEADS );
menuPrivsSfaLeadsUser.add( MENU_ACTIVITIES );
menuPrivsSfaLeadsUser.add( MENU_TIME_MANAGEMENT );
menuPrivsSfaLeadsUser.add( MENU_ACTIVITIES_RPT );
menuPrivsSfaLeadsUser.add( MENU_REPORT_BUILDER_RPT );
menuPrivsSfaLeadsUser.add( MENU_XFER );
ArrayList menuPrivileges = new ArrayList();
String module = "getMenuPrivileges";
if (userInfo!=null && userInfo.getPartyId()!=null && !userInfo.getPartyId().equals("")) {
// User is logged in. Get the user's roles.
HashMap partyRoleFindMap = new HashMap();
partyRoleFindMap.put("partyId", userInfo.getPartyId());
try {
List partyRoleL = delegator.findByAnd("PartyRole", partyRoleFindMap);
Iterator partyRoleI = partyRoleL.iterator();
while (partyRoleI.hasNext()) {