
function bartoggle(barname) {

        bardiv = window.document.getElementById(barname);
        uparrow= window.document.getElementById(barname+'up');
        downarrow= window.document.getElementById(barname+'down');

        if (bardiv.style.display == "none") {
            bardiv.style.display = "block";
            uparrow.style.display = "block";
            downarrow.style.display = "none";

        } else {
            bardiv.style.display = "none";
            uparrow.style.display = "none";
            downarrow.style.display = "block";
        }
}

function floattoggle(barname) {
		
		bardiv = window.document.getElementById(barname);

        if (bardiv.style.display == "none") {
            bardiv.style.display = "block";

        } else {
            bardiv.style.display = "none";
        }
}

function xrow(rowname,toggle) {
		
		if (toggle == "1") {
            rowname.style.backgroundColor = "#bbd9ed";
		} else {
			rowname.style.backgroundColor = "#ffffff";
        }
}

function rcol(colour_str,obj) {
		
	if (colour_str == 'x') {
		$new_colour 		= "#94c1e7";
		$new_font_colour	= "#ffffff";
	} else {
		$new_colour 		= colour_str;
		$new_font_colour	= "#000000";
	}
	
	obj.style.backgroundColor 	= $new_colour;
	obj.style.color 			= $new_font_colour;
}	

function showpopup() {

    popupdiv = window.document.getElementById('PopupMenu');
    
    if (popupdiv.style.visibility == "hidden") {
        popupdiv.style.visibility = "visible";
    } else {
        popupdiv.style.visibility = "hidden";
    }
}
