<!--

function validateQuantity() {
	
	var newValue = "";
		
	for (var s=0; s < this.value.length; s++) {
		
		if ( (this.value.charCodeAt(s)>=48) && (this.value.charCodeAt(s)<=57) ) {
		
			newValue = newValue + this.value.charAt(s);
		
		}
	
	}
	
	if (this.value.charCodeAt(0)==48) {
	
		newValue = newValue.substring(1,newValue.length);
	
	}
	
	this.value = newValue;
	
}

function clickQuantity() {
	
	if (this.value==1) {
	
		this.value='';
	
	}
	
}

function blurQuantity() {
	
	if (this.value=='') {
	
		this.value=1;
	
	}
	
}

function prepareInputFields() {
	
	if (!document.getElementsByTagName) return;

	var inputs = document.getElementsByTagName("input");
	
	for (var i=0; i < inputs.length; i++) {
		
		if (inputs[i].getAttribute("name") == "fldQuantity") {
			
			inputs[i].onkeyup = validateQuantity;
			inputs[i].onclick = clickQuantity;
			inputs[i].onblur  = blurQuantity;
			
		}
		
	}
	
}

function preparePage() {
	
	prepareInputFields()
	
}

-->
