submit_to_remote and javascript

Hi

   I have a submit_to_remote

<%= submit_to_remote 'save_btn', 'Save', :url => {:controller =>
'service_desk', :action => 'sd_resolution_save', :id => @sd_ticket.id,
:sd_resolution_id => @sd_resolution_id, :page => params[:page] }%>

But before submiting this I have to call a javascript for form
validation ..How can I do this..For example suppose

<script type="text/javascript">

  function check1()
  {
    alert('text');
  }
</script>

HOW CAN I CALL THIS?

Sijo