<!-- //
function stopErrors() { return true; }
window.onerror = stopErrors;


if (parent.frames.length > 0) {
    parent.location.href = self.document.location
}


//pre loader
newimage0 = new Image();
newimage0.src = "images/news_on.png";
newimage1 = new Image();
newimage1.src = "images/artists_on.png";
newimage2 = new Image();
newimage2.src = "images/radio_on.png";
newimage3 = new Image();
newimage3.src = "images/mp3s_on.png";
newimage4 = new Image();
newimage4.src = "images/shows_on.png";
newimage5 = new Image();
newimage5.src = "images/store_on.png";
newimage6 = new Image();
newimage6.src = "images/forum_on.png";


function reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.pgW=innerWidth; document.pgH=innerHeight; onresize=reloadPage; }}
  else if (innerWidth!=document.pgW || innerHeight!=document.pgH) location.reload();
}
reloadPage(true);

function breadcrumbs(){
  sURL = new String;
  bits = new Object;
  var x = 0;
  var stop = 0;
  var output = "<a href=\"/index.php\"><strong>HOME:</strong></a>  ";
  sURL = location.href;
  sURL = sURL.slice(8,sURL.length);
  chunkStart = sURL.indexOf("/");
  sURL = sURL.slice(chunkStart+1,sURL.length)
  while(!stop){
    chunkStart = sURL.indexOf("/");
    if (chunkStart != -1){
      bits[x] = sURL.slice(0,chunkStart)
      sURL = sURL.slice(chunkStart+1,sURL.length);
    }else{
      stop = 1;
    }
    x++;
  }
  for(var i in bits){
    output += "";
    for(y=1;y<x-i;y++){
      output += "";
    }
    output += bits[i] + "</a>  <strong>&raquo;</strong>  ";
  }
  document.write(output + document.title);
}
 

/*************************************************************************
  This code is from Dynamic Web Coding at http://www.dyn-web.com/
  Copyright 2002-4 by Sharon Paine 
  See Terms of Use at http://www.dyn-web.com/bus/terms.html
  regarding conditions under which you may use this code.
  This notice must be retained in the code as is!
*************************************************************************/

/*
  dw_rolltip.js   version date: Feb 2004  
  requires dw_viewport.js
  algorithm for time-based animation from youngpup.net
*/

var RollTip = {
  offX: 12,
  offY: 12,
  ID: "rolltipDiv",
  aniLen: 300,  // duration of clipping animation
  ready: false,
  t1: null,
  t2: null,
  tip: null,
  
  init: function() {
    if ( document.createElement && document.body && 
        typeof document.body.appendChild != "undefined" && !window.opera ) {
      var el = document.createElement("DIV");
      el.className = "rolltip"; el.id = this.ID;
      document.body.appendChild(el);
      this.mult = el.offsetWidth/this.aniLen/this.aniLen;	
      el.style.clip = "rect(0, 0, 0, 0)";
      el.style.visibility = "visible";
      this.ready = true;
    }
  },

  reveal: function(msg, e) {
    if (this.t1) clearTimeout(this.t1);	if (this.t2) clearTimeout(this.t2); 
    this.tip = document.getElementById( this.ID );
    this.writeTip(""); // for mac ie 
    this.writeTip(msg);
    viewport.getAll();
    this.w = this.tip.offsetWidth; this.h = this.tip.offsetHeight;
    this.startTime = (new Date()).getTime();
    this.positionTip(e);
    this.t1 = setInterval("RollTip.rollOut()", 10);
  },
  
  rollOut: function() {
    var elapsed = (new Date()).getTime() - this.startTime;
  	if (elapsed < this.aniLen) {
  		var cv = this.w - Math.round( Math.pow(this.aniLen - elapsed, 2) * this.mult );
  		this.clipTo(0, cv, this.h, 0);
  	} else {
      this.clipTo(0, this.w, this.h,0);
      clearInterval(this.t1);
    }
  },
  
  conceal: function() {
  	if (this.t1) clearInterval(this.t1);	if (this.t2) clearInterval(this.t2);
  	this.startTime = (new Date()).getTime();
  	this.t2 = setInterval("RollTip.rollUp()", 10);
  },
  
  rollUp: function() {
  	var elapsed = (new Date()).getTime() - this.startTime;
  	if ( elapsed < this.aniLen ) {
  		var cv = Math.round( Math.pow(this.aniLen - elapsed, 2) * this.mult );
  		this.clipTo(0, cv, this.h, 0);
  	} else {
      this.clipTo(0, 0, this.h, 0);
      clearInterval(this.t2);
      this.tip = null;
    }  
  },
  
  writeTip: function(msg) {
    if ( this.tip && typeof this.tip.innerHTML != "undefined" ) this.tip.innerHTML = msg;
  },
  
  clipTo: function(top, rt, btm, lft) {
    this.tip.style.clip = "rect("+top+"px, "+rt+"px, "+btm+"px, "+lft+"px)";
  },
  
  positionTip: function(e) {
    var x = e.pageX? e.pageX: e.clientX + viewport.scrollX;
    var y = e.pageY? e.pageY: e.clientY + viewport.scrollY;
    if ( x + this.tip.offsetWidth + this.offX > viewport.width + viewport.scrollX )
      x = x - this.tip.offsetWidth - this.offX;
    else x = x + this.offX;
  
    if ( y + this.tip.offsetHeight + this.offY > viewport.height + viewport.scrollY )
      y = ( y - this.tip.offsetHeight - this.offY > viewport.scrollY )? y - this.tip.offsetHeight - this.offY : viewport.height + viewport.scrollY - this.tip.offsetHeight;
    else y = y + this.offY;

    this.tip.style.left = x + "px"; this.tip.style.top = y + "px";
  }

}

