// ======================================== // If there is a field on the first form, // put the focus of the cursor there. // ======================================== for (i = 0; i < document.forms.length; i++) { for (j = 0; j < document.forms[i].length; j++) { if (document.forms[i].elements[j].type.toLowerCase() != 'hidden') { if (document.forms[i].elements[j].type.toLowerCase() != 'submit') { if (document.forms[i].elements[j].disabled == false) { document.forms[i].elements[j].focus(); break; } } } } } function enablePage(bolEnable) { // =================================== // Display the "Processing" message up in the right corner. // =================================== if (typeof document.all['Processing'] != "undefined") { if (!bolEnable) { document.all['Processing'].style.display='block'; } else { document.all['Processing'].style.display='none'; } } for (j = 0; j < document.forms.length; j++) { var theForm = document.forms[j]; // =================================== // Disable all the fields on the form. // =================================== for (i = 0; i < theForm.length; i++) { if (theForm.elements[i].type.toLowerCase() != 'hidden') { // Todo: Until I can get the value back, leave the fields enabled. //theForm.elements[i].disabled = !bolEnable; } if (theForm.elements[i].type.toLowerCase() == 'submit') { theForm.elements[i].disabled = !bolEnable; } } // for each field } // for each form } // function // Add another option to an existing control // 2) The value of the option to add // 3) The display value of the option to add function Add_Option(objGroup, strValue, strText) { // Create the new option var objOption = new Option(strText, strValue, 0, 0); // Put it at the end of the list var intPosition = objGroup.length; // Slide the new option into position objGroup.options[intPosition] = objOption; // Re-sort the group Sort_Select_Group(objGroup); } // Move the selected options from a source control. function Move_Selected_Options(objSource, objDest) { for (i = objSource.options.length; i--; i > -1) { // Loop through every item in the source select box. if (objSource.options[i].selected) { // If it is selected, copy the current option to the // destination selection box. var objOption = new Option(objSource.options[i].text, objSource.options[i].value, 0, 0); var intPosition = objDest.length; objDest.options[intPosition] = objOption; // Then, delete the option from the source selection box, // thus making the option appear "moved." objSource.options[i] = null; } } // Deselect the options in the destination control. // Commonly used before submitting the form so the server-side // processing can determine which entries existed. function Select_All_Options(objGroup) { for (var i=objGroup.options.length-1; i >= 0; i--) { objGroup.options[i].selected = true; } } // Deselect every value in the