You just bind the keydown Event like you did then inside the function (autoLoad()) you check if the field has more then 3 chars, if it does then continue the script.
EDIT: I think this should work
function autoLoad() {
if (document.getElementById('autocomplete').value.length >= 3) {
// it has more then 3 chars
}
}