var mariaForm_fieldBase = function (id,formData) {

    /*
        generic getter and setter
    */
    this.getValue = function () {
        return $("#"+id).val();
    }
    
    this.setValue = function (newVal) {
        $("#"+id).val(newVal);
    }
    
    /*
        generic property-setter
    */
    this.setDisabled = function (newVal) {
        $('#'+id).attr('disabled',newVal);
    };
    
    this.setDefaultValue = function (newVal) {
        if (formData.fields[id].defaultValue == this.getValue())
            this.setValue(newVal);
        formData.fields[id].defaultValue = newVal;
    };
    
    this.setHidden = function (newVal) {
        var elem = $("#"+id);
        
        if (elem.css("display") == "none" && newVal === false){
            elem.show();
            $("#mariaForm_labelFor"+id).show();
        }
        
        if (elem.css("display") != "none" && newVal === true) {
            elem.hide();
            $("#mariaForm_labelFor"+id).hide();
        }
    };
    
}
