
function myLayer (x) {
	//object finding

	if (document.layers) { 
		browser="NN4";
		lay=document.layers[x];
	}
	if (document.all) { 
		browser="IE";
		lay=eval("document.all." + x);
	}
	if (!document.all && document.getElementById) { 
		browser="NN6+ or IE5+ if you're willing to dump the !document.all stuff";
		lay=document.getElementById(x);
	}

	lay=document.getElementById(x);
	return lay;
}

function fnCSet() {
	var numero=Math.random()*7*666;
	var numero=Math.floor(numero);

	myLayer("cN").innerHTML = numero;

	document.theform.cH.value = numero;
}

function fnCC() {
	f = document.forms['theform'];
	if (f.c1.value == f.cH.value) {
//		alert("OK");
		f.submit();
	} else {
		alert("The  'Validation Code' you entered is not correct. Please try again.");
	}
//	return false();
}

window.onload=function() {fnCSet();}
