<?php
	/*include("stilos/config.inc.php");
	include("../clases/BDConexion.php");
	include("../clases/clsPer.php");  
	include("Funciones.php");
  
	$objPer=new clsPer;  */
	session_start();
  
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head profile="http://gmpg.org/xfn/11">

	<title>Accordion v1.0 Demo</title>

	<!-- Meta Tags -->
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<meta name="keywords" content="accordion, javascript accordion, scriptaculous" />
	<meta name="description" content="The ultimate modal window system, LightWindow, allows you to build your own theem, create mixed media galleries including flash, quictkime and images.   Through a variety of parameters this system can do it all and recreate any other system out there!" />

	<meta name="robots" content="index, follow" />
	
	<!-- JavaScript -->
  <!-- <script type="text/javascript" src="combine.php?type=javascript&files=prototype.js,effects.js,accordion.js,code_highlighter.js,javascript.js,html.js"></script> -->

	

	<!-- CSS -->
  <link rel="stylesheet" type="text/css" href="css/default.css" />
    
	
	
	
		
    
</head>

<body>

<div id="container">
	
	<div id="vertical_container" >	
<? 				   
$resultado=$objPer->getAreasss();
while($filas=$objPer->NextRow($resultado))
{ 
?>

		<h1 class="accordion_toggle"><?php echo $filas['Vnomarea']; ?></h1>

		<div class="accordion_content">  
<?
$resultados=$objPer->getAreaUsu($filas['Vidarea']);			
while($row=$objPer->NextRow1($resultados))
{ 	
				   $resul=$objPer->getAreaDoc($_SESSION['usuarioId'],$_POST['tipodoc']);
				   $fil=$objPer->NextRow2($resul);
				   $cadena = explode(",", $fil['Vareas']);	
				   $num=count($cadena);
?> 
		  <? echo $row['apellidos']." ".$row['nombres'];?>
		    <input type="checkbox" name="selec[]" value="<?=$row['login']?>" <? for($i=0;$i<$num;$i++){ if($cadena[$i]==$row['login']){?> checked="checked"<? }else{ echo "";}}?>/>
		  
<?
}
$objPer->Liberar1($resultados);
?>
		</div>		
<? 
 }
$objPer->Liberar($resultado);   
?>	
</div>

</div>

<script type="text/javascript" >
  
	//
	// You can hide the accordions on page load like this, it maintains accessibility
	//
	// Special thanks go out to Will Shaver @ http://primedigit.com/
	//
	var verticalAccordions = $$('.accordion_toggle');
	verticalAccordions.each(function(accordion) {
		$(accordion.next(0)).setStyle({
		  height: '0px'
		});
	});

	
</script>

</body>
</html>
