<? //require_once("checar.php"); 
//session_name("SESION");
//session_start(); 
//require_once("coneccion.php");
$id=$_SESSION[id];
$pwd=$_SESSION[password];
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>.::Estadistica de Bibliotecas::.</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<script type="text/javascript" src="livevalidation_standalone.js">

</script>

 <style type="text/css"> .LV_validation_message{
    font-weight:bold;
    margin:0 0 0 5px;
}

.LV_valid {
    color:#00CC00;
}
	
.LV_invalid {
    color:#CC0000;
}
    
.LV_valid_field,
input.LV_valid_field:hover, 
input.LV_valid_field:active,
textarea.LV_valid_field:hover, 
textarea.LV_valid_field:active {
    border: 1px solid #00CC00;
}
    
.LV_invalid_field, 
input.LV_invalid_field:hover, 
input.LV_invalid_field:active,
textarea.LV_invalid_field:hover, 
textarea.LV_invalid_field:active {
    border: 1px solid #CC0000;
}
 
 
 
 </style>

<script language="JavaScript">
function deshabilitar(campo)
	{
	if(campo.value==1 || campo.value==2 || campo.value==4)
		{
		document.forma.especifique.disabled=true;
		document.forma.especifique.value="";	
		}
	else 
		{
		document.forma.especifique.disabled=false;
		}
	}




function habilita(campo)
	{
	campa=campo.name;
	campo1=campa+1;
	campo2=campa+2;
	campo3=campa+3;
	campo4=campa+4;
	campo5=campa+5;
	campo6=campa+6;
	campo7=campa+7;
	campo8=campa+8;
	campo9=campa+9;	

	if(campo.value==1)
		{
		document.forma[campo1].disabled=false;
		document.forma[campo2].disabled=false;
		document.forma[campo3].disabled=true;
		document.forma[campo4].disabled=true;
		document.forma[campo5].disabled=true;		
		document.forma[campo6].disabled=true;
		document.forma[campo3].value="0";	
		document.forma[campo4].value="0";	
		document.forma[campo5].value="0";	
		document.forma[campo6].value="0";							
		}
	if(campo.value==2)
		{
		document.forma[campo3].disabled=false;
		document.forma[campo4].disabled=false;
		document.forma[campo5].disabled=false;		
		document.forma[campo6].disabled=false;
		document.forma[campo1].value="0";	
		document.forma[campo2].value="0";	
		document.forma[campo1].disabled=true;		
		document.forma[campo2].disabled=true;		
		f1.add( Validate.Presence );
		}
	}

	
function numbersonly(myfield, e, dec)
{
var key;
var keychar;
if (window.event)
   key = window.event.keyCode;
else if (e)
   key = e.which;
else
{	//Capt_Val();
   	return true;
}
keychar = String.fromCharCode(key);
// control keys
if ((key==null) || (key==0) || (key==8) || 
    (key==9) || (key==13) || (key==27) )
{   
return true;
}
else if ((("0123456789").indexOf(keychar) > -1))
{	//Capt_Val();
   	return true;
}
else if (dec && (keychar == "."))
   {
   myfield.form.elements[dec].focus();
   
   return false;
   }
else
   return false;
}
function validacion(forma)
{
//	alert ("eitale");
	return false;
	if (Form1.nombrecct.value=="" || Form1.domicilio.value=="" || Form1.cct2.value=="" 
	|| Form1.zonaescola.value=="" || Form1.direccion.value=="" || Form1.telefono.value==""
	|| Form1.fax.value=="" )
	{
		alert("Favor de llenar todos los campos con su formato devido");
		Form1.computadora.focus();
		return false;
	}

}


function menu()
	{
	location.href="menu.php";
	}
</script>
<link href="SpryAssets/SpryValidationSelect.css" rel="stylesheet" type="text/css">
</head>

<body>
<?
$sql = "SELECT * FROM bibliotecas where id='$id'";
//$result = mysql_query($sql);  
//$row = mysql_fetch_array($result);
?>

<center>
<table width="806" border="0">
<tr> <td colspan="4" align="center"><img src="images/banercie.jpg"></td> </tr>
<tr>
<td width="79"> <font face="Arial" size="2"><STRONG>ESCUELA</STRONG></font>: </td>
<td width="553"> <font color="#FF0000"><strong><? echo $row["nombrect"];?></strong></font> </td> 
<td width="39"><font face="Arial" size="2"><STRONG>CCT</STRONG></font>: </td>
<td width="117"> <font color="#FF0000"><strong><? echo $row["clavecct"];;?></strong></font> </td> 
</tr>
</table>
</center>


