function ID(id) {
  return document.getElementById(id);
}


//Similar to the php function of the same name but lacking a quote style option.
//Similar to but less complete that htmlentities
function htmlspecialchars(str) {
  return str.replace(/\&/g, "&amp;").replace(/\"/g, "&quot;").replace(/\</g, "&lt;").replace(/\>/g, "&gt;");
  /*
      '&' '&amp;'
      '"' '&quot;'
      '<' '&lt;'
      '>' '&gt;' 
  */
}

function CC(amt) {
  void window.open('cc?amt='+amt,'cc','width=580,height=500,scrollbars=yes,resizable=yes');
  return;
}