function imgRoll() {
	if (!document.getElementById) return
	var aPreLoad = new Array();
	var sTempSrc;
	var aImages = document.getElementsByTagName('img');
	for (var i = 0; i < aImages.length; i++) {
		if (aImages[i].className == 'roll') {
			var src = aImages[i].getAttribute('src');
			if (src.indexOf("_o") < 0) { // if already ends in _o - IGNORE
				var ftype = src.substring(src.lastIndexOf('.'), src.length);
				var hsrc = src.replace(ftype, '_o'+ftype);
				aImages[i].setAttribute('hsrc', hsrc);
				aPreLoad[i] = new Image();
				aPreLoad[i].src = hsrc;
				aImages[i].onmouseover = function() {
					sTempSrc = this.getAttribute('src');
					this.setAttribute('src', this.getAttribute('hsrc'));
				}
				aImages[i].onmouseout = function() {
					if (!sTempSrc) sTempSrc = this.getAttribute('src').replace('_o'+ftype, ftype);
					this.setAttribute('src', sTempSrc);
				}
			}
		}
	}
}
window.onload = imgRoll;

// capitalize logic
function capitalize(formObject) {
	var index;
	var tmpStr;
	var tmpChar;
	var preString;
	var postString;
	var strlen;
	tmpStr = formObject.value;
	//tmpStr = formObject.value.toLowerCase();
	strLen = tmpStr.length;
	if (strLen > 0)  {
		for (index = 0; index < strLen; index++)  {
			if (index == 0)  {
				tmpChar = tmpStr.substring(0,1).toUpperCase();
				postString = tmpStr.substring(1,strLen);
				tmpStr = tmpChar + postString;
				}
			else {
				tmpChar = tmpStr.substring(index, index+1);
				if ( (tmpChar == " " || tmpChar =="'" || tmpChar =="-") && index < (strLen-1) )  {
					tmpChar = tmpStr.substring(index+1, index+2).toUpperCase();
					preString = tmpStr.substring(0, index+1);
					postString = tmpStr.substring(index+2,strLen);
					tmpStr = preString + tmpChar + postString;
					}
				}
			}
		}
	formObject.value = tmpStr;
}
// trims the whitespace at the start and end of input text values
function stripWhitespace(item) {
	var tmp = "";
	var item_length = item.value.length;
	var item_length_minus_1 = item.value.length - 1;
	for (index = 0; index < item_length; index++) {
		if (item.value.charAt(index) != ' ') {
			tmp += item.value.charAt(index);
		} else {
			if (tmp.length > 0) {
				if (item.value.charAt(index+1) != ' ' && index != item_length_minus_1) {
					tmp += item.value.charAt(index);
				}
			}
		}
	}
	item.value = tmp;
}
























