function empty_field(field){
	$(field).attr("value", "");
}

function substr( f_string, f_start, f_length ) {
    f_string += '';
    if(f_start < 0) {
        f_start += f_string.length;
    }

    if(f_length == undefined) {
        f_length = f_string.length;
    } else if(f_length < 0){
        f_length += f_string.length;
    } else {
        f_length += f_start;
    }

    if(f_length < f_start) {
        f_length = f_start;
    }

    return f_string.substring(f_start, f_length);
}

$(document).ready(function(){
    $('table#list_authors tr td input.set_type').click(function(){
        var id_tmp = $(this).attr("id");
        var id = id_tmp.split("_");
        var is_edit = $(this).val();
        window.location = "index.php?section=author&action=set_type&id=" + id[1] + "&val=" + is_edit;
    });
    
});

