function TGistogramma(graphic_id, isshowgraphic, flag) {
	this.instname = 'gg'+graphic_id;
	this.idinstname = 'id'+this.instname;
	this.eGG = $('#'+this.idinstname);
    var trs = $('table tbody tr', this.eGG);
	if (flag) $('table', this.eGG).insertBefore($('table', this.eGG).prev().prev());
    var gg = this;
    for (var i = 0; i < trs.length; i++) {
        $('td:eq(0)', trs[i]).css('text-align', 'center');
        $('td:eq(2)', trs[i]).css('text-align', 'right');
        $('td:eq(3)', trs[i]).css('text-align', 'right');
    }
	this.toggleGG = function() {
		$('#img', gg.eGG).toggle('');
		$('.ggshowhide a', gg.eGG).toggle();
        return false;
	};
    $('.ggshowhide a', this.eGG).click(this.toggleGG);
	$('#img', this.eGG).click(this.toggleGG).css('cursor','pointer');
	if (isshowgraphic) this.toggleGG();
}