function validatePhone(txtPhone) {
var a = document.getElementById(txtPhone).value;
var filter = /^((+[1-9]{1,4}[ -]*)|(([0-9]{2,3})[ -]*)|([0-9]{2,4})[ -]*)*?[0-9]{3,4}?[ -]*[0-9]{3,4}?$/;
if (filter.test(a)) {
return true;
}
else {
return false;
}
}