function qtyFormat(elm) {
	var clean = elm.value.replace(/[^0-9]/gi, "");
	elm.value = clean;
}

function validateQty() {
	if ( $('itemQty').value.length > 0 ) {
		$('btn_preview').disabled=false;
	}
}

function clearAttributes(attrIndex, reset) {
	for (i=attrIndex; i < attributes.length; i++) {
		$(attributes[i][1]).innerHTML = '<select disabled="disabled"><option value="">Select One</option></select>';
	}

	if (reset) $('attr_'+attrIndex).selectedIndex = 0;
}
