diff --git a/modules/pay_node/pay_node.module b/modules/pay_node/pay_node.module
index aaa3eab..6c6c491 100644
--- a/modules/pay_node/pay_node.module
+++ b/modules/pay_node/pay_node.module
@@ -143,6 +143,26 @@ function pay_node_nodeapi(&$node, $op, $teaser = NULL, $a4 = NULL) {
   }
 }
 
+
+/**
+*  build the progress bar
+*
+*  @param $node - either a node object or and nid for which to get the progress bar
+*  @param $paid - flag to indicate whether to return progress bar for total paid (if TRUE) or total amount (if FALSE)
+*  @param $html - flag indicating whether to return HTML markup or an FAPI style array
+*
+*  @returns either an HTML string for the progress bar, or an FAPI style array for the progree bar depending upon the vaule of $html
+*/
+function pay_node_progress_bar($node,$paid = TRUE, $html = TRUE){
+  if (is_scalar($node)) $node = node_load($node);
+  $returnable = array(
+      '#type' => 'markup',
+      '#value' => theme($paid ? 'pay_progress_total_paid' : 'pay_progress', $node->pay_form),
+      '#weight' => $weight,
+    );
+  return html ? drupal_render($returnable) : $returnable;
+}
+
 /**
  * Implementation of hook_views_api().
  */
