function get_event(country)
{
	url='/event_list.php';
	rel='country='+country;
	var myAjax = new Ajax.Request(url,{parameters:rel,onComplete: CallBack_get_event});
}
function CallBack_get_event(xmlhttp)
{
	result=xmlhttp.responseText;
	$("event").innerHTML=result;
}
function reload_data(id)
{
	if(id==0)
		return;
	reload(id);
	var newdate=new Date();
	newtime=newdate.getTime();
	url='/get_index_data.php?timestamp='+newtime;
	rel='index_id='+id;
	var myAjax = new Ajax.Request(url,{parameters:rel,onComplete: CallBack_get_index});
}
function CallBack_get_index(xmlhttp)
{
	result=xmlhttp.responseText;
	$("index_data").innerHTML=result;
}
function reload(id)
{
	if(id==0)
	{
		return;
	}
	else
	{
		var so = new SWFObject("/chart/chart.swf", "chart", "100%", "100%", "9", "#FFFFFF");
		var newdate=new Date();
		newtime=newdate.getTime();
		so.addVariable("data","/calendar/data/max_1_"+id+".php?time="+newtime);
		so.addParam("allowScriptAccess", "sameDomain");
		so.addParam("wmode", "transparent");
		so.write("calendarflash");
	}
}
