function addEvent(obj, eventType, targetFunction)
{
	if (obj.addEventListener)
	{
		obj.addEventListener(eventType, targetFunction, false);
	}
	else if (obj.attachEvent)
	{
		obj.attachEvent('on' + eventType, targetFunction);
	}
	else
	{
		obj['on' + eventType] = targetFunction;
	}
}

addEvent(window, "load", addHiddenInput);


function addHiddenInput()
{
	// get the first form on the page
	//
	// if the form in question is not the first form, alter the index
	// below (0 = first form, 1 = second form, etc.)
	var mailerForm = document.getElementsByTagName("form")[0];
	
	var hiddenInput = document.createElement("input");
	
	hiddenInput.type = "hidden";
	hiddenInput.name = "foolMeOnce";
	hiddenInput.value = "1";
	
	mailerForm.appendChild(hiddenInput);
}

