function hlt(obj, state) {
	if (!obj.onmouseout) {
		obj.onmouseout = function anon_unhlt() { hlt(obj, false); };
	}
	if (!state) {
		obj.style.backgroundColor = '#f8f6f7';
	} else {
		obj.style.backgroundColor = '#f8f6f7';
	}
}

function autodropbox(dropbox) {
	if (dropbox && dropbox.selectedIndex >= 0 && dropbox.options[dropbox.selectedIndex].value != '') {
		window.location = dropbox.options[dropbox.selectedIndex].value;
	}
}


function search_focus(textbox) {
	if (textbox && textbox.value == 'Artist search') {
		textbox.value = '';
	}
}

function search_blur(textbox) {
	if (textbox && textbox.value == '') {
		textbox.value = 'Artist search';
	}
}

function search_go(textbox) {
	if (!textbox) return false;
	if (textbox.value == '' || textbox.value == 'Artist search') {
		alert('You must enter a keyword to search on');
		textbox.focus();
		return false;
	}
	return true;
}

function limitchars(widget, len, event) {
	if (widget.value.length >= len) {
		widget.value = widget.value.substr(0, len);
		return false;
	}
	return true;
}

function show_props(obj) {
	var result = '';
	for (var i in obj) {
		result += '.' + i + ' = ' + obj[i] +'\n';
	}
	return result;
}

function gotoGenre(genre) {
	if (genre.length < 1) {
		return;
	} else if (genre == '-1') {
		location.href = '/onair.php';
	} else {
		location.href = '/'+genre;
	}
}

function wimpyPopPlayer(theFile,id,stuff) {
	window.open(theFile,id,stuff);
}
