function ajaxFunction(){
	
	for (a=0;a<6;a++){
		if (document.getElementById('score').question1[a].checked == true) {
			var s1 = parseInt(document.getElementById('score').question1[a].value);
		}
	}
	for (b=0;b<6;b++){
		if (document.getElementById('score').question2[b].checked == true) {
			var s2 = parseInt(document.getElementById('score').question2[b].value);
		}
	}
	for (c=0;c<6;c++){
		if (document.getElementById('score').question3[c].checked == true) {
			var s3 = parseInt(document.getElementById('score').question3[c].value);
		}
	}
	for (d=0;d<6;d++){
		if (document.getElementById('score').question4[d].checked == true) {
			var s4 = parseInt(document.getElementById('score').question4[d].value);
		}
	}
	for (e=0;e<6;e++){
		if (document.getElementById('score').question5[e].checked == true) {
			var s5 = parseInt(document.getElementById('score').question5[e].value);
		}
	}
	var output = document.getElementById('output');
	if ((!s1) || (!s2) || (!s3) || (!s4) || (!s5)) {
		var mesg = "You haven't answered all of the questions. Please check your answers and try again.";} else {
	var total = s1 + s2 + s3 + s4 + s5;
	if(total<=10) {
		var mesg = "Your Luridity score is " + total + " out of a possible 30.<br />Not bad at all!<br />As one of ElanMan's past clients (as I presume you must be), there wasn't really a need to fill out this form.<br />If, however, you're not an ex client and you feel that your score was more luck than anything else, contact ElanMan today for a <a href=\"contact_elanman.php\" title=\"Contact ElanMan\">FREE site report</a>.";}
	else if ((total<=20) && (total>10)) {
		var mesg = "Your Luridity score is " + total + " out of a possible 30.<br />Although your site hasn't been heavily targeted by the evil Dr, he has clearly sniffed around and put you on his secret 'to do' list.<br />As they say, prevention is better than cure; <a href=\"contact_elanman.php\" title=\"Contact ElanMan\">contact</a> Elan Web Design today!!";}
	else {
		var mesg = "Your Luridity score is " + total + " out of a possible 30.<br />It appears that at the moment, your site is unbelievably Lurid!<br />Don't worry; all of Dr Lurid's nasty deeds can easily be undone. <a href=\"contact_elanman.php\" title=\"Contact ElanMan\">Contact ElanMan</a> straight away before you lose even more customers!";
	}
		}
			output.innerHTML = mesg;
}
//come back to this
	/*var ajaxRequest;
	
	try{
		
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				
				alert("Your browser broke!");
				return false;
			}
		}
	}

	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4 && ajaxRequest.status == 200){
			var output = document.getElementById('output');
			output.innerHTML = ajaxRequest.responseText;
		}
	}
	ajaxRequest.open("GET", "score.php?q1=s1&q2=s2&q3=s3&q4=s4&q5=s5", true);
	ajaxRequest.send(null);*/ 
