function getParentWithClass(el,wantedClass) {
  while (el != null) {
    if (el.className != null && el.className == wantedClass)
      return el;
    el = el.parentNode;
  }
  return null
}

function textBoxResize() {
  var textBox = document.getElementById('probtext');
  var colHolder = getParentWithClass(textBox,'leftcol');
  while (textBox.offsetWidth>(colHolder.offsetWidth-15)) {
    textBox.size = textBox.size - 1
  }
}

function dmPopup(bandname) {
  var intX = (screen.availWidth/2)-308;
  var intY = (screen.availHeight/2)-260;
  window.open('http://downloads.7digitalmedia.com/downloads/'+bandname+'/default.asp?partner=86','7digi','top='+intY+',left='+intX+',width=615,height=480,scrollbars=no')
}

function wtbPopup() {
  var intX = (screen.availWidth/2)-100;
  var intY = (screen.availHeight/2)-150;
  window.open('http://www.thirdspacemedia.com/mzone/ts_sidebar1.cfm?mid=2&refident=BREEDF','wtb','top='+intY+',left='+intX+',width=200,height=300,scrollbars=no')
}

function rlPopup() {
  var intX = (screen.availWidth/2)-245;
  var intY = (screen.availHeight/2)-204;
  window.open('http://217.154.142.20/videos/index-new.php?a=1&popUpBandName=Razorlight&popUpThirdPartyName=Rock+Midgets&viceVersaCode=UMGUK0293-3650&action=showImage&id=O10680I10692O10752R10668','1270','top='+intY+',left='+intX+',width=490,height=408,scrollbars=no')
}

function effectsInit() {
  if (document.getElementById)
    fillHeightInit();
  if (document.getElementsByTagName) {
    textBoxResize();
    mouseOverInit();
    externalLinksInit();
    autoExternalLinks('www.rockmidgets.com')
  }
  /*wtbPopup();*/
  /*dmPopup('bitchalert')*/
}
window.onload = effectsInit