/**
 * Validates that a attribute value has been selected onsubmit (if attr is present)
 * @return bool
 **/
function validateForm(error_msg) {
        if (document.getElementById('select_attribute')) {
                var select_attr = document.getElementById('select_attribute');
                if (select_attr.value == '') {
                        alert(error_msg);
                        return false;
                } else return true;
        }
        return true;

}

