// Initializer
  function init() {
    if (arguments.callee.done) return;
    arguments.callee.done = true;
    //if (location.href.indexOf('www.')!=-1)
      //location.href = location.href.replace('www.', '');
    if (startRotation=='1')
      iRotate.init();
  }
  if (document.addEventListener) {
    document.addEventListener("DOMContentLoaded", init, false);
  }
  if (/WebKit/i.test(navigator.userAgent)) { // sniff
    var _timer = setInterval(function() {
        if (/loaded|complete/.test(document.readyState)) {
          clearInterval(_timer);
          init();
        }
    }, 10);
  }
  /*@cc_on @*/
  /*@if (@_win32)
  document.write("<script id=__ie_onload defer src=javascript:void(0)><\/script>");
  var script = document.getElementById("__ie_onload");
  script.onreadystatechange = function() {
    if (this.readyState == "complete") {
      init(); // call the onload handler
    }
  };
  /*@end @*/
  window.onload = init;

// Push Rotation
  var iRotate = function() {
    var pushes = new Array();
    currentPush = -1;
    var rotation;
    return {
      init: function() {
        iRotate.go();
        rotation = window.setInterval('iRotate.go()', 15000);
      },
      addPush: function(imageURL, linkURL, altText) {
        next = pushes.length;
        pushes[next] = { 'image': imageURL, 'link': linkURL, 'text': altText};
      },
      go: function() {
        pushElement = document.getElementById("providence-push");
        pushCount = pushes.length;
        useOld = 0;
        if (pushCount>1 && currentPush!=-1) useOld = 1;
        var nextPush = currentPush+1;
        if (nextPush>pushCount-1) nextPush = 0;
        try {
          document.getElementById("push-"+nextPush).style.zIndex = 2;
        } catch(e) {
          var pushA = document.createElement("a");
              pushA.setAttribute("href", pushes[nextPush]['link']);
              pushA.setAttribute("id", "push-"+nextPush);
              pushA.style.display = 'none';
              pushA.style.opacity = '0';
          var pushImg = document.createElement("img");
              pushImg.setAttribute("src", pushes[nextPush]['image']);
              pushImg.setAttribute("alt", pushes[nextPush]['text']);
              pushA.appendChild(pushImg);
              pushElement.appendChild(pushA);
        }
        try {
          deadPush = document.getElementById("push-"+lastPush);
          deadPush.style.display = 'none';
        } catch(e) {}
        if (useOld) {
          oldPush = document.getElementById("push-"+currentPush);
          oldPush.style.zIndex = 1;
        }
        newPush = document.getElementById("push-"+nextPush);
        newPush.style.zIndex = 2;
        setOpacity(newPush, 0);
        fadeIn("push-"+nextPush, 0);
        newPush.style.display = 'block';
        lastPush = currentPush;
        currentPush = nextPush;
      }
    }
  }();

function setOpacity(obj, opacity) {
  opacity = (opacity==100)?99.999:opacity;
  obj.style.filter = "alpha(opacity:"+opacity+")";
  obj.style.KHTMLOpacity = opacity/100;
  obj.style.MozOpacity = opacity/100;
  obj.style.opacity = opacity/100;
}
function fadeIn(objId,opacity) {
  if (document.getElementById) {
    obj = document.getElementById(objId);
    if (opacity<=100) {
      setOpacity(obj, opacity);
      opacity+= 5;
      window.setTimeout("fadeIn('"+objId+"',"+opacity+")", 50);
    }
  }
}