var activeStarSrc="/images/ani-star.gif";
var staticStarSrc="/images/bullet-star.gif";

var activeMoonSrc="/images/ani-moon.gif";
var staticMoonSrc="/images/bullet-moon.gif";

var activePrintSrc="/images/Aprint.gif";
var staticPrintSrc="/images/_print.gif";

function getTrailingNumeric (myString) {
	var outString="";
	var endNumeric=0;
	var i=myString.length;

	while ((i >=0) && (endNumeric != 1)) {
		i--;
		if (isNaN(myString.charAt(i))) {
			endNumeric = 1;
		} else {
			outString = myString.charAt(i) + outString;
		}	
	}
	return outString;
}
	
function activateImg (textLine,type) {
	whichImg=(textLine.id);
	switch (type) {
          case "star" :
		whichImg="image" + getTrailingNumeric(whichImg);
 		document.images[whichImg].src=activeStarSrc;
		break;
	  case "moon" :
		whichImg="image" + getTrailingNumeric(whichImg);
 		document.images[whichImg].src=activeMoonSrc;
		break;
	  case "print" :
		whichImg="printIcon";
 		document.images[whichImg].src=activePrintSrc;
		break;
	}
	return true;
}

function statifyImg (textLine,type) {
	whichImg=(textLine.id);
	switch (type) {
          case "star" :
		whichImg="image" + getTrailingNumeric(whichImg);
 		document.images[whichImg].src=staticStarSrc;
		break;
	  case "moon" :
		whichImg="image" + getTrailingNumeric(whichImg);
 		document.images[whichImg].src=staticMoonSrc;
		break;
	  case "print" :
		whichImg="printIcon";
 		document.images[whichImg].src=staticPrintSrc;
		break;
	}
	return true;
}


