function addLoadEvent(func) {
  // this function allows multiple onload method calls to be made;
  var oldOnload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldOnload();
      func();
    }
  }
}

function housekeeping() {
  // exit the function if it's an old browser that doesn't support the DOM core;
  if (!document.getElementsByTagName) return false;
  if (!document.getElementById) return false;

  var links = document.getElementsByTagName("a");
  for (var i = 0; i < links.length; i++) {
    links[i].onfocus = function() {
      if(this.blur)this.blur();
    }
  }

  if (!document.getElementById("sponsors")) return false;
  var sponsors = document.getElementById("sponsors");
  var links2 = sponsors.getElementsByTagName("a");
  if (links2.length > 0) {
    for (var j = 0; j < links2.length; j++) {
      links2[j].onclick = function() {
        this.target='_blank';
      }
    }
  } else {
    return false;
  }
}

addLoadEvent(housekeeping);

function parseNews(div) {

  if (div == 'desc1-short') {
    document.getElementById('desc1-short').style.display = "none";
    document.getElementById('desc1-long').style.display = "block";
  } else if (div == 'desc1-long') {
    document.getElementById('desc1-short').style.display = "block";
    document.getElementById('desc1-long').style.display = "none";
  } else if (div == 'desc2-short') {
    document.getElementById('desc2-short').style.display = "none";
    document.getElementById('desc2-long').style.display = "block";
  } else if (div == 'desc2-long') {
    document.getElementById('desc2-short').style.display = "block";
    document.getElementById('desc2-long').style.display = "none";
  }

}

