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;
}

sfHover = function() {

	var sfEls = document.getElementById("navs").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}

if (window.attachEvent) window.attachEvent("onload",sfHover);


