Just replace the javascript codeDisplay() function with this one
function codeDisplay(){
if(para=='p'){
para.removeChild(txt);
}
var code = 'Country Code is: ';
code = code + document.getElementById("country").value;
var para = document.createElement("p");
var phoneDiv = document.getElementById("phoneDisplay");
removeChildNodes(phoneDiv);
phoneDiv.appendChild(para);
var txt = document.createTextNode(code);
para.appendChild(txt);
para.appendChild(document.createElement('br'));
para.appendChild(document.createElement('br'));
var faxDiv = document.getElementById("faxDisplay");
removeChildNodes(faxDiv);
faxDiv.appendChild(para);
var txt = document.createTextNode(code);
para.appendChild(txt);
}