yes :
--
get the input string :
tel_number = document.formname.textboxname.value
is there a - at the 4th place ?
tel_number.charAt(3)=="-"
are the 3 first chars numbers ?
isNan(ParseInt(tel_number.substring(0,3),10))
are the 4 last char numbers ?
isNan(ParseInt(tel_number.substring(4,7),10))
--
so your function will look like :
function validate_phone_number(){
var tel_number = document.formname.textboxname.value
if (tel_number.charAt(3)=="-" && !isNan(ParseInt(tel_number.substring(0,3),10)) && !isNan(ParseInt(tel_number.substring(4,7),10))) {
alert("ok this is correct"

return true
}
else {
alert("the phone number format is not correct"

return false
}
}
--
call the function with :
<form=formname onsubmit="javascript:return validate_phone_number()">
please enter your phone number : <input type=text name=textboxname>
</form>
--
let me know if this works !
note : you can do this with a regular expression as well, but it's a bit heavy only to validate a phone number !