/**
 * updateImage
 * --------------------------------------------------------------------------
 * updates an <img> tag source. Used for Thumbnail previews.
 */
function updateImage(id, newImage, caption) {
	document.getElementById(id).src = newImage;
	document.getElementById(id+'Caption').innerHTML = caption;
}

function updateProductStyle(obj, newStyle) {
	obj.className = newStyle;
	if (newStyle == 'productStocked') {
		obj.parentNode.style.backgroundColor = 'white';
	} else {
		obj.parentNode.style.backgroundColor = 'black';
	}
}

function updateProductSelection(obj, id) {
	cb = document.getElementById('productCheckbox_' + id);
	pi = document.getElementById('productImage_' + id);
	window['stockedStatus_' + id] = !window['stockedStatus_' + id];
	document.getElementById('productCheckbox_' + id).checked = window['stockedStatus_' + id] ? 'checked' : '';
	//alert(document.getElementById('productCheckbox_' + id).checked);
}
