// [ODST] Clan Basic JavaScript Funtions
function loopLabels() {
	for (var i=0; i < document.forms.length; i++) {//this looks for the number of forms in the page
		var thisForm = document.forms[i];//asign the thisForm variable to each form
		resetFields(thisForm)//run this function on each form on the page
	}
}
function resetFields(whichform) {//pass the selected form into the function
	for(var i=0; i < whichform.elements.length; i++){//loop through all elements in the form that was passed through
	var element = whichform.elements[i];//asign the element variable to each form element in the loop
	
	if(element.type == "submit") continue;//continue on submit button
	if(!element.defaultValue) continue;//if the element has a value other than the default, continue
	
	element.onfocus = function() {
		if(this.value == this.defaultValue) {//when you focus on the form, if its value is the default
			this.value = "";//clear the value from the form
		}
	}
	element.onblur = function(){//when you click off the selected form field
		if(this.value == "") {//if there is no value in the form input
			this.value = this.defaultValue;//return the value back to the default
		}
	}
	}
