if (top.window != window.self) top.location.href = window.location.href;

// From http://www.dustindiaz.com/top-ten-javascript/
function getElementsByClass(searchClass,node,tag) {
  var classElements = new Array();
  if (tag == null) tag = "*";
  if (node == null) node = "document";
  var els = (node).getElementsByTagName(tag);
  var elsLen = els.length;
  var pattern = new RegExp("(^|\\\\s)"+searchClass+"(\\\\s|$)");
  for (i = 0, j = 0; i < elsLen; i++) {
    if (pattern.test(els[i].className)) { classElements[j] = els[i]; j++; }
  }
  return classElements;
}