var countdown = 0;
var running = false;

function closecountdown() {
    if (countdown>0) {
        countdown--;
        setTimeout("closecountdown()",1000);
    } else {
        hide();
    }
}

function resetcount() {
    countdown = 5;
}

function show() {
    showmenu("venuefloat");
    startcount();
}

function startcount() {
    resetcount();
    if (!running) {
        running = true;
        closecountdown();
    }
}

function hide() {
    hidemenu("venuefloat");
    running = false;
}

function showmenu(divname) {
	document.getElementById(divname).style.visibility = "visible";
	document.getElementById(divname).style.display = "inline";
}

function hidemenu(divname) {
	document.getElementById(divname).style.visibility = "hidden";
	document.getElementById(divname).style.display = "none";
}

