var win = 0;
function pop(id) {
    var ids = "news,about,about_floor,about_market,naemateli,contacts,place,design,galeria";
    //var ids = "contacts";
    var id_array = new Array();
    var flag = 0;
    id_array = ids.split(',');
    for (var i=0; i < id_array.length; i++) {
        if (document.getElementById(id_array[i])) {
            document.getElementById(id_array[i]).style.visibility = "hidden";
            if (id == id_array[i]) {
                flag = 1;
            }
        }
    }
    win = 0;
    if (flag == 1) {
        document.getElementById(id).style.visibility = "visible";
        win = 1;
        // test code below
    }

}

function map(state, id ) {
    if ((state == 1) && (win == 0)) {
        document.getElementById("a" + id).style.visibility = "visible";
        document.getElementById("d" + id).style.visibility = "visible";
    } else {
        document.getElementById("a" + id).style.visibility = "hidden";
        document.getElementById("d" + id).style.visibility = "hidden";
    }
}


///// floor tips

var obj_id;
var obj2_id;

function tip(id, pos) {
    obj_id = id;
    var obj = document.getElementById(id);  // tooltips
    var obj2 = document.getElementById("l" + id); // links
    obj.style.visibility = "visible";
    obj2.style.visibility = "visible";
    if (pos == 2) {
        obj.style.top = "290px";
    }
}

function out(e) {
    document.getElementById(obj_id).style.visibility = "hidden"; //tooltips
    document.getElementById("l" + obj_id).style.visibility = "hidden"; // links
}