var imageHandler = { 
  imgs:[], path:"", preload:function() { for(var i=0;arguments[i];i++) {
    var img=new Image(); img.src=this.path+arguments[i]; this.imgs[this.imgs.length]=img;}}
}

/***********************************************************/

var viewport = {
  getWinWidth: function () {
    this.width = 0;
    if (window.innerWidth) this.width = window.innerWidth - 18;
    else if (document.documentElement && document.documentElement.clientWidth) 
  		this.width = document.documentElement.clientWidth;
    else if (document.body && document.body.clientWidth) 
  		this.width = document.body.clientWidth;
  },
  
  getWinHeight: function () {
    this.height = 0;
    if (window.innerHeight) this.height = window.innerHeight - 18;
  	else if (document.documentElement && document.documentElement.clientHeight) 
  		this.height = document.documentElement.clientHeight;
  	else if (document.body && document.body.clientHeight) 
  		this.height = document.body.clientHeight;
  },
  
  getScrollX: function () {
    this.scrollX = 0;
  	if (typeof window.pageXOffset == "number") this.scrollX = window.pageXOffset;
  	else if (document.documentElement && document.documentElement.scrollLeft)
  		this.scrollX = document.documentElement.scrollLeft;
  	else if (document.body && document.body.scrollLeft) 
  		this.scrollX = document.body.scrollLeft; 
  	else if (window.scrollX) this.scrollX = window.scrollX;
  },
  
  getScrollY: function () {
    this.scrollY = 0;    
    if (typeof window.pageYOffset == "number") this.scrollY = window.pageYOffset;
    else if (document.documentElement && document.documentElement.scrollTop)
  		this.scrollY = document.documentElement.scrollTop;
  	else if (document.body && document.body.scrollTop) 
  		this.scrollY = document.body.scrollTop; 
  	else if (window.scrollY) this.scrollY = window.scrollY;
  },
  
  getAll: function () {
    this.getWinWidth(); this.getWinHeight();
    this.getScrollX();  this.getScrollY();
  }
  
}

/*******************************************************/

function showRollTip(msg, e) {
  if ( typeof RollTip == "undefined" || !RollTip.ready ) return;
  RollTip.reveal(msg, e);
}

function hideRollTip() {
  if ( typeof RollTip == "undefined" || !RollTip.ready ) return;
  RollTip.conceal();
}


/*********** BEGIN UNBLUR ALL LINKS ***************/

