// Jonesey Ponesey this is brilliant... a much shorter script than anything you've found! Goooooo CSS/javascript hybrids!
// ... so, does it work on all browsers?? ;)

var thecheckbox;
var derlink;

function initchk () {
	thecheckbox = document.getElementById("mailinglistBox");
	derlinkStyle = document.getElementById("natecheckbox").style;
	
	thecheckbox.checked = true;
	derlinkStyle.backgroundColor = "#CCCCCC";
}
		
function updateChecks() {
	
	  if(thecheckbox.checked) {
        thecheckbox.checked = false;
		derlinkStyle.backgroundColor = "white";
		//document.contactform.mailinglistBox.value ="No, thanks";
		//document.getElementById("natecheckbox").className = "natecheckbox";
		
    } else {
		thecheckbox.checked = true;
		
		//alert(thecheckbox.checked);
		derlinkStyle.backgroundColor = "#CCCCCC";
		//document.getElementById("natecheckbox").className = "natecheckboxON";
    }
}


function writeCheckbox () {
	
	if (!macIEFlag) {
		document.write('<INPUT TYPE="checkbox" name="mailinglistBox" id="mailinglistBox" value="Yes!" style="visibility:hidden;">');	
	} else {
		document.write('<INPUT TYPE="hidden" name="mailinglistBox" id="mailinglistBox" value="Yes!" style="visibility:hidden;">');	
	}
	
}