<form name="forma" method="post" action="cam.php" onSubmit="validacion();">
    <input type="hidden" name="var" value="1">

<table>
<tr>
<td>a
  </td>
</tr>
</table>

<TABLE width="59" bgcolor="#E4E4E4" align="left"  border=0 rules="none" cellspacing=0 cellpadding=2 bordercolor="#E4E4E4" >
	<tr>
    <td width="55" colspan="3" align="left"><input type="button" onClick="menu();" value="  Menu "></td>
    </tr>
	<tr>
    <td align="left" colspan="3"><input type="submit" value="Grabar"></td>
    </tr>    
	<tr>
    <td align="left" colspan="3"><input type="button" onClick="menu();" value="   Salir  " disabled></td>
    </tr>        
  </TABLE>

<TABLE width="852"  border=1 rules="none" cellspacing=0 cellpadding=2 bordercolor="#E4E4E4" >
  <tr bgcolor="#E4E4E4"> 
    <td colspan="6" ><font face="Arial"><strong><font size="2">I. CARACTERISTICAS DE LA BIBLIOTECA</font></strong></font></td>
  </tr>
  <tr bgcolor="#E4E4E4"> 
      <td colspan="6"><font size="2" face="Arial">1. Escriba en metros cuadrados (n&uacute;meros enteros) la superficie total de:</font></td>
  </tr>
  <tr > 
    <td width="264" bgcolor="#FFFFFF"><font size="2" face="Arial">LA BIBLIOTECA</font></td>
    <td colspan="5" align="left">
      <input type="text" name="biblioteca" size="5" maxlength="5" disabled>    </td>
    </tr>
  
  <tr> 
    <td><font size="2" face="Arial">&Aacute;REA DE ESTANTER&Iacute;A</font></td>
    <td height="21" colspan="5">
      <input type="text" name="estanteria" size="5" maxlength="5"  onKeyPress="return numbersonly(this, event)">
    <script>/*
	var f1 = new LiveValidation('estanteria', {onlyOnSubmit: true } );
	f1.add( Validate.Presence );*/
	</script></td>
    </tr>
  <tr > 
    <td><font size="2" face="Arial">&Aacute;REA DE PERSONAL</font></td>

    <td colspan="5" align="left">
    <input type="text" name="personal" size="5" maxlength="5"  onKeyPress="return numbersonly(this, event)">
    <script>/*
	var f1 = new LiveValidation('personal');
	f1.add( Validate.Presence );*/
	</script>    </td>
    </tr>
  
  <tr > 
    <td><font size="2" face="Arial">&Aacute;REA DE LECTURA</font></td>

    <td colspan="5" align="left">
      <input type="text" name="lectura" size="5" maxlength="5"  onKeyPress="return numbersonly(this, event)">
    
   	<script>/*
	var f1 = new LiveValidation('lectura');
	f1.add( Validate.Presence );*/
	</script></td>
    </tr>
  <tr > 
    <td colspan="6"><font size="2" face="Arial"><strong>Nota: La superficie total de la biblioteca deber&aacute; ser igual a la suma de las &aacute;reas de personal, estanter&iacute;a y lectura.</strong></font></td>
    </tr>
  <tr> 
    <td colspan="6">&nbsp;</td>
    </tr>
  <tr bgcolor="#E4E4E4"> 
    <td height="18" colspan="6" ><font size="2" face="Arial">2. Escriba el n&uacute;mero de asientos disponibles para los usuarios de la biblioteca. Considere los de la sala de lectura.</font></td>
  </tr>
  <tr> 
    <td><font size="2" face="Arial">ASIENTOS</font></td>
    <td colspan="5" align="left">
      <input type="text" name="asientos" size="4" maxlength="4"  onKeyPress="return numbersonly(this, event)">
    <script>/*
	var f1 = new LiveValidation('asientos');
	f1.add( Validate.Presence );*/
	</script></td>
    </tr>
  <tr> 
    <td colspan="6">&nbsp;</td>
    </tr>
  <tr bgcolor="#E4E4E4"> 
    <td colspan="6"><font size="2" face="Arial">3. Escriba el horario de servicio, continuo o discontinuo, seg&uacute;n corresponda, considerando horas completas; en caso de tener horas con minutos, anote la hora inmediata superior. Llenar en formato 24 hrs.</font></td>
    </tr>
  <tr> 
    <td>&nbsp;</td>
    <td colspan="2" align="center"><font size="2" face="Arial">CONTINUO</font></td>

    <td colspan="2" align="left"><font face="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font size="2"> DISCONTINUO</font></font></td>
    </tr>
  <tr> 
    <td><font size="2" face="Arial">LUNES A VIERNES </font></td>
    <td width="20" align="center"><input name="lunes" id="1" value="1" type="radio" onClick="habilita(this)" <? if ($porti[0]==1) echo "checked"; ?> ></td>
    
 	<td width="182" align="center"><font face="Arial" size="2">DE:
    <input type="text" name="lunes1" onKeyPress="return numbersonly(this, event)" size="2" maxlength="2" >
    <script>/*
	var lunes1 = new LiveValidation('lunes1');	
//	lunes1.add( Validate.Length, { minimum: 0, maximum: 23 } );
	lunes1.add( Validate.Length, { minimum: 0, maximum: 23 } );    
//	lunes1.add( Validate.Presence );	*/
	</script>    
    A</font>
	<input type="text" name="lunes2" onKeyPress="return numbersonly(this, event)" size="2" maxlength="2" >
    <script>/*
	var lunes2 = new LiveValidation('lunes2');
	lunes2.add( Validate.Presence );*/
	</script>
