function showFields(opt) {
	argv = showFields.arguments;
	a = 1;
	while (argv[a]) {
		if (document.getElementById('dbformF'+argv[a])) {
			tr = document.getElementById('dbformF'+argv[a]).parentNode;
			while (tr.tagName.toUpperCase() != 'TR') tr = tr.parentNode;
//			tr.style.display = (opt)?'':'none';
//			alert(tr.className);
			tr.className = (opt)?'formRow':'hidden';
		
		}
		++a;
	}
	footReset();	
}

function footReset() {
	f = document.getElementById('footer').style.position="relative";
	f = document.getElementById('footer').style.position="absolute";
}
function dbfromValid(f) {
	
	for (a = 0; a < dbformFields.length; ++a) {
		t = dbformFields[a];
		//alert (t.req);
		if (t.req == '1') {
			i = document.getElementById('dbformF'+t.field);
			al = document.getElementById('dbformI'+t.field);
			if (i.tagName.toUpperCase() == "SELECT" && i.selectedIndex == 0) {
				al.innerHTML = t.alert1;
				i.focus(); 
				i.parentNode.parentNode.className = 'alertRow';
				return false;
				
			}
			else if (i.tagName.toUpperCase() != "SELECT" && i.value == '') {
				al.innerHTML = t.alert1;
				i.focus(); 
				i.parentNode.parentNode.className = 'alertRow';
				return false;
			}
			else if (t.js != '' && !eval(t.js)) {
				al.innerHTML = t.alert2;
				i.focus(); 
				i.parentNode.parentNode.className = 'alertRow';
				return false;		
			}
			else {
				al.innerHTML = t.info;
				i.parentNode.parentNode.className = 'formRow';	
			}
		}
		
	}
	return true;
}
