// JavaScript Document
var currentConcert = null; // the program div currently displayed

// get the element that was clicked to raise the event
function getEventTarget(e) {
	// overcome browser differences (IE uses window.event, not e)
   e = e || window.event;
	
	// more browser differences (IE uses srcElement instead of target)
   return e.target || e.srcElement;
} // end getEventTarget

// display the program for the selected concert
function selectConcert( e )
{
	// get the element that was clicked (artist name in table)
	var target = getEventTarget( e );
	//var targetClass = target.className;

	var concertName = target.id.replace(/concert/, "");;
	changeConcertTo( concertName );
} // end selectProgram

// display the program for the given concert
function changeConcertTo( concertName )
{
	// get the div containing the artist's profile
	var program = document.getElementById(concertName);
	
	// swap the classes of the current profile with this profile
	var temp = program.className;
	program.className = currentConcert.className;
	currentConcert.className = temp;
	
	// set currentProfile to the new profile
	currentConcert = program;
} // end changeProfileTo