function addCustomControl(name, type) {

	// In all cases we need to degrade gracefully. The core element should accept data as usual; we only overlay additional features.
	return false;

	obj = document.getElementById(name);
	if (type=='date') {
		obj.style.width="80px";
		obj.onkeydown = function() { return jsValidateDate(this); }
		var calPopup = document.createElement('img');
		calPopup.style.width = "16px";
		calPopup.style.height = "16px";
		calPopup.src = "/f/button.gif";
		obj.parentNode.insertBefore(calPopup, obj.nextSibling);
	}		
	else if (type=='financial') {
		obj.style.width="80px";
		obj.onkeydown = function() { return jsValidateFinancial(this); }
	}		
}

function jsValidateDate(obj) {
	var e = window.event;
	key = e.keyCode;
	if (key >=48 && key <=57) return true;
	if (key ==8 ) return true; // backspace
	if (key == 46) return true; // delete
	if (key >= 35 && key <= 40) return true;	// home; end; arrows
	if (key == 191) return true; 	// slash
	return false;
}

function jsValidateFinancial(obj) {
	var e = window.event;
	key = e.keyCode;
	if (key >=48 && key <=57) return true;
	if (key ==8 ) return true; // backspace
	if (key == 46) return true; // delete
	if (key >= 35 && key <= 40) return true;	// home; end; arrows
	if (key == 190) return true; 	// dot - don't forget the comma for europeans!
	return false;
}