﻿function RadioOnChangeSubmit(a, b, c) { var d = document.getElementById(b); if (d != null) { d.value = a; var e = document.getElementById(c); if (e != null) { e.submit() } } } function OnChangeSubmit(a, b, c) { var d = document.getElementById(b); if (d != null) { d.value = a; var e = document.getElementById(c); if (e != null) { e.submit() } } } function OnClickSubmit(a, b, c) { var d = document.getElementById(b); if (d != null) { d.value = a; var e = document.getElementById(c); if (e != null) { e.submit() } } } function OrderDetailOnBlurSubmit(a, b, c, d, e) { var f = document.getElementById(a); if (f != null) { if (f.value != b) { var g = document.getElementById(c); if (g != null) { g.value = d; var h = document.getElementById(e); if (h != null) { h.submit() } } } } } function formSubmitOnBlur(a) { var b = document.getElementById(a); b.submit() } function SubmitRowEntry(a, b, c) { var d = document.getElementById(a); var e = document.getElementById(b); if (e != null) { e.value = c; if (d != null) { d.action = ""; d.submit() } } } function S52_ParentLocationOnload(a) { var b = document.getElementById(a); if (b != null) { alert(b.value); parent.location.href = b.value } } function S52_FormPostOnload(a) { var b = document.getElementById(a); if (b != null) { b.submit() } } function w52_jumpSite(a) { var b = document.getElementById(a).value; var c = ""; var d = true; if (b != "") { if (b.indexOf("####INTERNAL") > -1) { d = false } c = b.substring(0, b.indexOf("####")); if (d) { window.open(c, "", "") } else { document.location.href = c } } } function S52_printWindow() { window.print() } function S52_closeWindow() { window.close() } function S52_WindowUrlReload(a) { window.location = a; self.focus() } function S52_parentWindowUrlReload(a) { window.opener.location = a; self.focus() } function S52_openNonScrollingWindow(a, b, c, d) { var e = "location=no, scrollbars=no"; e += ", width=" + c; e += ", height=" + d; var f = window.open(a, b, e) } function S52_openPureWindow(a, b, c, d) { var e = "toolbars=no, menubar=no, location=no, scrollbars=no, resizable=no, status=no"; e += ", width=" + c; e += ", height=" + d; var f = window.open(a, b, e) } function S52_openFramelessWindow(a, b, c, d) { var e = "location=no, scrollbars=yes"; e += ", width=" + c; e += ", height=" + d; var f = window.open(a, b, e); f.focus() } function UnitOfSaleDecrement(a, b) { var c; var d; if (IsNumeric(document.getElementById(b).value)) { c = parseInt(document.getElementById(b).value) } else { c = 1 } if (document.getElementById(a).value == "") { q = c } else { if (IsNumeric(document.getElementById(a).value)) { d = parseInt(document.getElementById(a).value); if (d > c) { d -= c } q = Math.ceil(d / c) * c } else { q = c } } document.getElementById(a).value = q } function UnitOfSaleIncrement(a, b) { var c; var d; if (IsNumeric(document.getElementById(b).value)) { c = parseInt(document.getElementById(b).value) } else { c = 1 } if (document.getElementById(a).value == "") { q = c } else { if (IsNumeric(document.getElementById(a).value)) { d = parseInt(document.getElementById(a).value); q = Math.ceil(d / c) * c; q += c } else { q = c } } document.getElementById(a).value = q } function UnitOfSaleDecrementSubmit(a, b, c, d, e) { var f; var g; if (IsNumeric(document.getElementById(e).value)) { f = parseInt(document.getElementById(e).value) } else { f = 1 } if (document.getElementById(a).value == "") { q = f } else { if (IsNumeric(document.getElementById(a).value)) { g = parseInt(document.getElementById(a).value); if (g > f) { g -= f } q = Math.ceil(g / f) * f } else { q = f } } document.getElementById(a).value = q; var h = document.getElementById("row"); if (h != null) { var i = document.getElementById("quickorderentry-row"); if (i != null) { i.value = h.value } } var j = document.getElementById(b); if (j != null) { j.value = c; var k = document.getElementById(d); if (k != null) { k.submit() } } } function UnitOfSaleIncrementSubmit(a, b, c, d, e) { var f; var g; if (IsNumeric(document.getElementById(e).value)) { f = parseInt(document.getElementById(e).value) } else { f = 1 } if (document.getElementById(a).value == "") { q = f } else { if (IsNumeric(document.getElementById(a).value)) { g = parseInt(document.getElementById(a).value); q = Math.ceil(g / f) * f; q += f } else { q = f } } document.getElementById(a).value = q; var h = document.getElementById("row"); if (h != null) { var i = document.getElementById("quickorderentry-row"); if (i != null) { i.value = h.value } } var j = document.getElementById(b); if (j != null) { j.value = c; var k = document.getElementById(d); if (k != null) { k.submit() } } } function OnBlurSubmit(a, b, c, d, e) { var f = document.getElementById(a); var g = document.getElementById("row"); if (g != null) { var h = document.getElementById("quickorderentry-row"); if (h != null) { h.value = g.value } } if (f != null) { var i = document.getElementById(c); if (i != null) { i.value = d; var j = document.getElementById(e); if (j != null) { j.submit() } } } } function DecrementSubmit(a, b, c, d) { if (document.getElementById(a).value == "") { q = 1 } else { if (IsNumeric(document.getElementById(a).value)) { q = parseInt(document.getElementById(a).value); if (q > 1) { q -= 1 } } else { q = 1 } } document.getElementById(a).value = q; var e = document.getElementById("row"); if (e != null) { var f = document.getElementById("quickorderentry-row"); if (f != null) { f.value = e.value } } var g = document.getElementById(b); if (g != null) { g.value = c; var h = document.getElementById(d); if (h != null) { h.submit() } } } function IncrementSubmit(a, b, c, d) { if (document.getElementById(a).value == "") { q = 1 } else { if (IsNumeric(document.getElementById(a).value)) { q = parseInt(document.getElementById(a).value); q += 1 } else { q = 1 } } document.getElementById(a).value = q; var e = document.getElementById("row"); if (e != null) { var f = document.getElementById("quickorderentry-row"); if (f != null) { f.value = e.value } } var g = document.getElementById(b); if (g != null) { g.value = c; var h = document.getElementById(d); if (h != null) { h.submit() } } } function Decrement(a) { if (document.getElementById(a).value == "") { q = 1 } else { if (IsNumeric(document.getElementById(a).value)) { q = parseInt(document.getElementById(a).value); if (q > 1) { q -= 1 } } else { q = 1 } } document.getElementById(a).value = q } function Increment(a) { if (document.getElementById(a).value == "") { q = 1 } else { if (IsNumeric(document.getElementById(a).value)) { q = parseInt(document.getElementById(a).value); q += 1 } else { q = 1 } } document.getElementById(a).value = q } function IsNumeric(a) { var b = "0123456789"; var c = true; var d; for (i = 0; i < a.length && c == true; i++) { d = a.charAt(i); if (b.indexOf(d) == -1) { c = false } } return c } function S52_openPreviewWindow(a, b, c, d) { var e = "location=no, scrollbars=no"; e += ", width=" + c; e += ", height=" + d; var f = window.open(a, b, e); f.focus() }
