﻿ 
function disableButtonOnClick(oButton, sButtonText, sCssClass)    
{
    if(Page_ClientValidate())
    {
        // set button to disabled so you can't click on it.
        oButton.disabled = true;         
        // change the text of the button.        
//        oButton.value = sButtonText;         
        // IE uses className for the css property.        
//        oButton.setAttribute('className', sCssClass);         
        // Firefox, Safari use class for the css property.  (doesn't hurt to do both).        
//        oButton.setAttribute('class', sCssClass);
    }
}


