//----------------------------------------------------------
// Attaches a function to the event of specified object
// @param obj the object the event is being attached to
// @param eventType the event type (e.g. "load") - do not include "on" as in "onload"!
// @param fn the function to attach
//----------------------------------------------------------
function addEvent(obj, eventType, fn)
{
	if (obj.addEventListener)
	{
		obj.addEventListener(eventType, fn, true);
		return true;
	}
	else if (obj.attachEvent)
	{
		var r = obj.attachEvent("on" + eventType, fn);
		return r;
	}
	else
	{
		return false;
	}
}
//--------------------------------------------------------------------
// Make status bar display all titles on links.
//--------------------------------------------------------------------
addEvent(window, "load", function(){

	for(var i=0,limit=document.links.length ;i<limit;i++)
	{
		addEvent(document.links[i], "mouseover", setStat("Buy this mp3 now") );
		addEvent(document.links[i], "mouseout", setStat("") );
	}
});
 
function setStat(s)
{
	return function()
	{
		window.status=s;
		window.defaultstatus=s;
		
		return true;
	}
}