function $(id) {
var E = document.getElementById(id);
E.hide = function() { this.style.display = 'none'; }
E.show = function() {
	switch(this.tagName) {
		case 'TR':
			alert(this.style.display);
			this.style.display = 'table-row';
			break;
		default:
			this.style.display = 'block';
	}
}
if(E.tagName == 'SELECT') E.value = E.options[E.selectedIndex].value;
return E;
}

function $S(id) {
var E = document.getElementById(id);
E.text = E.options[E.selectedIndex].text;
return E;
}