Edit C:\galaxie\deploy\Tomcat6\work\Catalina\localhost\galaxie\old\org\apache\jsp\js\read_005fjs_jsp.java
package org.apache.jsp.js; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.jsp.*; import java.util.*; public final class read_005fjs_jsp extends org.apache.jasper.runtime.HttpJspBase implements org.apache.jasper.runtime.JspSourceDependent { private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory(); private static java.util.List _jspx_dependants; static { _jspx_dependants = new java.util.ArrayList(1); _jspx_dependants.add("/js/utils.js"); } private javax.el.ExpressionFactory _el_expressionfactory; private org.apache.AnnotationProcessor _jsp_annotationprocessor; public Object getDependants() { return _jspx_dependants; } public void _jspInit() { _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory(); _jsp_annotationprocessor = (org.apache.AnnotationProcessor) getServletConfig().getServletContext().getAttribute(org.apache.AnnotationProcessor.class.getName()); } public void _jspDestroy() { } public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; PageContext _jspx_page_context = null; try { response.setContentType("text/html;charset=UTF-8"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; out.write('\n'); out.write('\n'); out.write("/******************************************************************************\n"); out.write(" * Copyright (c) 2000-2011 e-Deal\n"); out.write(" *\n"); out.write(" * e-Deal S.A.\n"); out.write(" * 55 rue Brillat Savarin\n"); out.write(" * 75013 Paris\n"); out.write(" * France\n"); out.write(" *\n"); out.write(" * T: +33 (0)1 53 80 80 30\n"); out.write(" * F: +33 (0)1 73 01 69 77\n"); out.write(" * http://www.e-deal.com\n"); out.write(" * \n"); out.write(" * La diffusion de ce code source sous quelque forme que ce soit sans\n"); out.write(" * l'autorisation de E-DEAL est interdite.\n"); out.write(" *\n"); out.write(" * Vous �tes autoris�s � modifier ce code source uniquement pour votre usage\n"); out.write(" * propre et sous r�serve que les mentions de copyright demeurent intactes.\n"); out.write(" *\n"); out.write(" * Ce code est fourni en l'�tat. Aucune garantie d'aucune sorte, explicite ou\n"); out.write(" * implicite n'est donn�e. En aucun cas E-DEAL ne pourra �tre tenu pour\n"); out.write(" * responsable des dommages pouvant r�sulter de l'utilisation de ce code\n"); out.write(" * source.\n"); out.write(" ******************************************************************************/\n"); out.write("/**\n"); out.write(" * Remove all selected items from a select multiple object.\n"); out.write(" * fldName specified an hidden input containing list the values separated by '$$multivalSeparator'.\n"); out.write(" * The name of the select multiple element is 'lbl' + fldName. If not exist, it is just fldName and\n"); out.write(" * the string representation of the values list doesn't be store.\n"); out.write(" *\n"); out.write(" * @param fldName name of the field (required).\n"); out.write(" * @param frmName name of the form (optional, default is forms[0]).\n"); out.write(" */\n"); out.write("function unselectMultiple(fldName, frmName) {\n"); out.write("\tvar f = null;\n"); out.write("\tvar i;\n"); out.write("\tif(frmName) {\n"); out.write("\t\tf = document.forms[frmName];\n"); out.write("\t} else {\n"); out.write("\t\tf = document.forms[0];\n"); out.write("\t}\n"); out.write("\tif(!f) return;\n"); out.write("\n"); out.write("\tvar lblFld = f.elements['lbl' + fldName];\n"); out.write("\tvar realFld = f.elements[fldName];\n"); out.write("\tvar multivalSeparator = (f.elements['$$multivalSeparator'] ? f.elements['$$multivalSeparator'].value : '|');\n"); out.write("\n"); out.write("\tvar usedFld = lblFld ? lblFld : realFld;\n"); out.write("\n"); out.write("\tif(usedFld && usedFld.selectedIndex != -1) {\n"); out.write("\t\tif(lblFld) {\n"); out.write("\t\t\tvar vectValue = realFld.value.split(multivalSeparator);\n"); out.write("\t\t\tfor(i = lblFld.options.length - 1; i >= 0; i--) {\n"); out.write("\t\t\t\tfldValue = lblFld.options[i].value;\n"); out.write("\t\t\t\tif(fldValue != '_blank') { \n"); out.write("\t\t\t\t\tif(lblFld.options[i].selected) {\n"); out.write("\t\t\t\t\t\tlblFld.options[i] = null;\n"); out.write("\t\t\t\t\t\tvectValue[i] = null;\n"); out.write("\t\t\t\t\t}\n"); out.write("\t\t\t\t}\n"); out.write("\t\t\t}\n"); out.write("\t\t\trealFld.value = '';\n"); out.write("\t\t\tfor(i = 0, j = 0; i < vectValue.length; i++) {\n"); out.write("\t\t\t\trealFld.value += (vectValue[i] == null ? '' : (j++ == 0 ? '' : multivalSeparator) + vectValue[i]);\n"); out.write("\t\t\t}\n"); out.write("\t\t} else {\n"); out.write("\t\t\tfor(i = realFld.options.length - 1; i >= 0; i--) {\n"); out.write("\t\t\t\tfldValue = realFld.options[i].value;\n"); out.write("\t\t\t\tif(fldValue != '_blank') { \n"); out.write("\t\t\t\t\tif(realFld.options[i].selected) {\n"); out.write("\t\t\t\t\t\trealFld.options[i] = null;\n"); out.write("\t\t\t\t\t}\n"); out.write("\t\t\t\t}\n"); out.write("\t\t\t}\n"); out.write("\t\t}\n"); out.write("\t}\n"); out.write("}\n"); out.write("\n"); out.write("/**\n"); out.write(" * Convert money (in String) in another currency\n"); out.write(" * Conversion can be only from a euro-zone currency to euro or reverse\n"); out.write(" * Symbols :\n"); out.write(" *\t\tfrf : Franc francais\n"); out.write(" *\t\tdem : Deutsch mark\n"); out.write(" *\t\titl : Lire italienne\n"); out.write(" *\t\tiep : Livre irlandaise\n"); out.write(" *\t\tesp : Peseta espagnole\n"); out.write(" *\t\tpte : Escudo portugais\n"); out.write(" *\t\tnlg : Florin hollandais\n"); out.write(" *\t\tfim : Mark finlandais\n"); out.write(" *\t\tbef : Franc belge\n"); out.write(" *\t\tluf : Franc luxembourgeois\n"); out.write(" *\t\tats : Shilling autrichien\n"); out.write(" *\t\teur : Euro\n"); out.write(" */\n"); out.write(" \n"); out.write("function convert(money, curr1, curr2) {\n"); out.write("\tif (money == '') {\n"); out.write("\t\treturn '';\n"); out.write("\t}\n"); out.write("\tvar value = parseFloat(money);\n"); out.write("\tif (isNaN(value)) {\n"); out.write("\t\treturn '';\n"); out.write("\t}\n"); out.write("\tvar convVal;\n"); out.write("\tif (curr1.toLowerCase() == 'frf' && curr2.toLowerCase() == 'eur') {\n"); out.write("\t\t// conversion franc francais -> euro\n"); out.write("\t\tconvVal = (100 *parseFloat(value)) / 6.55957;\n"); out.write("\t} else if (curr1.toLowerCase() == 'eur' && curr2.toLowerCase() == 'frf') {\n"); out.write("\t\t// conversion euro -> franc francais\n"); out.write("\t\tconvVal = (100 *parseFloat(value)) * 6.55957;\n"); out.write("\n"); out.write("\t} else if (curr1.toLowerCase() == 'dem' && curr2.toLowerCase() == 'eur') {\n"); out.write("\t\t// conversion mark (Allemagne) -> euro\n"); out.write("\t\tconvVal = (100 *parseFloat(value)) / 1.95583;\n"); out.write("\t} else if (curr1.toLowerCase() == 'eur' && curr2.toLowerCase() == 'dem') {\n"); out.write("\t\t// conversion euro -> mark (Allemagne)\n"); out.write("\t\tconvVal = (100 *parseFloat(value)) * 1.95583;\n"); out.write("\n"); out.write("\t} else if (curr1.toLowerCase() == 'itl' && curr2.toLowerCase() == 'eur') {\n"); out.write("\t\t// conversion lire (Italie) -> euro\n"); out.write("\t\tconvVal = (100 *parseFloat(value)) / 1936.27;\n"); out.write("\t} else if (curr1.toLowerCase() == 'eur' && curr2.toLowerCase() == 'itl') {\n"); out.write("\t\t// conversion euro -> lire (Italie)\n"); out.write("\t\tconvVal = (100 *parseFloat(value)) * 1936.27;\n"); out.write("\n"); out.write("\t} else if (curr1.toLowerCase() == 'iep' && curr2.toLowerCase() == 'eur') {\n"); out.write("\t\t// conversion livre irlandaise -> euro\n"); out.write("\t\tconvVal = (100 *parseFloat(value)) / 0.787564;\n"); out.write("\t} else if (curr1.toLowerCase() == 'eur' && curr2.toLowerCase() == 'iep') {\n"); out.write("\t\t// conversion euro -> livre irlandaise\n"); out.write("\t\tconvVal = (100 *parseFloat(value)) * 0.787564;\n"); out.write("\n"); out.write("\t} else if (curr1.toLowerCase() == 'esp' && curr2.toLowerCase() == 'eur') {\n"); out.write("\t\t// conversion peseta (Espagne) -> euro\n"); out.write("\t\tconvVal = (100 *parseFloat(value)) / 166.386;\n"); out.write("\t} else if (curr1.toLowerCase() == 'eur' && curr2.toLowerCase() == 'esp') {\n"); out.write("\t\t// conversion euro -> peseta (Espagne)\n"); out.write("\t\tconvVal = (100 *parseFloat(value)) * 166.386;\n"); out.write("\n"); out.write("\t} else if (curr1.toLowerCase() == 'pte' && curr2.toLowerCase() == 'eur') {\n"); out.write("\t\t// conversion escudo (Portugal) -> euro\n"); out.write("\t\tconvVal = (100 *parseFloat(value)) / 200.482;\n"); out.write("\t} else if (curr1.toLowerCase() == 'eur' && curr2.toLowerCase() == 'pte') {\n"); out.write("\t\t// conversion euro -> escudo (Portugal)\n"); out.write("\t\tconvVal = (100 *parseFloat(value)) * 200.482;\n"); out.write("\n"); out.write("\t} else if (curr1.toLowerCase() == 'nlg' && curr2.toLowerCase() == 'eur') {\n"); out.write("\t\t// conversion florin (Pays-Bas) -> euro\n"); out.write("\t\tconvVal = (100 *parseFloat(value)) / 2.20371;\n"); out.write("\t} else if (curr1.toLowerCase() == 'eur' && curr2.toLowerCase() == 'nlg') {\n"); out.write("\t\t// conversion euro -> florin (Pays-Bas)\n"); out.write("\t\tconvVal = (100 *parseFloat(value)) * 2.20371;\n"); out.write("\n"); out.write("\t} else if (curr1.toLowerCase() == 'fim' && curr2.toLowerCase() == 'eur') {\n"); out.write("\t\t// conversion Mark finlandais (Finlande) -> euro\n"); out.write("\t\tconvVal = (100 *parseFloat(value)) / 5.94573;\n"); out.write("\t} else if (curr1.toLowerCase() == 'eur' && curr2.toLowerCase() == 'fim') {\n"); out.write("\t\t// conversion euro -> Mark finlandais (Finlande)\n"); out.write("\t\tconvVal = (100 *parseFloat(value)) * 5.94573;\n"); out.write("\n"); out.write("\t} else if (curr1.toLowerCase() == 'bef' && curr2.toLowerCase() == 'eur') {\n"); out.write("\t\t// conversion franc belge -> euro\n"); out.write("\t\tconvVal = (100 *parseFloat(value)) / 40.3399;\n"); out.write("\t} else if (curr1.toLowerCase() == 'eur' && curr2.toLowerCase() == 'bef') {\n"); out.write("\t\t// conversion euro -> franc belge\n"); out.write("\t\tconvVal = (100 *parseFloat(value)) * 40.3399;\n"); out.write("\n"); out.write("\t} else if (curr1.toLowerCase() == 'luf' && curr2.toLowerCase() == 'eur') {\n"); out.write("\t\t// conversion franc luxembourgeois -> euro\n"); out.write("\t\tconvVal = (100 *parseFloat(value)) / 40.3399;\n"); out.write("\t} else if (curr1.toLowerCase() == 'eur' && curr2.toLowerCase() == 'luf') {\n"); out.write("\t\t// conversion euro -> franc luxembourgeois\n"); out.write("\t\tconvVal = (100 *parseFloat(value)) * 40.3399;\n"); out.write("\n"); out.write("\t} else if (curr1.toLowerCase() == 'ats' && curr2.toLowerCase() == 'eur') {\n"); out.write("\t\t// conversion schilling (Autriche) -> euro\n"); out.write("\t\tconvVal = (100 *parseFloat(value)) / 13.7603;\n"); out.write("\t} else if (curr1.toLowerCase() == 'eur' && curr2.toLowerCase() == 'ats') {\n"); out.write("\t\t// conversion euro -> schilling (Autriche)\n"); out.write("\t\tconvVal = (100 *parseFloat(value)) * 13.7603;\n"); out.write("\n"); out.write("\t}\n"); out.write("\treturn (Math.round(convVal)/100).toString();\n"); out.write("}\n"); out.write("\n"); out.write("/* removing leading and tail spaces and replaces mlti^le spaces by one single space\n"); out.write(" */\n"); out.write("function trimStr(str) {\n"); out.write("\tif (str == \"\") {\n"); out.write("\t\treturn str;\n"); out.write("\t}\n"); out.write("\tvar res = str;\n"); out.write("\twhile (res.indexOf(\" \") > -1) {\n"); out.write("\t\tres = res.split(\" \").join(\" \");\n"); out.write("\t}\n"); out.write("\tif (res.indexOf(\" \") == 0) {\n"); out.write("\t\tres = res.substring(1);\n"); out.write("\t}\n"); out.write("\tif (res.lastIndexOf(\" \") == (res.length - 1)) {\n"); out.write("\t\tres = res.substring(0, res.length - 1);\n"); out.write("\t}\n"); out.write("\treturn res;\n"); out.write("}\n"); out.write("\n"); out.write("function flEscape(str) {\n"); out.write("\tif (str == \"\") {\n"); out.write("\t\treturn str;\n"); out.write("\t}else {\n"); out.write("\t\t//return escape(str).split(\"+\").join(\"%2b\");\n"); out.write("\t\treturn encodeURIComponent(str).split(\"+\").join(\"%2b\");\n"); out.write("\t}\n"); out.write("}\n"); out.write("\n"); out.write("\n"); out.write("/**\n"); out.write(" * replaces some special caracters by corresponding codes\n"); out.write(" */\n"); out.write("function formatToWeb(str, edit) {\n"); out.write("\tvar result;\n"); out.write("//\tif (!str || trimStr(str).length == 0)\n"); out.write("\tif (false)\n"); out.write("\t\tresult = edit ? \"\" : \" \";\n"); out.write("\telse {\n"); out.write("\t\tvar buffer = \"\";\n"); out.write("\t\tvar c;\n"); out.write("\t\tvar i;\n"); out.write("\t\tfor (i = 0; i < str.length; i++) {\n"); out.write("\t\t\tc = str.substring(i, i+1);\n"); out.write("\t\t\tswitch (c) {\n"); out.write("\t\t\t\tcase '\\n' :\n"); out.write("\t\t\t\t\tbuffer += edit ? \"\\n\" : \"<br>\";\n"); out.write("\t\t\t\t\tbreak;\n"); out.write("\t\t\t\tcase '<' :\n"); out.write("\t\t\t\t\tbuffer += \"<\";\n"); out.write("\t\t\t\t\tbreak;\n"); out.write("\t\t\t\tcase '>' :\n"); out.write("\t\t\t\t\tbuffer += \">\";\n"); out.write("\t\t\t\t\tbreak;\n"); out.write("\t\t\t\tcase '&' :\n"); out.write("\t\t\t\t\tbuffer += \"&\";\n"); out.write("\t\t\t\t\tbreak;\n"); out.write("\t\t\t\tcase '\"' :\n"); out.write("\t\t\t\t\tbuffer += \""\";\n"); out.write("\t\t\t\t\tbreak;\n"); out.write("\t\t\t\tcase 'Ã? ' :\n"); out.write("\t\t\t\t\tbuffer += \"à\";\n"); out.write("\t\t\t\t\tbreak;\n"); out.write("\t\t\t\tcase 'Ã?¢' :\n"); out.write("\t\t\t\t\tbuffer += \"â\";\n"); out.write("\t\t\t\t\tbreak;\n"); out.write("\t\t\t\tcase 'Ã?¤' :\n"); out.write("\t\t\t\t\tbuffer += \"ä\";\n"); out.write("\t\t\t\t\tbreak;\n"); out.write("\t\t\t\tcase 'Ã?©' :\n"); out.write("\t\t\t\t\tbuffer += \"é\";\n"); out.write("\t\t\t\t\tbreak;\n"); out.write("\t\t\t\tcase 'Ã?¨' :\n"); out.write("\t\t\t\t\tbuffer += \"è\";\n"); out.write("\t\t\t\t\tbreak;\n"); out.write("\t\t\t\tcase 'Ã?ª' :\n"); out.write("\t\t\t\t\tbuffer += \"ê\";\n"); out.write("\t\t\t\t\tbreak;\n"); out.write("\t\t\t\tcase 'Ã?«' :\n"); out.write("\t\t\t\t\tbuffer += \"ë\";\n"); out.write("\t\t\t\t\tbreak;\n"); out.write("\t\t\t\tcase 'Ã?®' :\n"); out.write("\t\t\t\t\tbuffer += \"î\";\n"); out.write("\t\t\t\t\tbreak;\n"); out.write("\t\t\t\tcase 'Ã?¯' :\n"); out.write("\t\t\t\t\tbuffer += \"ï\";\n"); out.write("\t\t\t\t\tbreak;\n"); out.write("\t\t\t\tcase 'Ã?´' :\n"); out.write("\t\t\t\t\tbuffer += \"ô\";\n"); out.write("\t\t\t\t\tbreak;\n"); out.write("\t\t\t\tcase 'Ã?¶' :\n"); out.write("\t\t\t\t\tbuffer += \"ö\";\n"); out.write("\t\t\t\t\tbreak;\n"); out.write("\t\t\t\tcase 'Ã?¹' :\n"); out.write("\t\t\t\t\tbuffer += \"ù\";\n"); out.write("\t\t\t\t\tbreak;\n"); out.write("\t\t\t\tcase 'Ã?»' :\n"); out.write("\t\t\t\t\tbuffer += \"û\";\n"); out.write("\t\t\t\t\tbreak;\n"); out.write("\t\t\t\tcase 'Ã?¼' :\n"); out.write("\t\t\t\t\tbuffer += \"ü\";\n"); out.write("\t\t\t\t\tbreak;\n"); out.write("\t\t\t\tcase 'Ã?¤' :\n"); out.write("\t\t\t\t\tbuffer += \"¤\";\n"); out.write("\t\t\t\t\tbreak;\n"); out.write("\t\t\t\tcase 'Ã?£' :\n"); out.write("\t\t\t\t\tbuffer += \"£\";\n"); out.write("\t\t\t\t\tbreak;\n"); out.write("\t\t\t\tcase 'Ã?µ' :\n"); out.write("\t\t\t\t\tbuffer += \"µ\";\n"); out.write("\t\t\t\t\tbreak;\n"); out.write("\t\t\t\tcase 'Ã?²' :\n"); out.write("\t\t\t\t\tbuffer += \"²\";\n"); out.write("\t\t\t\t\tbreak;\n"); out.write("\t\t\t\tcase 'Ã?§' :\n"); out.write("\t\t\t\t\tbuffer += \"§\";\n"); out.write("\t\t\t\t\tbreak;\n"); out.write("\t\t\t\tcase 'Ã?§' :\n"); out.write("\t\t\t\t\tbuffer += \"ç\";\n"); out.write("\t\t\t\t\tbreak;\n"); out.write("\t\t\t\tdefault :\n"); out.write("\t\t\t\t\tbuffer += c;\n"); out.write("\t\t\t}\n"); out.write("\t\t}\n"); out.write("\t\tresult = buffer;\n"); out.write("\t}\n"); out.write("\treturn result;\n"); out.write("}\n"); out.write("\n"); out.write("\n"); out.write("/**\n"); out.write(" * replaces some special caracters by corresponding codes\n"); out.write(" */\n"); out.write("function formatToJavascript(pStr) {\n"); out.write("\tvar i = 0;\n"); out.write("\tvar strResult = '';\n"); out.write("//\tif (!str || trimStr(str).length == 0)\n"); out.write("\tif(pStr) {\n"); out.write("\t\tfor(i = 0; i < pStr.length; i++) {\n"); out.write("\t\t\tc = pStr.charAt(i);\n"); out.write("\t\t\tswitch (c) {\n"); out.write("\t\t\t\tcase '\\n' :\n"); out.write("\t\t\t\t\tstrResult += '\\\\n';\n"); out.write("\t\t\t\t\tbreak;\n"); out.write("\t\t\t\tcase '\"' :\n"); out.write("\t\t\t\t\tstrResult += '\\\\\\\"';\n"); out.write("\t\t\t\t\tbreak;\n"); out.write("\t\t\t\tcase '\\'' :\n"); out.write("\t\t\t\t\tstrResult += '\\\\\\'';\n"); out.write("\t\t\t\t\tbreak;\n"); out.write("\t\t\t\tcase '\\\\' :\n"); out.write("\t\t\t\t\tstrResult += '\\\\\\\\';\n"); out.write("\t\t\t\t\tbreak;\n"); out.write("\t\t\t\tdefault :\n"); out.write("\t\t\t\t\tstrResult += c;\n"); out.write("\t\t\t}\n"); out.write("\t\t}\n"); out.write("\t}\n"); out.write("\treturn strResult;\n"); out.write("}\n"); out.write("\n"); out.write("\n"); out.write("/**\n"); out.write(" * returns the given number rounded up to the given number of decimals\n"); out.write(" */\n"); out.write("function roundDecimal(nbr , nbDecimals) {\n"); out.write("\tvar multi = 1;\n"); out.write("\tvar i;\n"); out.write("\tvar nbDec = 2;\n"); out.write("\tif (nbDecimals)\n"); out.write("\t\tnbDec = nbDecimals;\n"); out.write("\t\t\n"); out.write("\tfor (i=0 ; i < nbDec ; i++)\n"); out.write("\t\tmulti *= 10;\n"); out.write("\treturn (Math.round(multi * nbr)/multi);\n"); out.write("}\n"); out.write("\n"); out.write("/**\n"); out.write(" * replace key by value in specified string\n"); out.write(" */\n"); out.write("function strReplace(pStr, pKey, pValue) {\n"); out.write("\treturn pStr.split(pKey).join(pValue);\n"); out.write("}\n"); out.write("\n"); out.write("\n"); out.write("/**\n"); out.write(" * lite Vector class\n"); out.write(" */\n"); out.write("function FlVector(pArray) {\n"); out.write("\tthis.elements = pArray ? pArray : new Array();\n"); out.write("\n"); out.write("\tthis.size = FlVectorSize;\n"); out.write("\tthis.isEmpty = FlVectorIsEmpty;\n"); out.write("\tthis.addElement = FlVectorAddElement;\n"); out.write("\tthis.removeElementAt = FlVectorRemoveElementAt;\n"); out.write("\tthis.removeElement = FlVectorRemoveElement;\n"); out.write("\tthis.elementAt = FlVectorElementAt;\n"); out.write("\tthis.contains = FlVectorContains;\n"); out.write("\tthis.toString = FlVectorToString;\n"); out.write("}\n"); out.write("\n"); out.write("function FlVectorSize() {\n"); out.write("\treturn this.elements.length;\n"); out.write("}\n"); out.write("\n"); out.write("function FlVectorIsEmpty() {\n"); out.write("\treturn this.elements.length == 0;\n"); out.write("}\n"); out.write("\n"); out.write("function FlVectorAddElement(pObj) {\n"); out.write("\tthis.elements[this.elements.length] = pObj;\n"); out.write("}\n"); out.write("\n"); out.write("function FlVectorRemoveElementAt(pIndex) {\n"); out.write("\tvar i = 0;\n"); out.write("\tif(pIndex >= 0 && pIndex < this.elements.length) {\n"); out.write("\t\tthis.elements[pIndex] = null;\n"); out.write("\t\tfor(i = pIndex + 1; i < this.elements.length; i++) {\n"); out.write("\t\t\tthis.elements[i - 1] = this.elements[i];\n"); out.write("\t\t}\n"); out.write("\t\tthis.elements.length = this.elements.length - 1;\n"); out.write("\t}\n"); out.write("}\n"); out.write("\n"); out.write("function FlVectorRemoveElement(pObj) {\n"); out.write("\tvar i = 0;\n"); out.write("\tfor(i = 0; i < this.elements.length; i++) {\n"); out.write("\t\tif(this.elements[i] == pObj) {\n"); out.write("\t\t\tthis.removeElementAt(i);\n"); out.write("\t\t}\n"); out.write("\t}\n"); out.write("}\n"); out.write("\n"); out.write("function FlVectorElementAt(pIndex) {\n"); out.write("\tif(pIndex >= 0 && pIndex < this.elements.length) {\n"); out.write("\t\treturn this.elements[pIndex];\n"); out.write("\t} else {\n"); out.write("\t\treturn null;\n"); out.write("\t}\n"); out.write("}\n"); out.write("\n"); out.write("function FlVectorContains(pObj) {\n"); out.write("\tvar i = 0;\n"); out.write("\tfor(i = 0; i < this.elements.length; i++) {\n"); out.write("\t\tif(this.elements[i] == pObj) {\n"); out.write("\t\t\treturn true;\n"); out.write("\t\t}\n"); out.write("\t}\n"); out.write("\treturn false;\n"); out.write("}\n"); out.write("\n"); out.write("function FlVectorToString(pSeparator) {\n"); out.write("\treturn this.elements.join(pSeparator ? pSeparator : ';');\n"); out.write("}\n"); out.write("\n"); out.write("function trimString(str) {\n"); out.write(" str = this != window? this : str;\n"); out.write(" return str.replace(/^\\s+/g, '').replace(/\\s+$/g, '');\n"); out.write("}\n"); out.write("\n"); out.write("String.prototype.trim = trimString;\n"); out.write("\n"); out.write("function arrayIndexOf(value, array) {\n"); out.write("\tarray = this != window ? this : array;\n"); out.write("\tif (array) {\n"); out.write("\t\tfor (var i = 0; i < array.length; i++) {\n"); out.write("\t\t\tif (array[i] == value) {\n"); out.write("\t\t\t\treturn i;\n"); out.write("\t\t\t}\n"); out.write("\t\t}\n"); out.write("\t}\n"); out.write("\treturn -1;\n"); out.write("}\n"); out.write("function arrayLastIndexOf(value, array) {\n"); out.write("\tarray = this != window ? this : array;\n"); out.write("\tif (array) {\n"); out.write("\t\tfor (var i = array.length - 1; i <= 0; i--) {\n"); out.write("\t\t\tif (array[i] == value) {\n"); out.write("\t\t\t\treturn i;\n"); out.write("\t\t\t}\n"); out.write("\t\t}\n"); out.write("\t}\n"); out.write("\treturn -1;\n"); out.write("}\n"); out.write("\n"); out.write("function replaceParam(url, paramName, newValue){\n"); out.write("\n"); out.write("\tif (!url) {\n"); out.write("\t\treturn;\n"); out.write("\t}\n"); out.write("\tvar queryStringIdx = url.indexOf(\"?\");\n"); out.write("\tif (queryStringIdx == -1) {\n"); out.write("\t\treturn url + \"?\" + paramName + \"=\" + encodeURIComponent(newValue);\n"); out.write("\t} \n"); out.write("\tvar queryString = url.substring(queryStringIdx + 1, url.length);\n"); out.write("\tvar paramNames = new Array();\n"); out.write("\tvar paramValues = new Array();\n"); out.write("\tvar params = queryString.split('&');\n"); out.write("\tvar paramIdx = -1;\n"); out.write("\tfor (var i = 0; i < params.length; i++) {\n"); out.write("\t\tvar idx = params[i].indexOf(\"=\");\n"); out.write("\t\tparamNames[i] = params[i].substring(0, idx);\n"); out.write("\t\tif (paramNames[i] == paramName && paramIdx == -1) {\n"); out.write("\t\t\tparamIdx = i;\n"); out.write("\t\t}\n"); out.write("\t\tparamValues[i] = params[i].substring(idx + 1, params[i].length);\n"); out.write("\t}\n"); out.write("\tif (paramIdx == -1) {\n"); out.write("\t\tparamNames.push(paramName);\n"); out.write("\t\tparamValues.push(newValue);\n"); out.write("\t} else {\n"); out.write("\t\tparamValues[paramIdx] = newValue;\n"); out.write("\t}\n"); out.write("\tvar newQueryArray = new Array();\n"); out.write("\tfor (var i =0; i < paramNames.length; i++) {\n"); out.write("\t\tif (paramValues[i]) {\n"); out.write("\t\t\tnewQueryArray.push(paramNames[i] + \"=\" + paramValues[i]);\n"); out.write("\t\t}\n"); out.write("\t}\n"); out.write("\treturn url.substring(0, queryStringIdx) + \"?\" + newQueryArray.join(\"&\");\n"); out.write("}\n"); out.write("\n"); out.write("/*\n"); out.write(" * Allowing to impose a max length for\n"); out.write(" * provided object (textarea for example)\n"); out.write(" * And display specified message in order\n"); out.write(" * to inform current user if its text is\n"); out.write(" * truncate\n"); out.write(" */\n"); out.write("function imposeMaxLength(Event, Object)\n"); out.write("{\n"); out.write("\tvar MaxLenght = 3000;\n"); out.write("\tif(Event.type=\"blur\" && Object.value.length > MaxLenght){\n"); out.write("\t\talert(getMessage(\"M903F\",\"Champ tronqué à la limite de taille suivante:\", true)+\" \"+MaxLenght);\n"); out.write("\t\tObject.value = Object.value.substring(0, MaxLenght);\n"); out.write("\t}\n"); out.write("\treturn (Object.value.length < MaxLenght)||(Event.keyCode == 8 ||Event.keyCode==46||(Event.keyCode>=35&&Event.keyCode<=40));\n"); out.write("}\n"); out.write("\n"); out.write("\n"); out.write('\n'); out.write('\n'); out.write('\n'); } catch (Throwable t) { if (!(t instanceof SkipPageException)){ out = _jspx_out; if (out != null && out.getBufferSize() != 0) try { out.clearBuffer(); } catch (java.io.IOException e) {} if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); else log(t.getMessage(), t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } } }
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de