Try this
str = $("shipping_tel").value;
//This regular expression checks the string.
var patt=/[0-9]{8,}/g; //atleast 8 nums long.
if(patt.exec(str)!=str){
ErrorMsg = " - Shipping Address: Phone Number\n";
$("shipping_tel_label").className = 'hilight';
}else{
$("shipping_tel_label").className = 'lolight';
}