problem with datepicker

problem with datepicker

Hellow, I am doing this --->
 
 
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="jquery-ui-1.7.2.custom.min.js"></script>
<script type="text/javascript">
var tipo="";
var fecha="";
var lugar="";
var resp="";





function inicio(){
$('#frm_asistentes').hide();
$('#txt_fecha').datepicker({ dateFormat: 'yy-mm-dd'});
 //-------------------------
  $("#btn_ciclovia").click(function(){
  tipo=$("input[id='rb_tipo']:checked").attr('value');
  fecha=$('#txt_fecha').attr('value');
  lugar=$('#sl_lugar').attr('value');
  resp=$('#sl_responsable').attr('value');
  $('#frm_ciclorecreovias').hide();
  $('#frm_asistentes').show();
  return false;
 });
//-------------------------
$("#btn_persona").click(function(){
  var ide=$('#txt_ide').attr('value');
  var nombre=$('#txt_nombre').attr('value');
  var edad=$('#txt_edad').attr('value');
   
     if(edad.length<1)
     edad=0;
  
  var genero=$("input[id='rb_sexo']:checked").attr('value');
  $.ajax({
   type: "POST",
   url: 'estadisticas/ciclovias/guardar_inscritos.php',
   data:'ide='+ide+'&nombre='+nombre+'&genero='+genero+'&edad='+edad+'&resp='+resp+'&fecha='+fecha+'&lugar='+lugar+'&tipo='+tipo,
   success: function(data){
    alert("Datos Guardados");
    
   }
  });
  return false;
 });
//-------------------------
function rep_semanal()
{ $('#frm_ciclorecreovias').hide();
  $('#frm_asistentes').hide();
  $.ajax({
   type: "POST",
   url: 'estadisticas/ciclovias/reportese.php',
   success: function(datos){
    $('#reportes').html(datos);
    
   }
  });
}
//-------------------------
function rep_mensual()
{       
  $('#frm_ciclorecreovias').hide();
  $('#frm_asistentes').hide();
  $.ajax({
   type: "POST",
   url: 'estadisticas/ciclovias/reporteme.php',
   success: function(datos){
    $('#reportes').html(datos);
   }
  });
}
//-------------------------
$('#link_ciclorecreovia').click(function(){
        $('#reportes').html("");
        $('#frm_ciclorecreovias').show();
  $('#txt_fecha').datepicker('destroy');
  $('#txt_fecha').datepicker({ dateFormat: 'yy-mm-dd'});
  $('#frm_asistentes').hide();
  return false;
 });
//------------------------
$('#link_reportemen').click(function(){
        rep_mensual();  
  return false;
 });
//-----------------------
$('#link_reportesem').click(function(){  
        rep_semanal();
  return false;
 });
//-----------------------
}
</script>
















































































 
 
I am using jquery to show and hide forms inside a same DIV and when I show the form again the datepicker throws Error: inst is undefined, please tell me what is my error and if this has solution, otherwise I will have to use some selects to choose a date that is very important datum in my project