
function showdiv (div) {
    if (document.getElementById) {
        document.getElementById(div).style.display = 'block';
    }
    else {
        if (document.layers) {
            document.hideshow.visibility = 'visible';
        }
        else {
            document.all.hideshow.style.visibility = 'visible';
        }
    }
}

function clearid (field) {
    var cid = document.getElementById (field);
    cid.value = '';
}

function adduser_siteadmin () {
    var cid = document.getElementById("admin");
    var sid = document.getElementById("perms");

    if (cid.value == "true")
        sid.style.visibility = 'visible';
    else
        sid.style.visibility = 'collapse';
}

function adduser_addbands (action) {
    var cid = document.getElementById ("addbands");
    
    if (action == "show")
        cid.style.visibility = 'visible';
    else if (action == "hide")
        cid.style.visibility = 'collapse';
}

/*
function adduser_setallperms () {
    var perms = {prop1: perm_adduser};
    
    for each (var perm in perms) {
        cid = document.getElementsByName (perm);
        cid.selected = 'selected';
        alert(perm);
    }
}
*/

/* Event Section Functions */
function eventCheckLoc () {
	var eid	= document.addevent.location.value;
	var nid = document.getElementById ("newlocation");
	
	if (eid == "new")
		nid.style.display = 'block';
	else
	{
		nid.style.display = 'none';
		
		eventPopulateFields (eid);
	}
}

function eventPopulateFields (bar) {
	
	document.addevent.city.value	= places[bar].city;
	document.addevent.state.value	= places[bar].state;
	document.addevent.zip.value		= places[bar].zip;
}

function setHover (chosen, objectID) {
    if (chosen == "hover")
        document.getElementById(objectID).className="hover";
    else
        document.getElementById(objectID).className="nohover";
}

