function gE(eID) {
	el = document.getElementById(eID);
//	if (!el)
//		el = document.getElementByName(eID);
//	alert (eID + ' ' + el);
	return el;
}

function toggleHidden(nm) {
	if (gE(nm)) {
		thStyle = gE(nm).style.display;
		switch (thStyle) {
		case "none": setVl="block"; break;
		default: setVl="none"; break;
		}
		gE(nm).style.display = setVl;
	}
}

function rowHighlight(rID) {
if (!gE(rID)) return;
gE(rID).className += " selRow";
}
function rowUnHighlight(rID) {
if (!gE(rID)) return;
gE(rID).className = gE(rID).className.replace(" selRow", "");
}

function highlightButton(el, event) {
	alert (el.className);
}
function switchCntry(el) {
	theForm = el.form;
	theForm('province').style.display='block';
	for (i=0; i<theForm.elements.length; i++) {
		thEl = theForm.elements[i];
		if (thEl.type=='select-one') {
			provType = thEl.getAttribute('provType');
			if (provType)
				if (provType==el.value) {
					theForm('province').value='';
					theForm('province').style.display = 'none';
					thEl.style.display='block';
				} else
					thEl.style.display='none';
		}
	}
}

function vardump(obj) {
            var t = '';
			s=1;
            for (i in obj) {
				if (obj[i]) {
					t += i + ": " + obj[i] + " - - - - - - - - - ";
					if (s==5) {
						t += "\n";
						s=1;
					}
					s ++;
				}
			}
//            for (i in obj) t += i + ": " + obj[i] + "<br>"
//			document.write(t);
            alert(t);
}
