	var IE = document.all?true:false
	if (!IE) document.captureEvents(Event.MOUSEMOVE)
	document.onmousemove = setMouseXY

	var tempX = 0;
	var tempY = 0;
	var handle=0;
	function setMouseXY(e) {
	  if (IE) {
	    tempX = event.clientX + document.body.scrollLeft + 5
	    tempY = event.clientY + document.body.scrollTop + 5
	  } else {
	    tempX = e.pageX
	    tempY = e.pageY
	  }  
	  if (tempX < 0){tempX = 5}
	  if (tempY < 0){tempY = 5}  
	}
	
	function ShowInfo(Format,MusicType,Price,Size,Time)
	{
		Format = Format.replace("<br>"," ");
		PopUpObj = document.getElementById("PopUp");
		if(PopUpObj)
		{
			PopUpObj.innerHTML = Format + "<br>" + MusicType + "<br>" + Price + "<br>" + Size + "<br>" + Time;
			PopUpObj.style.left = tempX + "px";
			PopUpObj.style.top = tempY + "px";
			handle = window.setTimeout("PopUpObj.style.display = 'block';",350);
		}
	}
	
	function HideInfo()
	{
		window.clearTimeout(handle);
		PopUpObj = document.getElementById("PopUp");
		if(PopUpObj)
			PopUpObj.style.display = "none";
	}
	
	function ChangePrice(Price,Id)
	{
		ObjImg = document.getElementById("IMG"+Id);
		ObjHid = document.getElementById("HID"+Id);

		if(ObjHid.value == 1)
		{
			ObjHid.value = 0;
			ObjImg.src = SiteURL + "Graphics/unchecked.jpg";
			Price = parseFloat(Price);
			if(Price > 0)
			{
				PriceObj = document.getElementById("Price");
				CurrentPrice -= Price;
				PriceObj.value = formatCurrency(CurrentPrice);
			}
		}
		else
		{
            Price = parseFloat(Price);
			if(Price > 0)
			{
				CurrentPrice += Price;
				PriceObj = document.getElementById("Price");
				if(PriceObj)
					PriceObj.value = formatCurrency(CurrentPrice);

                ObjHid.value = 1;
                ObjImg.src = SiteURL + "Graphics/checked.jpg";
			}
		}
	}
	function formatCurrency(num) 
	{
		num = num.toString().replace(/\$|\,/g,'');
		if(isNaN(num))
		num = "0";
		sign = (num == (num = Math.abs(num)));
		num = Math.floor(num*100+0.50000000001);
		cents = num%100;
		num = Math.floor(num/100).toString();
		if(cents<10)
		cents = "0" + cents;
		for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
		num = num.substring(0,num.length-(4*i+3))+','+
		num.substring(num.length-(4*i+3));
		return (((sign)?'':'-') + '$' + num + '.' + cents);
	}
	
	function showtip(text)
	{
		PopUpObj = document.getElementById("TrackInfo");
		if(PopUpObj)
		{
			PopUpObj.innerHTML = text;
			PopUpObj.style.left = tempX + "px";
			PopUpObj.style.top = tempY + "px";
			PopUpObj.style.display = "block";
		}
	}
	
	function hidetip()
	{
		PopUpObj = document.getElementById("TrackInfo");
		if(PopUpObj)
			PopUpObj.style.display = "none";
	}
