function fieldReset() { for ( i=1; i<=document.form1.elements.length; i++ ) { if ( document.form1.elements[i-1].type == "text" || document.form1.elements[i-1].type == "textarea" || document.form1.elements[i-1].type == "password" ) { document.form1.elements[i-1].value = ""; } else if ( document.form1.elements[i-1].type == "radio" || document.form1.elements[i-1].type == "checkbox" ) { document.form1.elements[i-1].checked = false; } else if ( document.form1.elements[i-1].type == "select-one" ) { document.form1.elements[i-1].selectedIndex = 0; } } }