function doit () {
//alert ("DOING IT");
document.theForm.page_name.value = location.href.substring(location.href.lastIndexOf("/")+1, location.href.lastIndexOf(".")); 
document.theForm.student_name.value = StrReplace(document.theForm.student_name.value,"'","");
document.theForm.student_name.value = StrReplace(document.theForm.student_name.value,'"','');
document.theForm.student_age.value = StrReplace(document.theForm.student_age.value,"'","");
document.theForm.student_age.value = StrReplace(document.theForm.student_age.value,'"','');
document.theForm.student_country.value = StrReplace(document.theForm.student_country.value,"'","");
document.theForm.student_country.value = StrReplace(document.theForm.student_country.value,'"','');
document.theForm.student_email.value = StrReplace(document.theForm.student_email.value,"'","");
document.theForm.student_email.value = StrReplace(document.theForm.student_email.value,'"','');
//  FOLLOWING WORKS ONLY IN IE
//document.theForm.question1.value = document.getElementById("q1").innerText;	// IE ONLY!
//document.theForm.question2.value = document.getElementById("q2").innerText;	// IE ONLY!
//document.theForm.question3.value = document.getElementById("q3").innerText;	// IE ONLY! s/b .childNodes[0].childNodes[0].innerHTML

document.theForm.question1.value = document.getElementById("q1").childNodes[0].childNodes[0].innerHTML
document.theForm.question2.value = document.getElementById("q2").childNodes[0].childNodes[0].innerHTML
document.theForm.question3.value = document.getElementById("q3").childNodes[0].childNodes[0].innerHTML


//alert (document.theForm.page_name.value);
//location.href = "http://comsewogue.k12.ny.us/~ssilverman/dbq2003/participants.htm";
//alert (document.theForm.question2.value);
//alert (document.theForm.question3.value);
}

function setup () {
for (i = 0; i < document.links.length; i++) 
{
	if (document.links[i].pathname.indexOf("responses.asp") >= 0) document.links[i].href = document.links[i].href + "?page_name=" + escape(location.href.substring(location.href.lastIndexOf("/")+1, location.href.lastIndexOf(".")));
} 
}

function StrReplace(inStr, removeStr, replaceStr)  {
	inStr = inStr.split(removeStr).join(replaceStr);
	return inStr;
}

