// Function used to change the class of and/or change/maitain the value of an input field
// (input tag's id, default value, click value(optional), default class(optional), and focus class(optional))

input_values = function(inputID, defaultValue, clickValue, defaultClass, focusClass) {
	var theInput = document.getElementById(inputID);
	
	var currentValue = theInput.value;
	
	var currentClass = theInput.className;
	
	if(inputID != '' && defaultValue != '') {
		if(theInput.value == defaultValue) {
			if(clickValue != '') {
				theInput.value = clickValue;
			}
			else {
				theInput.value = '';
			}
		}
		
		else if(theInput.value == '' && defaultValue != '') {
			theInput.value = defaultValue;	
		}
		
		else {
			theInput.value = currentValue;
		}
	}
	
	if(defaultClass != '' && focusClass != '') {
	
		if(currentClass == defaultClass) {
			theInput.className = focusClass;
		}
		
		else if(theInput.value == defaultValue) {
			theInput.className = defaultClass;
		}
		
		else {
			theInput.className = focusClass;
		}
	}
}