I need to validate a form, everything is working, except for one part.

I need to validate that if "remail" field is not filled, then it checks if "rsms" field is filled.   

AND VICE VERSA (if "rsms" field is filled, then check if "remail" field is filled)  

If neither are filled, then return false, and alert that neither are filled.  

I also need to validate that if BOTH "remail" and "rsms" fields are filled, it returns false and also alerts that you can only have one field filled!

CODE I'M USING FOR OTHER FIELDS:

```
var x=document.forms["form"]["remail"].value;
if (x==null || x=="")
  {
  alert("The Receivers Email field must be filled out!");
  return false;
  }

```

Please help,  

Thanks,  

Chad.