<?php
/*
   Copyright 2009-2011 United States Government. 

   This software is licensed under the GNU General Public License
   version 2 (see the file LICENSE for details)
*/
?>

<!-- Stylesheets  -->
<link rel="stylesheet" type="text/css" href="/sites/all/libraries/slider/css/slider.css" />
<!-- Javascript -->
<script type="text/javascript" src="/sites/all/libraries/slider/js/jquery.innerfade.js"></script>
<script type="text/javascript" src="/sites/all/libraries/slider/js/config.js"></script>
<?php

/*
Purpose : used in the slider on home page for public users
URL : it.usaspending.gov
Parameter: NA
*/
	$charttype=views_fusioncharts_getChartType();
	if($charttype=="FCF_") 
		include("customcode/fusionchartsfree.conf.php");
	else 
		include("customcode/fusionchartsenterprise.conf.php");
	$obj=new Portfolio();
	if($val=="module"){
		$filter="";
		$val="";
	}
	$agencybar=$obj->renderWidget("agencybar","portfolio_by_class","");
	$cost_trendxml=$obj->renderWidget("spark","cost_trend",$paramarray,0);
	$schedule_trendxml=$obj->renderWidget("spark","schedule_trend",$paramarray,0);
	$cio_trendxml=$obj->renderWidget("spark","cio_trend",$paramarray,0);
	$cost_piexml=$obj->renderWidget("pie","cost_pie",$paramarray,0);
	$schedule_piexml=$obj->renderWidget("pie","schedule_pie",$paramarray,0);
	$cio_piexml=$obj->renderWidget("pie","cio_pie",$paramarray,0);
	$costavg=$obj->getCostAverage("cost_avg",$paramarray);
	$scheduleavg=$obj->getScheduleAverage("schedule_avg",$paramarray);
	$cioavg=$obj->getCIOAverage("cio_avg",$paramarray);
	if($costavg <3 ){
			$costdivclass="chart_Number perf_AvgNum2";
	} else if($costavg > 3 && $costavg < 7){
			$costdivclass="chart_Number perf_AvgNum3";
	} else if($costavg >7){
			$costdivclass="chart_Number perf_AvgNum1";
	}

	if($scheduleavg <3){
			$scheduledivclass="chart_Number perf_AvgNum2";
	} else if($scheduleavg >3 && $scheduleavg <7){
			$scheduledivclass="chart_Number perf_AvgNum3";
	} else if($scheduleavg >7){
			$scheduledivclass="chart_Number perf_AvgNum1";
	}

	if($cioavg < 3){
			$ciodivclass="chart_Number perf_AvgNum2";
	} else if($cioavg >3 && $cioavg < 7){
			$ciodivclass="chart_Number perf_AvgNum3";
	} else if($cioavg >7){
			$ciodivclass="chart_Number perf_AvgNum1";
	}

?>
<div id="homepage-rotator">
<div style="height:365px;overflow:hidden;">
  <div class="clearfix">
    <div id="home-top-intro">
      <ul id="portfolio-desc" >



        <li>
          <h2>Rendimiento</h2>
          <div class="portfolio_Content" id="homeSnapShot">
            <table class="performance_Chart">
			  <thead>
				<tr>
					<th><div class="hidden-offscreen">Rendimiento por</div></th>
					<th>Distribución</th>
				</tr>
			  </thead>
			  <tbody>
				<tr>
					<td class="chart_Title" style="font-size:12px;">
						Evaluación<br />(Responsable)
					</td>
					<td class="chart_Pie">
						<?php echo renderChart($pie2D.'?ChartNoDataText=No Hay Datos', '', $cio_piexml, 'IP2', 40, 40, false, false);?>
					</td>
				</tr>
				<tr>
					<td class="chart_Title" style="font-size:14px;">
						Costo
					</td>
					<td class="chart_Pie">
						<?php echo renderChart($pie2D.'?ChartNoDataText=No Hay Datos', '', $cost_piexml, 'IP', 40, 40, false, false);?>
					</td>
				</tr>
				<tr>
					<td class="chart_Title" style="font-size:14px;">
						Plan
					</td>
					<td class="chart_Pie">
						<?php echo renderChart($pie2D.'?ChartNoDataText=No Hay Datos', '', $schedule_piexml, 'IP1', 40, 40, false, false);?>
					</td>
				</tr>
			  </tbody>
			  </table>

          </div>
          <div id="portfolio-button"><a href="/portfolios" class="banner_button">Ver Más Datos</a></div>
        </li>
        <li>
          <h2>Datos<br/>
            Dinámicos</h2>
          <div class="portfolio_Content">
            <p>Puede usar estos gráficos interactivos para comparar la evolución de los Programas TICs (Tecnologías de la Información y las Comunicaciones) desde diferentes puntos de vista: número de programas, porcentajes de variación en  costo y plan, gasto total de cada Departamento y Organismo autónomo. Ponemos a su disposición gráficos interactivos para hacer comparaciones</p>
          </div>
          <div id="portfolio-button"><a href="/investment_treemap/current-year-fy2011-continuing-resolution" class="banner_button">Ver Más Datos</a></div>
        </li>

<li class="highRisksContent" style="height:330px;">
		  <h2>PROGRAMAS TIC<span style="font-size:16px;">s</span> ALTA PRIORIDAD</h2>
		 <div class="portfolio_Content">
		  	<p></p>
		  </div>
		  <div id="portfolio-button"><a href="/high_priority_investment" class="banner_button">Ver Programas</a></div>
		</li>

      </ul>
    </div>
    <div id="slider" class="home-slide-wrapper">
      <ul id="portfolio">
        <li id="federalItPortfolio">
        <?php echo renderChart($msColumn2D.'?ChartNoDataText=No Data Available', '', $agencybar, 'areaID', 500,280, false, false);?>
        </li>
        <li><a href="#"><img src="/sites/all/libraries/slider/images/pres_img4.jpg" alt="" /></a></li>
	<li><a href="#"><img src="/sites/all/libraries/slider/images/pres_img6.jpg" alt="" /></a></li>
         </ul>
    </div>
  </div>
  <ul id="slide_nav">
    <li class="slide_0">1</li>
    <li class="slide_1">2</li>
   <li class="slide_2">3</li>
  </ul>
</div>
</div>