function change_buttons(id,image_id)   {

// pre load images
	pic1 = new Image(); 
	pic1.src="images/button_bg_off.gif";
	pic2 = new Image(); 
	pic2.src="images/button_bg_on.gif"; 
	pic3 = new Image(); 
	pic3.src="images/button_bg_next_on.gif"; 

var buttons = new Array();
	buttons[0] = pic1.src;
	buttons[1] = pic2.src;
	buttons[2] = pic3.src;

var x = image_id+1;
	if (x==1) { 
 	x = 0;
	}

var this_button_id = 'butt_'+id;

var previous_id = id-1;
var previous_button_id = 'butt_'+previous_id;
	document.getElementById(this_button_id).style.backgroundImage="url('"+buttons[image_id]+"')";

	if (id > 1) {
		document.getElementById(previous_button_id).style.backgroundImage="url('"+buttons[x]+"')";
	}
}

