/*****************************************
* Open links in new window Script- By spk100 (spk100@yahoo.com)
* Script featured on/available at Dynamic Drive- http://www.dynamicdrive.com/
* Modified by DD. This notice must stay intact for use
*
* Modified by Jason Spieth
*****************************************/

/****************************************
* Name			hyperlinks
*
* Description	Processes each link on the
*               given page.  Links that go
*               offsite open in new windows
*
* Input			n/a
* Output		n/a
****************************************/
function hyperlinks()
{
    //set the location for a new window
	where = "_blank";

    // process each link on the page
	for (var i=0; i<=(document.links.length-1); i++)
	{
		// Check each link.  If the link is in our domain
		// or if the link is not an http link, open it in
		// the current window.  On the comparison operators
		// a value of -1 indicates not found
		if ( ((document.links[i].hostname.indexOf("nowplayingpodcast.com") == -1) ||
		      (document.links[i].href.indexOf("nowplayingpodcast.com")     == -1) )
		      &&
		      (document.links[i].href.indexOf("http:") != -1)
		   )
	    {
          document.links[i].target = "_blank"	    
	    }
	    else
	    {
          document.links[i].target = "_self"	    	    
	    }
	}
}

window.onload=hyperlinks

// turn button on
function ActiveButton(imgName)  
{
imgOn = eval(imgName + "_on.src");
document[imgName].src = imgOn;
}  

// turn button off
function InactiveButton(imgName) 
{
imgOff = eval(imgName + "_off.src");
document[imgName].src = imgOff;
} 