Index: branches/0.4/web/addons/job_monarch/graph.php
===================================================================
--- branches/0.4/web/addons/job_monarch/graph.php	(revision 737)
+++ branches/0.4/web/addons/job_monarch/graph.php	(revision 738)
@@ -179,5 +179,5 @@
 
         $sorted_hosts    = array();
-        $sorted_hosts[]    = $rjqj_host;
+        $sorted_hosts[]  = $rjqj_host;
 
         $rj_str = ":'Running Jobs'";
Index: branches/0.4/web/addons/job_monarch/index.php
===================================================================
--- branches/0.4/web/addons/job_monarch/index.php	(revision 737)
+++ branches/0.4/web/addons/job_monarch/index.php	(revision 738)
@@ -26,16 +26,16 @@
 set_time_limit(0);
 
-
 $my_dir = getcwd();
 
-global $r, $range;
-
 include_once "./libtoga.php";
 
+$r = escapeshellcmd( rawurldecode( $_GET["r"] ));
+$range = $r;
+if( !isset($range) or $range == '') $range= "job";
+
 if ( !empty( $_GET ) ) 
 {
     extract( $_GET );
 }
-
 
 global $GANGLIA_PATH;
@@ -52,5 +52,4 @@
 if( !isset($sortorder) ) $sortorder = "desc";
 if( !isset($sortby) ) $sortby = "id";
-if( !isset($range) or $range == '') $range= "job";
 
 if( isset( $filterorder ) && ($filterorder!='') ) 
@@ -311,5 +310,5 @@
     {
 
-        $range = "job";
+        #$range = "job";
 
         if( $page_call != "host_view" )
Index: branches/0.4/web/addons/job_monarch/libtoga.php
===================================================================
--- branches/0.4/web/addons/job_monarch/libtoga.php	(revision 737)
+++ branches/0.4/web/addons/job_monarch/libtoga.php	(revision 738)
@@ -130,5 +130,5 @@
 //
 global $metrics, $hosts_up;
-global $range, $start;
+global $start;
 
 global $DATETIME_FORMAT;
Index: branches/0.4/web/addons/job_monarch/overview.php
===================================================================
--- branches/0.4/web/addons/job_monarch/overview.php	(revision 737)
+++ branches/0.4/web/addons/job_monarch/overview.php	(revision 738)
@@ -34,4 +34,5 @@
 }
 
+$rjqj_start = null;
 $ds         = new DataSource();
 $myxml_data = $ds->getData();
@@ -604,17 +605,4 @@
     }
 
-    // Running / queued amount jobs graph
-    //
-    if( $rjqj_host != null )
-    {
-
-        $rjqj_str  = "<A HREF=\"./graph.php?z=large&c=$clustername&g=job_report&r=$range&st=$cluster[LOCALTIME]\">";
-        $rjqj_str .= "<IMG BORDER=0 SRC=\"./graph.php?z=small&c=$clustername&g=job_report&r=$range&st=$cluster[LOCALTIME]\">";
-        $rjqj_str .= "</A>";
-
-        $tpl->gotoBlock( "_ROOT" );
-
-        $tpl->assign( "rjqj_graph", $rjqj_str );
-    }
 
     foreach( $sorted_jobs as $jobid => $sortdec ) 
@@ -812,4 +800,5 @@
                 $job_start = $start_time;
 
+
                 $view_cpus += $cpus;
 
@@ -818,4 +807,13 @@
                 if( $jobs[$jobid]['status'] == 'R' ) 
                 {
+                    if( $rjqj_start == null ) 
+                    {
+                        $rjqj_start = $start_time;
+                    }
+                    else if( $start_time < $rjqj_start )
+                    {
+                        $rjqj_start = $start_time;
+                    }
+
                     foreach( $jobs[$jobid]['nodes'] as $tempnode )
                     {
@@ -873,4 +871,27 @@
             }
         }
+    }
+    // Running / queued amount jobs graph
+    //
+    if( $rjqj_host != null )
+    {
+        $rjqj_graphargs = "?z=medium&c=$clustername&g=job_report&r=$range";
+        if( $range == 'job' )
+        {
+            $rjqj_end = time();
+            $rjqj_graphargs .= "&period_start=$rjqj_start&period_stop=$rjqj_end";
+        }
+        else
+        {
+            $rjqj_graphargs .= "&st=$cluster[LOCALTIME]";
+        }
+
+        $rjqj_str  = "<A HREF=\"./graph.php$rjqj_graphargs\">";
+        $rjqj_str .= "<IMG BORDER=0 SRC=\"./graph.php$rjqj_graphargs\">";
+        $rjqj_str .= "</A>";
+
+        $tpl->gotoBlock( "_ROOT" );
+
+        $tpl->assign( "rjqj_graph", $rjqj_str );
     }
 
