-var limit = document.getElementById('limit');
-var span = document.getElementById('span_limit');
-var old_limit = 0;
+var limit = document.getElementById('limit');
+var span = document.getElementById('span_limit');
+var limited_no = document.getElementById('limited_no');
+var limited_yes = document.getElementById('limited_yes');
-function FocusLimitedNo () {
+var old_limit = 0;
+
+function focusLimitedNo () {
if ((limit.value > 0) && (limit.value != '-')) {
old_limit = limit.value;
}
+ limited_no.focus();
+ limited_yes.blur();
limit.disabled = true;
limit.setAttribute('class', 'disabled');
- limit.style.textAlign = 'center';
limit.value = '-';
+ return true;
}
-function FocusLimitedYes () {
+function focusLimitedYes () {
limit.disabled = false;
limit.setAttribute('class', 'form_field');
limit.style.textAlign = 'left';
limit.value = '';
}
limit.focus();
+ return true;
+}
+
+function changeLimited () {
+ if ((limit.value == '') || (limit.value == 0)) {
+ focusLimitedNo();
+ }
+ return true;
+}
+
+function focusLimit () {
+ limited_yes.focus();
+ limited_no.blur();
+ limit.focus();
+ if (limit.value == '-') {
+ limit.value = '';
+ }
+ return true;
+}
+
+function blurLimit () {
+ if ((limit.value == '') || (limit.value == 0)) {
+ limit.value = '-';
+ }
+ return true;
}
-function SubmitForm () {
+function submitForm () {
if (limit.value == '-') {
limit.value = 0;
}
return true;
}
-function ResetForm () {
+function resetForm () {
old_limit = 0;
- FocusLimitedNo();
+ focusLimitedNo();
return true;
}
-FocusLimitedNo();
+focusLimitedNo();