
function popupText(event, text, style) {

	var box = document.createElement('div');
	box.style.position = 'absolute';
	box.style.width = '200px';
	box.style.height = '150px';
	box.style.top = Event.pointerY(event) + 'px';
	box.style.left = Event.pointerX(event) + 'px';
	box.innerHTML = text;
	for(property in style) {
		box.style[property] = style[property];
	}

	box.onclick = function() {
		document.body.removeChild(this);
	}

	document.body.appendChild(box);

}

function L10Analytics() {
	
	var L10success = 0; L10sections=""; L10points=""; L10cRef=""; L10cRefType=""; L10cPage="";
	var L10qstr,L10pc,L10ref,L10a,L10pg; L10pg = document.URL.toString(); L10ref = document.referrer;
	if(top.document.location==document.referrer || (document.referrer == "" && top.document.location != "")) {L10ref=top.document.referrer;}
	L10qStr = "pg="+escape(L10pg)+"&ref="+escape(L10ref)+"&os="+escape(navigator.userAgent)+"&nn="+escape(navigator.appName)+"&nv="+escape(navigator.appVersion)+"&nl="+escape(navigator.language)+"&sl="+escape(navigator.systemLanguage)+"&sa="+L10success+"&sec="+L10sections+"&pts="+L10points+"&cR="+escape(L10cRef)+"&cRT="+escape(L10cRefType)+"&cPg="+escape(L10cPage);
	if(navigator.appVersion.substring(0,1) > "3") { L10d = new Date(); L10qStr = L10qStr+"&cd="+screen.colorDepth+"&sx="+screen.width+"&sy="+screen.height+"&tz="+L10d.getTimezoneOffset();}
	<!-- The L10 Hit Counter logo and links must not be removed or altered -->
	if((location.href.substr(0,6)=="https:") || (location.href.substr(0,6)=="HTTPS:")) { L10pc="https"; } else { L10pc="http"; }
	var trackingCode = '<a href="http://www.indiemusicstore.com/L10Apps/L10HC_Reporter.html" target="_blank"><img src="'+ L10pc +'://www.indiemusicstore.com/L10Apps/L10HC_Counter.php?'+ L10qStr +'" alt="LevelTen Hit Counter 4.0" style="width: 1px; height: 1px; " \/><\/a>';
		
	return trackingCode
	
}

function showEdit(id) {
	editRows = document.getElementsByTagName('tr');
	for(var i = 0; i < editRows.length; i++) {
		if(/\bedit-track\b/.test(editRows[i].className)) {
			if(editRows[i].id == id) {
				if(editRows[i].style.display != 'none') 
					editRows[i].style.display = 'none';
				else {
					try {
						editRows[i].style.display = 'table-row';
					} catch (e) {
						editRows[i].style.display = 'block';
					}
				}
			} else {
				editRows[i].style.display = 'none';
			}
		}
	}
	return false;
}

function showTitleButtons(id) {
	document.getElementById('b-x_'+id).style.display='inline';
	document.getElementById('b-ok_'+id).style.display='inline';
	document.getElementById('click-edit_'+id).style.display='none';
}

function hideTitleButtons(id) {
	document.getElementById('b-x_'+id).style.display='none';
	document.getElementById('b-ok_'+id).style.display='none';
	document.getElementById('click-edit_'+id).style.display='inline';
}

function expand(obj) {
	var div = obj.parentNode.parentNode;
	var span = obj.parentNode.getElementsByTagName('span')[0];
	if(/\bexpanded\b/.test(div.className)) {
		div.className = 'album';
		span.innerHTML = '[+]';
	} else {
		div.className = 'album expanded';
		span.innerHTML = '[-]';
	}
	return false
}
	
function expandAll(expand) {
	var fs = document.getElementsByTagName("fieldset");
	for(var i = 0; i < fs.length; i++)
		if(/\balbum\b/.test(fs[i].className)) {
			fs[i].className = 'album' + (expand ? ' expanded' : '');
			fs[i].getElementsByTagName('legend')[0].getElementsByTagName('span')[0].innerHTML = (expand ? '[-]' : '[+]');
		}
	return false;
}