</td>
 	<td width="20" align="left"><input name="lunes" id="2" value="2" type="radio" onClick="habilita(this)" <? if ($porti[0]==1) echo "checked";  ?> ></td>
    <td width="334" align="left"><font size="2" face="Arial">DE:
        <input type="text" name="lunes3"  onKeyPress="return numbersonly(this, event)" size="2" maxlength="2" <? echo "value=" . $parce[1];  ?>>
A
<input type="text" name="lunes4" size="2" onKeyPress="return numbersonly(this, event)" maxlength="2" <? echo "value=" . $parce[2];  ?>>
Y DE:
<input type="text" name="lunes5" onKeyPress="return numbersonly(this, event)" size="2" maxlength="2" <? echo "value=" . $parce[1];  ?>>
A
<input type="text" name="lunes6" size="2" onKeyPress="return numbersonly(this, event)" maxlength="2" <? echo "value=" . $parce[2];  ?>>
    </font></td>
  </tr>
  <tr> 
    <td><font size="2" face="Arial">S&Aacute;BADO</font></td>
   <td align="center"><input name="sabado" id="1" value="1" type="radio" onClick="habilita(this)" <? if ($porti[0]==1) echo "checked";  ?> ></td>

    <td align="center"><font size="2" face="Arial">DE:
        <input type="text" name="sabado1" onKeyPress="return numbersonly(this, event)" size="2" maxlength="2" <? echo "value=" . $parce[1];  ?>>
A
<input type="text" name="sabado2" size="2"  onKeyPress="return numbersonly(this, event)" maxlength="2" <? echo "value=" . $parce[2];  ?>>
    </font></td>
    <td align="left"><input name="sabado" id="2" value="2" type="radio" onClick="habilita(this)" <? if ($porti[0]==1) echo "checked";  ?> ></td>
    <td align="left"><font size="2" face="Arial">DE:
        <input type="text" name="sabado3" onKeyPress="return numbersonly(this, event)" size="2" maxlength="2" <? echo "value=" . $parce[1];  ?>>
A
<input type="text" name="sabado4" size="2" onKeyPress="return numbersonly(this, event)" maxlength="2" <? echo "value=" . $parce[2];  ?>>
Y DE:
<input type="text" name="sabado5" onKeyPress="return numbersonly(this, event)" size="2" maxlength="2" <? echo "value=" . $parce[1];  ?>>
A
<input type="text" name="sabado6" size="2" onKeyPress="return numbersonly(this, event)" maxlength="2" <? echo "value=" . $parce[2];  ?>>
    </font></td>
  </tr>
  <tr> 
    <td><font size="2" face="Arial">DOMINGO</font></td>
    <td align="center"><input name="domingo" id="1" value="1" type="radio" onClick="habilita(this)" <? if ($porti[0]==1) echo "checked";  ?> ></td>

    <td align="center"><font size="2" face="Arial">DE:
        <input type="text" name="domingo1" onKeyPress="return numbersonly(this, event)" size="2" maxlength="2" <? echo "value=" . $parce[1];  ?>>
