function formatMoney(value) { result = "$"+Math.floor(value)+"."; var cents = 100*(value-Math.floor(value))+0.5; result += Math.floor(cents/10); result += Math.floor(cents%10); return result; } function AddOther0(SelectBox) { var OtherText; OtherText = prompt("Describe the OTHER option.","") if ((OtherText != "") && (OtherText != null)) { SelectBox.options[SelectBox.options.length]=new Option(OtherText, "0"); SelectBox.selectedIndex = SelectBox.options.length-1; } return true; } function AddOther(SelectBox) { var OtherText; OtherText = prompt("Describe the OTHER option.","") if ((OtherText != "") && (OtherText != null)) { SelectBox.options[SelectBox.options.length]=new Option(OtherText, OtherText); SelectBox.selectedIndex = SelectBox.options.length-1; } return true; } function newWindow(URL, width, height) { window.open(URL, "Sub", "scrollbars=no,width=" + width + ",height=" + height + ",menubar=no,toolbar=no,titlebar=no,status=no"); return true; } function newScrollWindow(URL, width, height) { var d; d = new Date(); window.open(URL, "Sub" + d.getSeconds(), "scrollbars=yes,width=" + width + ",height=" + height + ",menubar=no,toolbar=no,titlebar=no,status=no"); return true; } function toggle_display(img, block) { var imgSrc = String(img.src); if (imgSrc.indexOf("/media/icons/plus.gif") != -1) { block.style.display = "block"; img.src = "/media/icons/minus.gif"; } else { block.style.display = "none"; img.src = "/media/icons/plus.gif"; } } function changeImages() { if (document.images) { for (var i=0; i < changeImages.arguments.length; i+=2) { document[changeImages.arguments[i]].src = changeImages.arguments[i+1]; } } }