function presentFlash(flashSource, bgColor, width, height, wmode, flashVars) {
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+ width +'" height="'+ height +'" id="'+ flashSource +'" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain">');
	document.write('<param name="movie" value="/images/'+ flashSource +'.swf">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="bgcolor" value="'+ bgColor +'">');
	document.write('<param name="menu" value="false">');
	document.write('<param name="wmode" value="'+ wmode +'">');
	document.write('<param name="flashvars" value="'+ flashVars +'">');
	document.write('<embed src="/images/'+ flashSource +'.swf" flashvars="'+ flashVars +'" menu="false" wmode="'+ wmode +'" quality="high" bgcolor="'+ bgColor +'" width="'+ width +'" height="'+ height +'" name="'+ flashSource +'" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">');
	document.write('</object>');
}

function openMusicStore() {
	musicStore = window.open("/sections/musicStore/musicStore.htm", "musicStore", "menubar=no,scrollbars=no,resizable=no,width=768px,height=576px");
}

function openListener() {
	listenLive = window.open("http://den-a.plr.liquidcompass.net/ind-wwcd-plr/audio_player.php?id=WWCDFM", "listenLive","menubar=no,scrollbars=no,resizable=no,width=700px,height=420px");
}

dropMenus = new Array('onAir','theLounge','events','picturePages','media','social','diningGuide','business');

function dropShow(menu) {
  if (document.all) {
    document.all.menus.style.visibility = 'visible';
    document.all[menu].style.visibility = 'visible';
  } else if (document.getElementById) {
    document.getElementById('menus').style.visibility = 'visible';
    document.getElementById(menu).style.visibility = 'visible';
  }
  dropHide(menu);
}

function dropHide(openMenu) {
  for (n=0; n<dropMenus.length; n++) {
    if (dropMenus[n] != openMenu) {
      if (document['nav'].TCurrentLabel('_root/'+dropMenus[n]) == 'mouseOver') {
		document['nav'].TGotoLabel('_root/'+dropMenus[n], 'mouseOut');
	 }  
      if (document.all) {
        document.all[dropMenus[n]].style.visibility = 'hidden';
        document.all.menus.style.visibility = 'hidden';
      } else if (document.getElementById) {
        document.getElementById(dropMenus[n]).style.visibility = 'hidden';
        document.getElementById('menus').style.visibility = 'hidden';
      }
    }
  }
}

function rollOver(button) {
  if (document.all) {
    document.all[button].className = 'navOver';
  } else if (document.getElementById) {
    document.getElementById(button).className = 'navOver';
  }
}

function rollOut(button) {
  if (document.all) {
    document.all[button].className = 'navOut';
  } else if (document.getElementById) {
    document.getElementById(button).className = 'navOut';
  }
}

function contentResize() {
  if (document.all) {
    document.all.fullBody.style.left = (document.body.clientWidth/2)-496+"px";
    document.all.fullBody.style.height = document.body.clientHeight+"px";
    document.all.fullBody.style.width = (document.body.clientWidth/2)+496+"px";
    if (document.body.clientHeight > parseFloat(document.all.content.offsetHeight)+parseFloat(document.all.footer.offsetHeight)+125) {
      document.all.contentBg.style.height = document.body.clientHeight-(parseFloat(document.all.footer.offsetHeight)+125)+"px";
    } else {
      document.all.contentBg.style.height = "auto";
    }
  } else if (document.getElementById) {
    document.getElementById('fullBody').style.left = (window.innerWidth/2)-496+"px";
    document.getElementById('fullBody').style.height = window.innerHeight+"px";
    document.getElementById('fullBody').style.width = (window.innerWidth/2)+496+"px";
    if (document.body.clientHeight > parseFloat(document.getElementById('content').offsetHeight)+parseFloat(document.getElementById('footer').offsetHeight)+125) {
      document.getElementById('contentBg').style.height = window.innerHeight-(parseFloat(document.getElementById('footer').offsetHeight)+125)+"px";
    } else {
      document.getElementById('contentBg').style.height = "auto";
    } 
  }
}

window.onresize = contentResize;
