/*
This javascript will put the cursor in (set focus to) the first TEXT, PASSWORD, or TEXTAREA edit box in the FORM
whose name is passed to the function. 
*/

function SetFocusOnFirstEditBox(form) {
	//Find the first edit box and put the cursor there.
	//for each element in the FORM
	for (i=0; i < form.elements.length; i++) {
		var elem = form.elements[i];
		var type = elem.type.toLowerCase();
		if (type == "text" || type == "password" || type == "textarea") {
			elem.focus();
			break;
		}
	}
}
