// JavaScript Document
// Author: Caleb Johnston / HUGE
// Created: June 3, 2004
// verion: 0.7

//define relative path of images
var relativeImagePath = "/mpps_assets/";

//define all generic images
if (document.images) {
	buy_up = new Image();
	buy_up.src = relativeImagePath + "button_buy.gif";
	buy_down = new Image();
	buy_down.src = relativeImagePath + "button_buy_over.gif";
}

//rollover function for images
function rollover(id,image) {
	if (document.images) {
		var theImg=document.getElementById(id);
		theImg.setAttribute("src",image.src);
	}
}

// rollover function used for swapping classes used on table elements such as <tr>
// created for the ablum page tracklisting row rollovers, also used in a few various other places
function mouseOver(elementId,newClass){
		document.getElementById(elementId).className=newClass;
}

function cursorChange(elementId){
	document.getElementById(elementId).style.cursor='pointer';
}

// clear field function used to clear a form field after a user focuses on it
// created for the artist home page where the user can subscribe to an artist mailing list
function clearField(elementId){
	document.getElementById(elementId).value='';
}

// function is a javascript substitute for an anchor link
// created to allow better functionality with the CSS visited link pseudo class, also used for row onclick event handler
function clicked(url){
	window.location=url;
}
