select and deselect application

select and deselect application

Here my application (this is look up filed)

 







 

  If i select All category .. every category has to select . if i deselect that will not select .for that i write code like this 
    if (input.Choose_property.contains("All Categories"))
    {
        Choose_property.selectall();
    }
    else if (!input.Choose_property.contains("All Categories"))
    {
        Choose_property.deselectall();
    }

But if i select any one  of this property its not selecting . like if i select only Real property  ,the page is loading and nothing is selecting . 

please help me out .

Thanks you