/* utility.js */ function callSubmit(formId) { // Calls the submit function of an given form (DOM Version) var Form = getElem("id", formId, null); Form.submit(); } function callSubmitWait(formId, msg) { // Calls the submit function of an given form var Form = getElem("id", formId, null); Form.submit(); fern = window.open("", "fern", "height=200, width=400,status=1"); fern.document.write(msg); fern.document.close(); } function closeMessagebox(){ fern = window.open("", "fern", "height=200, width=400,status=1"); fern.close(); } function sendForm(name) { // Calls the submit function of an given form (NS 4.5x Version) document.forms[name].submit(); } function setImage(name, uri) { // Setting the image of an given element (NS 4.5x Version) document.images[name].src=uri; } function maxPropertyValue(elemArray, propertyName) { // Retrieves the maximum property value over a given element array var max = 0; var actual = 0; for (var i=0; i max) { max = actual; } } if (propertyName == "width") { // We need additional border/padding information, so take the first element as source if (MS) { // max += parseInt(elemArray[0].currentStyle["paddingLeft"]); // max += parseInt(elemArray[0].currentStyle["paddingRight"]); // max += parseInt(elemArray[0].currentStyle["borderLeftWidth"]); // max += parseInt(elemArray[0].currentStyle["borderRightWidth"]); } else { max += parseInt(getComputedStyle(elemArray[0], null).getPropertyValue("padding-left")); max += parseInt(getComputedStyle(elemArray[0], null).getPropertyValue("padding-right")); max += parseInt(getComputedStyle(elemArray[0], null).getPropertyValue("border-left-width")); max += parseInt(getComputedStyle(elemArray[0], null).getPropertyValue("border-right-width")); } } return max; }