<?php use_helper('UrlFunctions');?>
<script>
$.ajaxSetup({ cache: false });

findControl = function()
{  
  concatValueStr();
}
concatValueStr = function()
{
  strFormSerialize = $('form').serialize();
  //alert(strFormSerialize)
  if(arguments[0]){
    strFormSerialize += '&'+arguments[0];
  }
  executeFind(strFormSerialize);
}
executeFind = function(str)
{ 
  url = "<?=buildUrl('texto/grid', "block=".$block)?>";
    
  $o_elm = $( "#resultGrtid" );
  $o_elm.load(
                url, 
                str, 
                function(response, status, xhr)
                {
                  if (status == "error") 
                  {
                    var msg = "Sorry but there was an error: ";
                    alert(msg + xhr.status + " " + xhr.statusText);
                  }
                }
             );
}
cargandoImagenSerch = function()
{
	//disabledWin.setPathImage('/images/common/progress.gif');
	//disabledWin.show(true,true,'resultGrtid');
}
</script>
<script>

deleteRegistro = function(id){
  //buildUrl('aldia/delete/id/'block=001'
  if(confirm("¿Esta seguro de eliminar la ficha Tema con Id : "+id+ " ?")){
      //objMainTab.reqBody('<? //=buildUrl('aldia/add')?>','block=001&delete=1&id='+id);   
      parent.objMainTab.reqBody('<?=buildUrl('texto/delete')?>','&delete=1&cod=jj&id='+id);
  }
  
}

</script>

<table width="100%" cellspacing="0" cellpadding="0" border="0" style="margin-top: 5px; margin-bottom: 5px;">
  <tr>
    <td class="titleBody"><li>Lista de Textos</li></td>
     <div id="message"></div>
    <td align="right">
      <!--<input type="button" class="button" value="Nuevo Tema" onclick="location.href='<?php echo buildUrl('texto/add','block=001')?>'" title="Nuevo Tema"/>
      -->
    </td>
  </tr>
</table>

<form action="" method="post" name="form1" id="form1">
  <input type="hidden" name="rand" value="<?=rand(0,99999)?>">
  <table width="100%" cellspacing="0" cellpadding="0" border="0" class="marco" style="padding-left: 10px;">
    <tr>
      <td colspan="2"><img width="1" height="4" src="/images/common/spacer.gif"></td>
    </tr>
    
    <tr>
      <td width="50%" nowrap="nowrap">
         <table width="30%" cellspacing="4" cellpadding="0" border="0" class="SubCabecera">
          <tr>
            <td width="35%" nowrap="nowrap"><div class="field-label"><label for="sRuc" class="label">Titulo:</label></div></td>
            <td nowrap="nowrap"><input type="text" class="text" name="Titulo" id="Titulo"/></td>
          </tr>
          <tr>
            <td width="35%" nowrap="nowrap"><div class="field-label"><label for="sRuc" class="label">Estado:</label></div></td>
             <td nowrap="nowrap">
			  <select name="cboEstado" id="cboEstado" type="text" class="combo"/> 
			      <option value="" >Seleccione</option>
			      <option value="A">Publicado</option>
			      <option value="I">No Publicado</option> 
			 </select>
		   </td> 
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td align="center" colspan="100"><input type="button" onclick="findControl();" value="Buscar" id="btn_frmFindFeaturesTpl" class="button"></td>
    </tr>
    <tr>
      <td colspan="2"><img width="1" height="4" src="/images/common/spacer.gif"></td>
    </tr>
  </table>
</form>
<div id="resultGrtid">
</div>
<?if($msg){?>
 <script>
    $('#message').html("<?=$msg?>").show('slow');
    setTimeout("$('#message').hide(1000)",3000);
  </script>
<? }?>
