function spamchk(){
	if(document.getElementById('actual').value==document.getElementById('spamche').value){
	return true;	
	}
	else{
		alert("Please enter the correct code");
		populateform();
		return false;}
	}

var keylist="abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ"
var temp=''

function generatepass(){
temp='';
var plength=6;
var i;
for (i=0;i<plength;i++)
temp+=keylist.charAt(Math.floor(Math.random()*keylist.length))
return temp
}

function populateform(){
document.form1.actual.value=generatepass()
}



window.onload=populateform;

