// Javascript for all forms

function getText(object) {
    return escape(object.value)
}

function getOption(object) {
    return escape(object.options[object.selectedIndex].text);
}

function getRadio(object) {
    for (var i = 0; i < object.length; i++)
         if (object[i].checked)
             return object[i].value;

    return '';
}

function getCheckboxes() {
    var output = '';
    for (var i = 0; i < getCheckboxes.arguments.length; i++)
         output += getCheckbox(getCheckboxes.arguments[i]) + escape(' ');
    return output;
}

function getCheckbox(object) {
    if (object.checked)
        return escape(object.value);
    else
        return '';
}

