Well, there "quick and dirty" and then there's the "right way". Let's do Q&D first...
<!-- Javascript -->
<script language="javascript">
function FMark(){
document.forms['frm_mark'].test_field.style.borderColor = "#FF0000";
}
function FClear(){
document.forms['frm_mark'].test_field.style.borderColor = "#0066FF";
}
</script>
Leave your HTML the same.
Now as far as the "right way", you should use CSS for all presentational settings like borders. Create two classes - "normal" and "marked" would work - and create style rules for "input" like this...
input.normal {
border: 1px solid #0066FF;
}
input.marked {
border-color: #FF0000;
}
Your HTML should use the 'normal' class on the text box. Then use JavaScript to add the 'marked' class on click of the 'Mark' button and remove the 'marked' class on click of the 'Clear' button. You should also remove the click handlers from your HTML, give the two buttons unique ID's, and control these events from an external JS file unobtrusively. To make things really easy, I suggest using Prototype or jQuery.
If none of this makes sense or you really just want the *#$& thing to work, go ahead and use the first solution and be done with it. However, if you plan to do a lot of JavaScript, you should really start looking into unobtrusive DOM scripting.
http://en.wikipedia.org/wiki/Unobtrusive_JavaScript
Hope this helps...