function openCategorySelector() {
     $$('.cswindow').each(function(el) {
                 el.style["display"] = "block";
     });
     
}

function closeCategorySelector() {
     $$('.cswindow').each(function(el) {
                 el.style["display"] = "none";
     });
}

function openLocationSelector() {
     $$('.lswindow').each(function(el) {
                 el.style["display"] = "block";
     });

}

function closeLocationSelector() {
     $$('.lswindow').each(function(el) {
                 el.style["display"] = "none";
     });
}


function displayInfoWindow(objectId) {
    //alert("a");
   // $$('#info-window').setStyle("top", "200px");
   // $$('#info-window').setStyle("left", "300px");
    //alert("cint");
    //alert(objectId)
    $('info-window').setStyle("display", "block");
    $('info-window').setPosition($(objectId).getPosition());
   // $('info-window').position();;
    //alert($(objectId).getSize());
   // $$('#info-window').position();
}

function hideInfoWindow() {
    $('info-window').setStyle("display", "none");
}

function displaySearchHintWindow(object) {
    
    $('search-hint-window').setStyle("display", "block");
    //$('search-hint-window').setPosition(object.getPosition());
}

function hideSearchHintWindow() {
    $('search-hint-window').setStyle("display", "none");
}

function categorySwitchSetup() {
    var obj = $('category-switch')
    if(obj == null) return; // if element is not present
    obj.addEvent('click', function(event) {
        event.stop();
        openCategorySelector();
    });
}

function locationSwitchSetup() {
    var obj = $('location-switch')
    if(obj == null) return; // if element is not present
    obj.addEvent('click', function(event) {
        event.stop();
        openLocationSelector();
    });
}
