function showRadioPlayer(url)
{
	var win = window.open(url, "rteradioplayer", "height=645,width=752,status=yes,toolbar=no,menubar=no,location=no");
	win.focus();
}

function gotoDate(dt)
{
	var new_date = new Date(dt);
	
	if(new_date > today)
		return;
	
	var month = new_date.getMonth()+1;
	if(month < 10) month = "0" + month;

	var date = new_date.getDate();
	if(date < 10) date = "0" + date;

	var new_loc = "/news/" + new_date.getFullYear() + "/" +  month + date + "/" + "index.html";


//	var new_loc = String(window.location);
//	if(re_url.exec(String(window.location)))
//	{
//		new_loc = new_loc.replace(re_url, "/" + new_date.getFullYear() + "/" +  month + date + "/");
//		var pos = new_loc.lastIndexOf("/");
//		new_loc = new_loc.substr(0, pos + 1) + "index.html";
//	}
//	else
//	{
//		var pos = new_loc.lastIndexOf("/");
//		new_loc = new_loc.substr(0, pos + 1) + "/" + new_date.getFullYear() + "/" +  month + date + "/" + "index.html";
//	}
	
	window.location = new_loc;
}

function gotoDateProg(dt)
{
	var new_date = new Date(dt);
	
	if(new_date > today)
		return;
	
	var month = new_date.getMonth()+1;
	if(month < 10) month = "0" + month;
	var date = new_date.getDate();
	if(date < 10) date = "0" + date;

	var new_loc = String(window.location);
	new_loc = "/news/" + new_date.getFullYear() + "/" +  month + date + "/" + PROG_FILENAME + ".html";
	
	window.location = new_loc;
}

function gotoDateProgPlayer(dt)
{
	var new_date = new Date(dt);
	
	if(new_date > today)
		return;
	
	var month = new_date.getMonth()+1;
	if(month < 10) month = "0" + month;
	var date = new_date.getDate();
	if(date < 10) date = "0" + date;

	var new_date = new_date.getFullYear() + month + date;
	
	load(new_date);
	TabbedPanels1.showPanel(0);
}


var CALENDAR_DATE = new Date();
var PROG_FILENAME="index";
function getCalendarDatesAsync(url, dt)
{
	if(Sarissa)
	{
		CALENDAR_DATE = dt;
		var xmlhttp = new XMLHttpRequest();
		xmlhttp.open("GET", url, true);
		
		xmlhttp.onreadystatechange = function() {
		    if (xmlhttp.readyState == 4) {
		        renderCalendar(CALENDAR_DATE, "gotoDateProg", xmlhttp.responseText)
		    }
		}
		xmlhttp.send(null);
	}
}

function changeMonth(dt)
{
	dt = new Date(dt);
	//getCalendarDatesAsync("/news/" + PROG_FILENAME + "/inc/archive.inc", dt.valueOf());
	getCalendarDatesAsync("/news/" + PROG_FILENAME + "/ajaxxml/archive.xml", dt.valueOf());
}

function textareaLimit(field, limit) {
	if (field.value.length > limit) {
		field.value = field.value.substring(0, limit);
		field.scrollTop = field.scrollHeight;
	}
}



function setadmpu() {}
