window.onload = function(){
	stripe("Table1");
	highlightFormFields();
}

function highlightFormFields(){
	var types = new Array("INPUT","TEXTAREA");
	var elems;
	for(var i = 0; i < types.length; i++){
		elems = document.getElementsByTagName(types[i]);
		for(var j = 0; j < elems.length; j++){
			elems[j].onfocus = function(){
				this.className = "focus";
			}
			elems[j].onblur = function(){
				this.className = "";
			}
		}
	}
}

function stripe(tablename){
	var table = document.getElementById(tablename);
	if(table !=  null){
	var cells = table.getElementsByTagName("TR");
		for(var i = 0; i < cells.length; i++){
			if(i % 2 == 0) cells[i].className = "alt";
		}
	}
}

function SendForm(){
	var submitURL = "https://www.linkpointcentral.com/lpc/servlet/lppay"
	var inpTotal = document.getElementById("chargetotal");
	if(inpTotal != null && inpTotal != "0.00"){
		document.forms[0].action = submitURL;
		return true;
	}
	return false;
}
// could just use form.reset() but we don't
// wanna clear out all the other data
function resetFees(){
	var arr = document.getElementsByTagName("INPUT");
	for(var i = 0; i < arr.length; i++){
		if(arr[i].type=="radio") arr[i].checked = false;
	}
}
