function SetCalendar(date_str)
{
	date=date_str.split('&');
	monthArr=date[0].split('=');
	yearArr=date[1].split('=');
	region=date[2].split('=');

   	jQuery.get('/soulex/components/calendar/calendar_template.php?month='+monthArr[1]+'&year='+yearArr[1]+'&region='+region[1], function(response){
   			jQuery("#calendar").html(response);
   	})

}

function setDate(m_val, y_val) {
   	jQuery.get('/soulex/components/calendar/calendar_template.php?month='+m_val+'&year='+y_val, function(response){
   		jQuery("#calendar").html(response);
   	})
}

function selectMonth() {
	//$("#calendar_months").css({"position":"absolute", "margin-top": "-181px", "margin-left":"40px"});
	jQuery("#calendar_months").toggle();
}

function selectYear() {
	//$("#calendar_years").css({"position":"absolute", "margin-top": "-181px", "margin-left":"110px"})
	jQuery("#calendar_years").toggle();
}

function LookForDate() {
	var m = jQuery('#month_select');
	var y = jQuery('#year_select');
	var d = jQuery('#day_select');

	m_val = parseInt(m.val())+1;
	y_val = y.val();
	d_val = d.val();

	document.location.href = '/news/'+y_val+'/'+m_val+'/'+d_val+'/';

}

function SetCalendarExt(prefix, date_str)
{
	date=date_str.split('&');
	monthArr=date[0].split('=');
	yearArr=date[1].split('=');
   	
   	jQuery.get('/soulex/components/calendar.'+prefix+'/calendar_template.php?month='+monthArr[1]+'&year='+yearArr[1], function(response){
   		jQuery("#"+prefix+"calendar").html(response);
   	})
}
