The idea here is the counter gets updated every time a user checks or unchecks a checkbox.

Obviously the way it's coded now only a 0 modulus will be returned. How can I init the variable count without setting it to zero every time the function is called?


Code:
function changeit() {
	var count = 0;
	count = count++;
     if (count%2 == 0) {
		document.forms[0].transmissionfirst.value = "00/00/0000"; 
		document.forms[0].transmissionlast.value = "00/00/0000"; 
	} else {
		document.forms[0].transmissionfirst.value = ""; 
		document.forms[0].transmissionlast.value = ""; 
	}
}