function custom_function_edit(theElement)
{
	var theForm = theElement.form, z = 0;

	if (theElement.value > 0)
	for(z=0; z<theForm.length;z++)				{
     		if(theForm[z].type == 'submit')	{
					theForm[z].disabled = false;
		}
	}
}


function disable_button(theElement) 
{
	var theForm =  theElement.form, z = 0;
				
	theElement.disabled = true;
				
	for(z=0; z<theForm.length;z++)
	{
     		if(theForm[z].type == 'submit')
		{
					theForm[z].disabled = true;
 			}
 	 		}
	
	for(z=0; z<theForm.length;z++)
	{
     		if(theForm[z].type == 'hidden' && theForm[z].name == theElement.name)
		{
					theForm[z].disabled = false;
 			}
 	 		}

	theElement.form.submit();
  	}