A
<input type="text" name="domingo2" size="2" onKeyPress="return numbersonly(this, event)" maxlength="2" <? echo "value=" . $parce[2];  ?>>
    </font></td>
    <td align="left"><input name="domingo" id="2" value="2" type="radio" onClick="habilita(this)" <? if ($porti[0]==1) echo "checked";  ?> ></td>
    <td align="left"><font size="2" face="Arial">DE:
        <input type="text" name="domingo3" onKeyPress="return numbersonly(this, event)" size="2" maxlength="2" <? echo "value=" . $parce[1];  ?>>
A
<input type="text" name="domingo4" size="2" onKeyPress="return numbersonly(this, event)" maxlength="2" <? echo "value=" . $parce[2];  ?>>
Y DE:
<input type="text" name="domingo5" onKeyPress="return numbersonly(this, event)" size="2" maxlength="2" <? echo "value=" . $parce[1];  ?>>
A
<input type="text" name="domingo6" size="2" onKeyPress="return numbersonly(this, event)" maxlength="2" <? echo "value=" . $parce[2];  ?>>
    </font></td>
  </tr>
  <tr > 
    <td height="18" colspan="6"></td>
  </tr>
  <tr> 
    <td  bgcolor="#E4E4E4" colspan="3"><font size="2" face="Arial">4. Escriba el numero de d&iacute;as al a&ntilde;o que se ofrece el servicio. </font></td>
    <td colspan="2"><input type="text" name="dias" onKeyPress="return numbersonly(this, event)" size="3" maxlength="3" <? echo "value=" . $parce[1];  ?>></td>
   </tr>
  <tr> 
    <td colspan="6">&nbsp;</td>
    </tr>
  <tr bgcolor="#E4E4E4"> 
    <td colspan="6"><font size="2" face="Arial">5. Seleccione el tipo de clasificaci&oacute;n adoptada por la biblioteca</font></td>
    </tr>
  <tr> 
    <td ><font size="2" face="Arial">DEWEY O DECIMAL</font></td>
    <td colspan="5" c align="left">
      <input name="clasificacion" id="1" value="1" type="radio" onClick="deshabilitar(this)" <? if ($porti[0]==1) echo "checked";  ?> >
   	  </td>
    </tr>
  <tr> 
    <td><font size="2" face="Arial">LIBRARY OF CONGRESS (LC)</font></td>
	<td  colspan="5"align="left"><font face="Arial">
	  <input name="clasificacion" id="2" value="2" type="radio" onClick="deshabilitar(this)" <? if ($porti[0]==1) echo "checked";  ?> >
	</font></td>
    </tr>
  <tr> 
    <td><font size="2" face="Arial">OTROS*</font></td>

   <td colspan="2" align="left"><font face="Arial">
     <input name="clasificacion" id="3" value="3" type="radio" onClick="deshabilitar(this)" <? if ($porti[0]==1) echo "checked";  ?> >
   </font></td>

    <td colspan="3" align="left"><font face="Arial" size="2">ESPECIFIQUE: 
        <input type="text" name="especifique" size="15" maxlength="15" disabled>
    </font></td>
    </tr>
  <tr> 
    <td height="18"><font size="2" face="Arial">NINGUNO</font></td>
    <td height="18" colspan="5"><font face="Arial">
      <input name="clasificacion" id="4" value="4" type="radio" onClick="deshabilitar(this)" <? if ($porti[0]==1) echo "checked";  ?> >
    </font></td>    
  </tr>
  <tr> 
    <td colspan="6">&nbsp;</td>
	</tr>
  <tr bgcolor="#E4E4E4"> 
    <td colspan="10"><font size="2" face="Arial">6. Seleccione el tipo de catalogo que utiliza</font></td>
	</tr>
  <tr> 
    <td><font size="2" face="Arial">TARJETAS</font></td>
