/* JavaScript Document */

function article_Comment(edition, art) {
	var act = 'article_comment.php?izdanje_id=' + edition + '&clanak_id=' + art + '';
	var sts = 'dependent=1,directories=0,location=0,menubar=0,personalbar=0,resizable=0,scrollbars=1,titlebar=0,toolbar=0,status=0,alwaysRaised=1,hotkey=0,width=400,height=500,top=' + ((screen.height/2) - 250) + ',left=' + ((screen.width/2) - 200) + '';
	window.open(act, 'Komentiraj_Clanak', sts);
}

function polzdravlje(item) {
	if ( item === 1 )
		window.open('zaustavite_starenje_zglobova.html', '', 'dependent=1,directories=0,location=0,menubar=0,personalbar=0,resizable=0,scrollbars=1,titlebar=0,toolbar=0,status=0,alwaysRaised=1,hotkey=0,width=640,height=500,top=' + ((screen.height/2) - 250) + ',left=' + ((screen.width/2) - 320) + '');
	if ( item === 2 )
		window.open('prevencija_bolesti_srca.html', '', 'dependent=1,directories=0,location=0,menubar=0,personalbar=0,resizable=0,scrollbars=1,titlebar=0,toolbar=0,status=0,alwaysRaised=1,hotkey=0,width=640,height=500,top=' + ((screen.height/2) - 250) + ',left=' + ((screen.width/2) - 320) + '');
}

function banks() {
	window.open('bankovni_racuni.html', 'Bankovni_računi', 'dependent=1,directories=0,location=0,menubar=0,personalbar=0,resizable=0,scrollbars=1,titlebar=0,toolbar=0,status=0,alwaysRaised=1,hotkey=0,width=640,height=500,top=' + ((screen.height/2) - 250) + ',left=' + ((screen.width/2) - 320) + '');
}

function export_Article(edition, id, format) {
	window.location='export.php?app=clanak&izdanje=' + edition + '&id=' + id + '&format=' + format + '';
}

function print_Article(edition, id) {
	window.open('print.php?app=clanak&izdanje=' + edition + '&id=' + id + '', 'Naša Riječ Print', 'dependent=1,directories=0,location=0,menubar=0,personalbar=0,resizable=0,scrollbars=1,titlebar=0,toolbar=0,status=0,alwaysRaised=1,hotkey=0,width=400,height=300,top=' + ((screen.height/2) - 150) + ',left=' + ((screen.width/2) - 150) + '');

}

function print_Story(id) {
	window.open('print.php?app=prica&id=' + id + '', 'Naša Riječ Print', 'dependent=1,directories=0,location=0,menubar=0,personalbar=0,resizable=0,scrollbars=1,titlebar=0,toolbar=0,status=0,alwaysRaised=1,hotkey=0,width=400,height=300,top=' + ((screen.height/2) - 150) + ',left=' + ((screen.width/2) - 150) + '');

}

function export_Story(id, format) {
	window.location='export.php?app=prica&id=' + id + '&format=' + format + '';
}

function update_Books(id, qty) {
	window.location='form.php?app=kosara&action=izmjeni_kolicinu&id=' + id + '&kolicina=' + qty + '';
}

function remove_Book(id) {
	if ( confirm('Ovom akcijom ćete izbaciti knjigu iz košare!') === true )
	window.location='form.php?app=kosara&action=izbaci_knjigu&id=' + id;
}

function change_Edition(id) {
	window.location='index.php?izdanje_id=' + id;
}



sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
