I have two different js files, namely validate1.js and validate2.js, each have their own function call validate1() and validate2(), then I include them in the header, so it looks like this:
<head><title>input coordinates</title>
<script src = "validate1.js" type="text/javascript"></script>...