function disableOtherSubmitButtons(submitButton)
{
if(!submitButton)
{
alert("no object found");
return;
}

if(!submitButton.type)
{
alert("no type attribute");
return;
}

if(submitButton.type != "submit")
{
alert("no submit button");
return;
}

if(!submitButton.form)
{
alert("parentless button (no form)");
return;
}

var formElements = submitButton.form.elements;

for(var i=0; i<formElements.length; i++)
{	
//leave the pressed button as is...
if(formElements[i] == submitButton)
continue;

//disable all other submit buttons
if(formElements[i].type == "submit")
{
formElements[i].disabled = "true";
}
}
}
