﻿function setAction( strActionName, strActionValue, strConfirm ) {
    var bConfirm;


    //  Request confirmation if necessary.
    if ( strConfirm != null ) {
        bConfirm = confirm( strConfirm );
    } else {
        bConfirm = true;
    }
    
    if ( bConfirm == true ) {

        //  Set the action.
        document.getElementById( "action_name" ).value = strActionName;
        document.getElementById( "action_value" ).value = strActionValue;

        //  Submit the form.
        document.getElementById( "aspnetForm" ).submit();
    }
}