<script type="text/javascript">
function load()
{

	a = document.getElementById('stringToParse');
	tempArray=a.value.split("@@");
	for(var i = 0; i < tempArray.length; i++)
		{
		tempArrayIndividual=tempArray[i].split("|");
		currentFieldName = tempArrayIndividual[0];
		currentFieldValue = tempArrayIndividual[1];
		isRadioButton = tempArrayIndividual[2];
		
		document.getElementById(currentFieldName).value = currentFieldValue;
		
		if (isRadioButton == "true")
			{
			document.getElementById(currentFieldName).checked = "checked"
			isRadioButton = "False"
			}
		
		
		}
}

function whenLeaving()
{
document.getElementById('stringToParse').value = "";
qqq = "";
	for(var i = 0; i < document.getElementById("theForm").elements.length; i++)
	{
	qqq += document.theForm.elements[i].id + "|"
	qqq += document.theForm.elements[i].value + "|"
		if (document.theForm.elements[i].type == "radio" || "checkbox")
		{
			if (document.theForm.elements[i].checked == true)
			{
			qqq += "true" + "@@"
			}
			else
			{
			qqq += "false" + "@@"
			}
		}
		else
		{
			qqq += "false" + "@@"
		}
	}
document.getElementById('stringToParse').value = "";
document.getElementById('stringToParse').value = qqq;
}
</script>