var FullWindow = null;

function closeFullWindow() {
    if (FullWindow && FullWindow.open && !FullWindow.closed) {
	FullWindow.close();
    }
}

function popUpWindow(url,name,width,height,show_location,show_directories) {
    var features = 
	'width=' + width + ',' +
	'height=' + height + ',' +
	'screenx=20,' +
	'screeny=20,' +
	'location=' + show_location + ',' +
	'toolbar=no,' +
	'directories=' + show_directories + ',' + 
	'menubar=no,' + 
	'scrollbars=yes,' +
	'dependent=yes';
    
    if (FullWindow && FullWindow.open && !FullWindow.closed) {
	FullWindow.close();
    }

    FullWindow = window.open(url, name, features);
}

function auto_check(form_name, check_name, uncheck_name) {
    my_checkbox = eval('document.' + form_name + '.' + check_name);
    my_checkbox.checked = true;

    if ( uncheck_name ) {
	my_checkbox = eval('document.' + form_name + '.' + uncheck_name);
	my_checkbox.checked = false;
    }
}

function auto_toggle_checkboxes(form_name, this_box_name, that_box_name) {
    this_box = eval('document.' + form_name + '.' + this_box_name);
    that_box = eval('document.' + form_name + '.' + that_box_name);

    ( this_box.checked ) ? that_box.checked = false : that_box.checked = true;
}

