var kontrola = 0;

function prenos(mypage, myname, w, h, scroll, vrijednost) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;

splitani = vrijednost.split(".")
for (i=0;splitani[i];i++) {
}

splitani[i-2] += "v"
spojeni = ""
for(j=0;j<i;j++) {
	if (j!=i-1) spojeni += splitani[j] + "."
else spojeni += splitani[j]
}


myname = myname.replace("_","  ")

winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',noresize'
win = window.open(mypage, 'iTa', winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
win.document.writeln("<title>" +myname+ "</title>");
win.document.writeln("<style type=\"text/css\"><!-- .body { font-family:  Arial, Helvetica, sans-serif; font-size: 11px; font-style: normal; font-weight: normal; text-decoration: none }--></style>")
win.document.write("<body bgcolor=\"#FFFFFF\"   text=\"#000000\" leftmargin=\"0\" topmargin=\"0\">");
win.document.writeln("<script>function resizeMove(twidth,theight) {resizeBy(twidth-" +w+",theight-" +h+");moveTo((screen.width-twidth)/2,(screen.height-theight)/2);}</script><img onLoad=resizeMove(this.width,this.height) name=fotog src=\"" +spojeni+ "\">");
win.document.write("<span class=body>Please wait...</span>");
win.document.writeln("</body>");

}

function HelpWindow(mypage, myname, w, h, scroll) {
var win2 = (screen.width - w) / 2;
var win3 = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+win2+',left='+win3+',scrollbars='+scroll+',noresize'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function init(){
    linkovi = document.getElementsByTagName ("a");
    for (x=0; x < linkovi.length; x++){
      linkovi[x].onfocus = new Function ('if (this.blur) this.blur()');
    }
  }


function Suggest(jezik,stranica) {
w = 440
h = 240
var win2 = (screen.width - w) / 2;
var win3 = (screen.height - h) / 2;

winprops = 'height='+h+',width='+w+',top='+win3+',left='+win2+',scrollbars=no,noresize'
sugWin = window.open('/suggest.asp?jezik='+jezik+'&stranica='+stranica,'iTA',winprops)

if (parseInt(navigator.appVersion) >= 4) { sugWin.window.focus(); }

}

function Printaj(x,sirina) {
w = sirina + 50
h = 400
var win2 = (screen.width - w) / 2;
var win3 = (screen.height - h) / 2;

winprops = 'height='+h+',width='+w+',top='+win3+',left='+win2+',scrollbars=yes,noresize,status=yes'
printWin = window.open('/print.asp','iTA',winprops)

if (parseInt(navigator.appVersion) >= 4) { printWin.window.focus(); }
printWin.x = x
printWin.sirina = sirina
}


function clearfield(){
if (document.findform.sear.value == "Unesite pojam")
	document.findform.sear.value = "";
}
	var Loc=0;
	var Title=0;
	function BookMark(){
					var Loc=window.document.URL;
					var Title=document.title;
					window.external.AddFavorite(Loc,Title);
					}


function bookmark(http, title){
	if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
		window.external.AddFavorite(http,title);
	}
	else
	{
		var msg = "Da bi ste dodali stranicu "
			msg += title + " u \n bookmarks pritisnite";
		if(navigator.appName == "Netscape") 
		{
			msg += " (CTRL-D)";
			alert(msg);
		}
	}
}

// ispisuje  "bookmark / add to favorites" ovisno o browseru 
function writeBookFav(){
	if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
		document.write("add to favorites")
	}
	else
	{
		document.write("bookmark page")	
	}
}

// Print Page
function PrintPage(page){
	//alert(page);
	window.print();
}

