
function preview(what, w, h, scrollbars) {
	if (!what) return;
	if (!w) w = 530;
	if (!h) h = 530;
	scrollbars = scrollbars ? 1 : 0;
	scr_w = screen.width;
	scr_h = screen.height;
	l = (scr_w - w) / 2;
	t = (scr_h - h) / 2;
	popup = window.open(what, "window_id", "width=" + w + "px,height=" + h + "px,left=" + l + "px,top=" + t + "px,scrollbars=" + scrollbars + ",location=0,toolbar=0,resizable=1,menubar=0,status=0,dependent=1");
	popup.focus();
}

function f(n_title, n_url, n_date, n_time, n_descr)
{
	this.title = n_title;
	this.url = n_url;
	this.date = n_date;
	this.time = n_time;
	this.descr = n_descr;
}

function compareTime(a,b) {
	if(a.date == b.date) {	
		if (a.time < b.time )
			return 1
		if (a.time > b.time)
			return -1
		// a must be equal to b
		return 0
	}
	if (a.date < b.date )
		return 1
	if (a.date > b.date)
		return -1
}


