
/*First*/


function AkaGraphShow (time, by, what)
	{
	document.getElementById("aka_graph_"+window.aka_graph_what).style.fontWeight="normal";
	document.getElementById("aka_graph_"+window.aka_graph_by).style.fontWeight="normal";
	document.getElementById("aka_graph_"+window.aka_graph_time).style.fontWeight="normal";	
	window.aka_graph_what=what;
	window.aka_graph_by=by;
	window.aka_graph_time=time;
	link="http://stat.akavita.com/charts/charts.swf?library_path=http%3A%2F%2Fstat.akavita.com%2Fcharts%2Fcharts_library&php_source=http%3A%2F%2Fstat.akavita.com%2Fcharts%2F"+window.aka_graph_time+".php%3Fid%3D"+window.aka_site_id+"%26what%3D"+window.aka_graph_what+"%26by%3D"+window.aka_graph_by+"%26rnd%3D1&license=F1UZWEFNV2B26UA0GFR-ZB4HZ5RKGK";
	var text="Дынаміка ";
	if (window.aka_graph_what=="v") {text = text+"наведнікаў ";}
	if (window.aka_graph_what=="se") {text = text+"наведванняў ";}
	if (window.aka_graph_what=="hi") {text = text+"праглядаў старонак ";}
	if (window.aka_graph_time=="hours") {text = text+"па гадзінах ";}
	if (window.aka_graph_time=="wdays") {text = text+"па днях тыдня ";}
	if (window.aka_graph_time=="months") {text = text+"па месяцах ";}
	if (window.aka_graph_time=="sample") {text = text+"за апошнія 8 тыдняў ";}
	if (window.aka_graph_time=="total") {text = text+"за увесь час ";}
	if (window.aka_graph_by=="by") {text = text+"з Беларусі ";}
	if (window.aka_graph_by=="noby") {text = text+"з усіх краін, акрамя Беларусі ";}
	document.getElementById("aka_graph_head").innerHTML=text;
	document.getElementById("aka_graph_"+window.aka_graph_what).style.fontWeight="bold";
	document.getElementById("aka_graph_"+window.aka_graph_by).style.fontWeight="bold";
	document.getElementById("aka_graph_"+window.aka_graph_time).style.fontWeight="bold";
	AkaSwfLoad ("aka_graph_swf", "graph", link, "", "600", "240", "", "");
	}
	
/*Second*/

var aka_graph_from_what ="a"; /*Пишем сервером, пока для примера пользовали отчеты аудитории*/
// var aka_graph_by =""; /*by - by; Пишем сервером - берем из установленных параметров фильтрации*/
// var aka_graph_time ="sample"; /*hours, wdays, sample, months, total  Пишем сервером - берем из установленных параметров фильтрации*/	 
 
 function AkaGraphFromShow (time, by, what)	
		{
		document.getElementById("aka_graph_from_what_"+window.aka_graph_from_what).style.fontWeight="normal";
		window.aka_graph_from_what=what;
		var link="http://stat.akavita.com/charts/charts.swf?library_path=http%3A%2F%2Fstat.akavita.com%2Fcharts%2Fcharts_library&php_source=http%3A%2F%2Fstat.akavita.com%2Fcharts%2Fdaydiv.php%3Fid%3D"+window.aka_site_id+"%26what%3D"+window.aka_graph_from_what+"%26by%3D"+window.aka_graph_by+"%26rnd%3D1%26time%3D1"+window.aka_graph_time+"&license=F1UZWEFNV2B26UA0GFR-ZB4HZ5RKGK";
		/*В ссылку дописать время для графика "Откуда"*/
		document.getElementById("aka_graph_from_what_"+window.aka_graph_from_what).style.fontWeight="bold";
		AkaSwfLoad ("aka_graph_from_swf", "graph_from", link, "", "300", "200", "");
		}


