<? 
require_once "include/application.php"; 
require_once "include/paginator.php";
require_once "include/paginator_html.php";
require_once "include/function.php";
require_once "include/newvalue_lib.php";

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="sddm.css" >
<script src="include/validation.js" type="text/javascript"></script>
<script language="javascript1.2"> 

function generate() 
{
	var count = 0 ;
 	for ( var i = 0 ; i < document.form.personclm.length ; i++ )
 	{ 
 		if ( document.form.personclm.options[i].selected ){
			var c=document.form.personclm.options[i].value;

		}
	}
} 

function ValidateForm(theform){
	var msg="";

	if(!theform.scale.value)msg +="Please select the report. \n";			

	if(msg){
		alert(msg)
		return false;
	}else return true;
}
</script> 


<title><? echo TITLE?></title>
</head>
<body>
	<form name="form" method="post" action="analyschart/rpt_scaleYGraph.php" target="_blank" ONSUBMIT="return ValidateForm(this)">
<table width="1024" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#f1efd8">
  <tr>
    <td  colspan="2" align="center"><? require_once "include/header.php"; ?></td>
  </tr>
  <tr>
    <td colspan="2" align="center">&nbsp;</td>
  </tr>
  <tr>
    <td width="185" valign="top" bgcolor="e6f3f9">
	
<? require_once "include/columnLeft.php"; ?>	</td>
    <td width="834" valign="top">

	  <table width="810" border="0" align="center" cellpadding="0" cellspacing="0">
      
      <tr>

        <td valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td width="100%" height="30" class="TitleH3">Analysis Graph</td>
          </tr>
          <tr>
            <td height="1" bgcolor="#B8ED83"></td>
          </tr>
          <tr>
            <td ><? echo "<div class='Msg'>$action_msg</div>" ?>&nbsp;
              <input name="ty" type="hidden" id="ty" value="<? echo $ty ?>" /></td>
          </tr>

        </table>
          <table border="0" cellpadding="1" width="100%" cellspacing="2" class="small">
            
            <tr>
              <td colspan="2" valign="top" class="TextH1">User
                <select name="user" id="user" >
                  <?
						 for($i=0;$i<count($ugrp); $i++)
						 {
							echo "<option value='".$ugrp[$i]."' ";
							if($user==$ugrp[$i])echo "selected";
							echo ">".$ugrp[$i]." </option>";
						 }

?>
                </select></td>
            </tr>
            
          
            <tr>
              <td width="137" class="TextH2">
			  
			  	  Report
			  	  <br />
                <select name="scale" size="15" multiple="multiple" id="scale">
					<optgroup label="   Bar Chart    ">
                  <option value="bar_gender.php">Gender</option>
                  <option value="bar_race.php">Race</option>
                  <option value="bar_type.php">Type</option>
                  <option value="bar_country.php">Country</option>
                  <option value="bar_countryType.php">Country, Type</option>
				 </optgroup>
					<optgroup label="   Pie Chart">
                  <option value="pie_gender.php">Gender</option>
                  <option value="pie_race.php">Race</option>
                  <option value="pie_type.php">Type</option>
                  <option value="pie_country.php">Country</option>
                  <option value="pie_countryType.php">Country, Type</option>
				 </optgroup>	  
                    </select>
                <? stayfocus("form","scale",$scale) ?></td>
              <td width="636" class="TextH2"><input name="btnYscale" type="submit" class="btn150" id="btnYscale" value="Generate Chart" /></td>
            </tr>
            <tr>
              <td colspan="2" class="TextH2">&nbsp;</td>
            </tr>
            <tr>
              <td colspan="2" class="TextH2">&nbsp;</td>
            </tr>
          </table></td>

      </tr>
 
    </table>
	  <br />
</td>
  </tr>
  <tr>
    <td colspan="2" bgcolor="#333333"><div align="center"><span class="Footer">
      <br />
      <? require_once "footer.php"; ?>
    </span></div></td>
  </tr>
</table>
</form>
</body>
</html>
<?
if(array_search("Report",$menulist)==false)
		print("<script type='text/javascript'>location.href='index.php'</script>");
?>