var w3c=document.getElementById;
var ie45=document.all;
var p_txt, p_cnt=0;
window.onload=function() {
  if (w3c||ie45) {
    var phone=(w3c)?document.getElementById("phonein"):document.all["phonein"];
    p_txt=(w3c)?phone.firstChild.nodeValue:phone.innerHTML;
    if (ie45) {
      var phoni="";
      for (var i=0; i<p_txt.length; i++) phoni+='<sp'+'an id="phon'+i+'">'+p_txt.charAt(i)+'</'+'span>';
      phone.innerHTML=phoni;
    } else {
      while (phone.childNodes.length) phone.removeChild(phone.childNodes[0]);
      for (var i=0; i<p_txt.length; i++) {
        var phoni=document.createElement("span");
        phoni.setAttribute("id", "phon"+i);
        phoni.appendChild(document.createTextNode(p_txt.charAt(i)));
        phone.appendChild(phoni);
      }
    }
    p_cnt=p_txt.length-1;
    phone=setInterval ("phon1()", speed);
  }
}
function phon1() {
  var p_ct=p_cnt%p_txt.length;
  var p_tmp=(w3c)?document.getElementById("phon"+p_ct):document.all["phon"+p_ct];
  p_tmp.style.backgroundColor=bgcolour;
  p_tmp.style.fontWeight="normal";
  p_ct=++p_cnt%p_txt.length;
  p_tmp=(w3c)?document.getElementById("phon"+p_ct):document.all["phon"+p_ct];
  p_tmp.style.fontWeight="bold";
  if (((w3c)?p_tmp.firstChild.nodeValue:p_tmp.innerHTML)!=" ") p_tmp.style.backgroundColor=hlcolour;
}
//  End -->

//-- STEP TWO: Copy this code into the BODY of your HTML document  --
//<span id="phonein">555-123-4567</span>

