

function discipline_popup(url) {
	discipline = window.open(url, 'window', 'height=600, width=400, resizable=0, scrollbars=yes');
	if (window.focus) {
		discipline.focus()
	}
	return false;
}


/* actualno */

var bw = new browsers_checks();
var stop = false;
var news_ix = 0;
var ie_crr = bw.ie ? 1 : 0;

function news_generate() {
	for (w=0; w<=news.length-1-ie_crr; w++) {
		if ((w+1) == 1) {
			document.write('<div id="news-'+(w+1)+'" class="actuality-text"><a href="news.php?id='+news[w][0]+'">'+news[w][1]+' - '+news[w][2]+'</a></div>');
		} else {
			document.write('<div id="news-'+(w+1)+'" class="actuality-text" style="display: none;"><a href="news.php?id='+news[w][0]+'">'+news[w][1]+' - '+news[w][2]+'</a></div>');
		}
	}
	news_start();
}

function news_start() {
	if (!stop) {
		newsInterval = window.setInterval("news_rotate()", 10000); // 10 sec.
		stop = true;
	}
}

function news_stop() {
	if (stop) {
		window.clearInterval(newsInterval);
		stop = false;
	}
}

function news_change(nid) {
	news_ix = nid-1;
	news_rotate();
}
function browsers_checks() {
	this.n = navigator.userAgent;
	this.dom = document.getElementById ? 1 : 0;
	this.ie4 = document.all && !this.dom ? 1 : 0;
	this.ns4 = document.layers ? 1 : 0;
	this.ns = (this.n.indexOf("Netscape") >- 1) && !this.ns4;
	this.mz = (this.n.indexOf("Gecko") >- 1) && !this.ns;
	this.op = this.n.indexOf("Opera") >- 1;
	this.op8 = this.n.indexOf("Opera/8") >- 1 || (this.n.indexOf("MSIE") >- 1 && !this.ie4);
	this.ie = (this.n.indexOf("MSIE") >- 1) && !this.op && !this.ie4;
	this.bw = (this.ns || this.mz || this.ie || this.op8) ? 1 : 0;
	return this;
}

function getObj(id) {
	var obj = false;
	if (document.getElementById(id))
		obj = document.getElementById(id);
	return obj
}

