function toggle_display(id, value) {
	if (value) {
		document.getElementById(id).style.display = "inline";
	}
	else {
		document.getElementById(id).style.display = "none";
	}
}

function new_window(url, popup, width, height, left, top) {
	var today = new Date();
	var milliseconds = today.getTime();
	var win_id = 'win'+milliseconds;
	var attr = 'status=1,directories=0,copyhistory=0,';
	if (popup) {
		if (width)  attr += 'width='+width+',';
		if (height) attr += 'height='+height+',';
		if (left)   attr += 'left='+left+',screenX='+left+',';
		if (top)    attr += 'top='+top+',screenY='+top+',';
		attr += "toolbar=0,menubar=0,location=0,scrollbars=0,resizable=0";
	}
	else {
		attr += "toolbar=1,menubar=1,location=1,scrollbars=1,resizable=1";
	}
	var win_h = window.open(url, win_id, attr);
	win_h.focus();
}