<td colspan="5" align="left"><font face="Arial">
  <input name="catalogo" type="radio" value="1" id="1" <? if ($multi[0]==1) echo "checked";  ?> >
</font></td>
    </tr>
  <tr> 
    <td><font size="2" face="Arial">EL&Eacute;CTRONICO</font></td>
   <td colspan="5" align="left"><font face="Arial">
     <input name="catalogo" id="2" value="2" type="radio" <? if ($gimna[0]==1) echo "checked";  ?> >
   </font></td>
    </tr>

  <tr> 
    <td height="18"><font size="2" face="Arial">MIXTO</font></td>
  	<TD colspan="5"><font face="Arial">
  	  <input name="catalogo" id="3" value="3" type="radio" <? if ($gimna[0]==1) echo "checked";  ?> >
  	</font></TD>
  </tr>
  
  <tr> 

    <td colspan="6">&nbsp;</td>
   </tr>
  <tr bgcolor="#E4E4E4"> 
    <td colspan="6"><font size="2" face="Arial">7. Seleccione el tipo de estanter&iacute;a que se encuentra en el acervo.</font></td>
    </tr>
  <tr> 
    <td><font size="2" face="Arial">ABIERTA</font></td>
    <td  colspan="5"align="left"><font face="Arial">
      <input name="testante" type="radio" value="1" id="1" <? if ($coci[0]==1) echo "checked";  ?> >
    </font></td>
    </tr>
  <tr> 
    <td><font size="2" face="Arial">CERRADA</font></td>
    
	<td colspan="5" align="left"><font face="Arial">
	  <input name="testante" id="2" value="2" type="radio" <? if ($inten[0]==1) echo "checked";  ?> >
	</font></td>
    </tr>
  <tr> 
    <td><font size="2" face="Arial">MIXTA</font></td>

    <td colspan="5" align="left"><font face="Arial">
      <input name="testante" id="3"  value="3" type="radio" <? if ($lavan[0]==1) echo "checked";  ?> >
    </font></td>
    </tr>
  <tr> 
    <td colspan="6" align="center">&nbsp;</td>
    </tr>
  <tr bgcolor="#E4E4E4"> 
    <td height="24" colspan="6"><font size="2" face="Arial">8. Escriba el n&uacute;mero de estantes y los metros lineales que ocupan los libros y revistas que se encuentran en ellos.</font></td>
    </tr>
  <tr> 
    <td><font size="2" face="Arial">ESTANTES</font></td>
	
    <td colspan="2" align="left">
    <input type="text" name="estantes" size="4" maxlength="4">
    <script>/*
	var f1 = new LiveValidation('estantes');
	f1.add( Validate.Presence );*/
	</script>
    
    </td>

    <td colspan="2" align="left"><font size="2" face="Arial">METROS</font>
        <input type="text" name="metros" size="5" maxlength="5">
    <script>/*
	var f1 = new LiveValidation('metros');
	f1.add( Validate.Presence );*/
	</script>        
    </td>
    </tr>
</table>
<br>
<TABLE width="852" align="center"  border=1 rules="none" cellspacing=0 cellpadding=2 bordercolor="#E4E4E4" >

<tr bgcolor="#E4E4E4">
<td><font size="2" face="Arial"><strong>II. USUARIOS</strong></font></td>
</tr>

<td bgcolor="#E4E4E4" width="569"><font size="2" face="Arial">1. Escriba el numero de personas que durante el aņo utilizaron el acervo de la biblioteca</font></td>
</tr>
<tr>
<td>
  <p>
    <input type="text" name="usuarios" size="7" maxlength="7">
    <script>/*
	var f1 = new LiveValidation('usuarios');
	f1.add( Validate.Presence );*/
	</script>    
	</td></tr>


  <tr> 
    <td align="center">&nbsp;</td>
    </tr>
<tr>
<td bgcolor="#E4E4E4"><font size="2" face="Arial">2. Escriba el numero de personas inscritas en la biblioteca para hacer uso del servicio de prestamo a domicilio</font></td>
</tr>
<tr>
<td><input type="text" name="inscritos" size="7" maxlength="7">
    <script>/*
	var f1 = new LiveValidation('inscritos');
	f1.add( Validate.Presence );*/
	</script>	</td>
</tr>
</table>
</form>

<script type="text/javascript">
<!--
var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1");
//-->
</script>
</body>
</html>
