var rodzaj =new Array;



function Set_typ_dodatkowy(id_k)
{
var theobj= eval ('document.getElementById("q_typ_dodatkowy")');

     theobj.length=0;
     theobj.options[0]=new Option('wszystkie','');
     j=0;
     for(i=0;i<typ_dodatkowy.length-1;i++)
     {
      if(typ_dodatkowy[i][0]==id_k)
      {
      theobj.options[j+1]=new Option(typ_dodatkowy[i][2], typ_dodatkowy[i][1]);
      j++;
      }
    }

}





//---------------------------------------------------------
function SetRodzaj(id_k)
{
var theobj= eval ('document.getElementById("q_rodzaj")');

     theobj.length=0;
     theobj.options[0]=new Option('wszystkie','');
     j=0;
     for(i=0;i<rodzaj.length-1;i++)
     {
      if(rodzaj[i][0]==id_k)
      {
      theobj.options[j+1]=new Option(rodzaj[i][2], rodzaj[i][1]);
      j++;
      }
     }

}
//---------------------------------------------------------





//---------------------------------------------------------
function ClearSearch()
{
//$$("input[type=radio][name='q_rynek'][value='3']").writeAttribute("checked", "checked");
//$("someRadioGroupMember").writeAttribute("checked", "checked");
//$(’q_form′).q_rynek[2].checked=true
//$$(’input:checked[type="radio"][name="q_rynek"]‘).pluck(’2’)


//$("q_rynek").checked='wtórny';
document.getElementById("q_typ").checked=1;
document.getElementById("q_ulica").value='';
document.getElementById("q_kategoria").selectedIndex=0;
document.getElementById("q_miejscowosc").selectedIndex=0;
document.getElementById("q_cenaod").value='';
document.getElementById("q_cenado").value='';
document.getElementById("q_powod").value='';
document.getElementById("q_powdo").value='';
document.getElementById("q_nr").value='';
document.getElementById("q_dzielnica").value='';
//document.getElementById("q_pokoiod").value='';
//document.getElementById("q_pokoido").value='';


//document.q_form.reset();
}
//---------------------------------------------------------