function unblur() {
this.blur();
}

function blurLinks() {
if (!document.getElementById) return;
theLinks = document.getElementsByTagName("a");
for(i=0; i<theLinks.length; i++) {
theLinks[i].onfocus = unblur;
}
}

/*********** BEGIN SHOW/HIDE CONTENT ***************/

var enablepersist="on" //Enable saving state of content structure using session cookies? (on/off)
var collapseprevious="yes" //Collapse previously open content when opening present? (yes/no)

var expandsymbol='<img src="pics/openclose1.gif" />&nbsp;&nbsp;&nbsp;' 
/*HTML for expand symbol. For image, use: <img src="whatever.gif">*/
var contractsymbol='<img src="pics/openclose2.gif" />&nbsp;&nbsp;&nbsp;' 
/*HTML for contract symbol.*/

if (document.getElementById){
document.write('<style type="text/css">')
document.write('.switchcontent{display:none;}')
document.write('</style>')
}

function getElementbyClass(rootobj, classname){
var temparray=new Array()
var inc=0
var rootlength=rootobj.length
for (i=0; i<rootlength; i++){
if (rootobj[i].className==classname)
temparray[inc++]=rootobj[i]
}
return temparray
}

function sweeptoggle(ec){
var thestate=(ec=="expand")? "block" : "none"
var inc=0
while (ccollect[inc]){
ccollect[inc].style.display=thestate
inc++
}
revivestatus()
}


function contractcontent(omit){
var inc=0
while (ccollect[inc]){
if (ccollect[inc].id!=omit)
ccollect[inc].style.display="none"
inc++
}
}

function expandcontent(curobj, cid){
var spantags=curobj.getElementsByTagName("SPAN")
var showstateobj=getElementbyClass(spantags, "showstate")
if (ccollect.length>0){
if (collapseprevious=="yes")
contractcontent(cid)
document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="block")? "block" : "none"
if (showstateobj.length>0){ //if "showstate" span exists in header
if (collapseprevious=="no")
showstateobj[0].innerHTML=(document.getElementById(cid).style.display=="block")? contractsymbol : expandsymbol
else
revivestatus()
}
}
}

function revivecontent(){
contractcontent("omitnothing")
selectedItem=getselectedItem()
selectedComponents=selectedItem.split("|")
for (i=0; i<selectedComponents.length-1; i++)
document.getElementById(selectedComponents[i]).style.display="block"
}

function revivestatus(){
var inc=0
while (statecollect[inc]){
if (ccollect[inc].style.display=="block")
statecollect[inc].innerHTML=contractsymbol
else
statecollect[inc].innerHTML=expandsymbol
inc++
}
}

function get_cookie(Name) { 
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { 
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function getselectedItem(){
if (get_cookie(window.location.pathname) != ""){
selectedItem=get_cookie(window.location.pathname)
return selectedItem
}
else
return ""
}

function saveswitchstate(){
var inc=0, selectedItem=""
while (ccollect[inc]){
if (ccollect[inc].style.display=="block")
selectedItem+=ccollect[inc].id+"|"
inc++
}

document.cookie=window.location.pathname+"="+selectedItem
}

function do_onload(){
uniqueidn=window.location.pathname+"firsttimeload"
var alltags=document.all? document.all : document.getElementsByTagName("*")
ccollect=getElementbyClass(alltags, "switchcontent")
statecollect=getElementbyClass(alltags, "showstate")
if (enablepersist=="on" && ccollect.length>0){
document.cookie=(get_cookie(uniqueidn)=="")? uniqueidn+"=1" : uniqueidn+"=0" 
firsttimeload=(get_cookie(uniqueidn)==1)? 1 : 0 //check if this is 1st page load
if (!firsttimeload)
revivecontent()
}
if (ccollect.length>0 && statecollect.length>0)
revivestatus()
}

if (window.addEventListener)
window.addEventListener("load", do_onload, false)
else if (window.attachEvent)
window.attachEvent("onload", do_onload)
else if (document.getElementById)
window.onload=do_onload

if (enablepersist=="on" && document.getElementById)
window.onunload=saveswitchstate

// -->
