// This JavaScript will horizontally center an img or embed inside div#header by appending an inline style to the img/embed tag.

function adjustBannerMargin() {
    var he = new Array();
    var i, e, c, t, h;
    h = document.getElementById("banner");
    he.push(h);
    while (he.length > 0) {
  e = he.pop();
     t = e.tagName;
  if (t != null) {
   t = t.toLowerCase();
   if (t == "img" || t == "embed") {
    if(e.src.indexOf("banner") > -1 ) {
     e.style.marginLeft = ((h.clientWidth - e.clientWidth) / 2) + "px";
    }
   }
   c = e.childNodes.length;
   for (i = 0; i < c; i++) {
    he.push(e.childNodes[i]);
   }
  }
 }
}
