function showResult(url) {
  var result = document.getElementById('result');
  var tmp = url;
  tmp = tmp.replace(/^\s+|\s+$/g, ""); // trim leading and trailing spaces
  tmp = tmp.replace(/[_|\s]+/g, "-"); // change all spaces and underscores to a hyphen
  tmp = tmp.replace(/[^a-z0-9-]+/g, ""); // remove all non-alphanumeric characters except the hyphen
  url = tmp;
  if(url.length > 4){
    if(url.match(/^(http|ftp)/)){
	  result.innerHTML = "<a href='"+url+"'>"+url+"</a>";
    }else{
	  result.innerHTML = "<a href='http://"+url+"'>http://"+url+"</a>";
    }
  }else{
    result.innerHTML = "Please continue to enter your url . . .";
  }
}