	var gloStrForm;			// global, name of form in which the button exists to be disabled/enabled
	var gloStrButton;		// global, name of button to be disabled/enabled
	var gloStrDefaultVal;	// global, default text value for button (default text is replaced when disabled, then it's put back again when enabled) 
	
	// -------------------------------------------------
	// disable submit button for a few seconds, prevent spam hits
	// strForm: name of the form
	// strButton: name of the button to be disabled/enabled
	// original text value on button
	// -------------------------------------------------
	function disableForm(strForm, strButton, strDefaultVal, intSeconds)
	{
		// set timeout seconds
		intSeconds = (intSeconds == 'undefined' || intSeconds == undefined) ? 2 : intSeconds;
		
		// put values in global variables
		gloStrForm = strForm;
		gloStrButton = strButton;
		gloStrDefaultVal = strDefaultVal;
		
		// disable submit button for a while
		eval('document.forms["' + strForm + '"].' + strButton + '.disabled = true;');
		
		// change text value on button to something that tells the user that this button is disabled right now
		eval('document.forms["' + strForm + '"].' + strButton + '.value = "vänta ...";');
		
		// enable button again after a few seconds
		setTimeout('dfCall();', (intSeconds*1000));
	}
	
	// -------------------------------------------------
	// callback function from disableForm to enable submit button after 3 seconds
	// -------------------------------------------------
	function dfCall()
	{
		// enabled form again
		eval('document.forms["' + gloStrForm + '"].' + gloStrButton + '.disabled = false;');
		
		// put default text value back on butotn
		eval('document.forms["' + gloStrForm + '"].' + gloStrButton + '.value = "' + gloStrDefaultVal + '";');
	}