function hoverImage(img,text,imgobj){
	$('legend').innerHTML = text;
	imgobj.src=img;
	imgobj.className = 'band_image_active';
}


var currentThumb = null;
var lastClassnames = null;

function addClassName (id, classname) {
	var e;   
	if (typeof(id) == 'string') {
		e = $(id);
	}    
	else {
		e = id;
	}   
	if (!e || typeof e.className != 'string') {      
		throw "Cannot add class to element " + id;   
	}   
	if (!e.className.match(new RegExp('\\b' + classname + '\\b'))){
		e.className += ' ' + classname;
	}
}


function setImgActive(imgObj){
	if(currentThumb===null){
		currentThumb = $('thumb_1');
		lastClassnames = '';
	}
	if(currentThumb){
		currentThumb.className = lastClassnames;
	}
	currentThumb = $(imgObj.id);
	lastClassnames = currentThumb.className;
	addClassName(imgObj.id,'activeThumb');
	//currentThumb.addClassName(imgObj,'activeThumb');
}


function $(i){
	return document.getElementById(i);
}
