
var selected 	= new Image
var half 		= new Image
var empty 		= new Image
var full 		= new Image
	  
selected.scr	= 'graphics/ratingstar-selected.gif'
half.scr 		= 'graphics/ratingstar-half.gif'
empty.scr 		= 'graphics/ratingstar-empty.gif'
full.scr 		= 'graphics/ratingstar-full.gif'
		
function setImage(obj, img ) {
	obj.src = img;
} 
		
function setSelected(objA, objB, objC, objD, objE) {
	if (objA != null) {
		objA.src = selected.scr
	}
	if (objB != null) {
		objB.src = selected.scr
	}
	if (objC != null) {
		objC.src = selected.scr
	}
	if (objD != null) {
		objD.src = selected.scr
	}
	if (objE != null) {
		objE.src = selected.scr
	}									
}

function resetImages(objA, objB, objC, objD, objE, original) {
	if (objA != null) {
		objA.src = original[0];
	}
	if (objB != null) {
		objB.src = original[1];
	}
	if (objC != null) {
		objC.src = original[2];
	}
	if (objD != null) {
		objD.src = original[3];
	}
	if (objE != null) {
		objE.src = original[4];
	}												
}