var minHeight = 511;     // 490;//var minWidth = 765+205+20+15;var minWidth = 765;var title;			//odabrani stilvar velicina;var boja;		//  'da/ne'	crno/bijelo u bojivar sufiks;		// cb za c/b//---var tim;var stilVelicina ;var stilBoja ;var stilFajl ;var stilTitle;/*  isDOM=document.getElementById?true:false  isOpera=isOpera5=window.opera && isDOM  isOpera6=isOpera && window.print  isOpera7=isOpera && document.readyState  isMSIE=isIE=document.all && document.all.item && !isOpera  isStrict=document.compatMode=='CSS1Compat'  isNN=isNC=navigator.appName=="Netscape"  isNN4=isNC4=isNN && !isDOM  isMozilla=isNN6=isNN && isDOM  var agt=navigator.userAgent.toLowerCase();  var is_fx = ((agt.indexOf('mozilla/5')!=-1) && (agt.indexOf('spoofer')==-1) &&                    (agt.indexOf('compatible')==-1) && (agt.indexOf('opera')==-1)  &&                 (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));function getBody(){  if(isStrict){    return document.documentElement  }else{    return document.body  }}function getDocumentHeight(){  if(isMSIE || isOpera7 || isMozilla) return getBody().scrollHeight  if(isNN) return document.height  if(isOpera) return document.body.style.pixelHeight}*/  // macromedia funkcijefunction MM_goToURL() { //v3.0  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");}function MM_preloadImages() { //v3.0  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}}function MM_swapImgRestore() { //v3.0  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;}function MM_findObj(n, d) { //v4.01  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);  if(!x && d.getElementById) x=d.getElementById(n); return x;}function MM_swapImage() { //v3.0  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}}// zajednicke funkcijefunction kalkDmenu() {	var visina = 0;	var trazi = (brName == "Netscape") ? "FFmenuD" : "IEmenuD";	menuPos = document.getElementById(trazi);	if (! isNull(menuPos)){		visina = menuPos.clientHeight;	}	return visina;}function srediVisinu(level,id,razlika){	var nivo = '';	if (level == "top") {		nivo = "window.top.";	} else {		if (level == "parent") {			nivo = "window.parent.";		} else {			if (level == "") {				nivo = "window.";			} else {				nivo = "window.";			}		}	}			menuPos = eval(nivo+'document.getElementById("'+id+'");');	if (! isNull(menuPos)){//		alert(id + '  ' + razlika + 'px');		menuPos.style.height = razlika + 'px';	}}function showMenu() {	window.parent.menuGenerated = false;	if (window.parent.loaded){		menuPos = window.parent.document.getElementById("menu");		if (! isNull(menuPos)){			menuPos.innerHTML = dokTopmenu;			window.parent.menuGenerated = true;		}	} else {		setTimeout("showMenu()",100);	}}function showMenu2() {		menuPos = window.parent.document.getElementById("menu");		if (! isNull(menuPos)){			menuPos.innerHTML = dokTopmenu;			window.parent.menuGenerated = true;		}}function genMenus() {//   prikazuje lijevi menu	window.parent.menuGenerated = false;	if (window.parent.loaded){		var menuPos = window.parent.document.getElementById("menuTnaslov");		if (! isNull(menuPos)){			clearTimeout(tim);			menuPos.innerHTML = menuTnaslov;			var menuPos2 = window.parent.document.getElementById("menuT");			if (! isNull(menuPos2)){				menuPos2.innerHTML = menuT;				var menuPos3 = window.parent.document.getElementById("menuLnaslov");				if (! isNull(menuPos3)){					menuPos3.innerHTML = menuLnaslov;					var menuPos4 = window.parent.document.getElementById("menuL");					if (! isNull(menuPos4)){						menuPos4.innerHTML = menuL;						window.parent.menuGenerated = true;//						alert('menu generiran');						doDna();					} else {						tim = setTimeout("genMenus()",100);				}} else {					tim = setTimeout("genMenus()",100);			}} else {				tim = setTimeout("genMenus()",100);		}} else {			tim = setTimeout("genMenus()",100);	}} else {	//	alert('parent nije loaded');		tim = setTimeout("genMenus()",100);	}}function doDna() {//   poravnava menije (uzimajuci u obzir i sadrzaj)	if (window.parent.loaded){	if (window.parent.menuGenerated) {			menuPos = window.parent.document.getElementById("menu");		if (! isNull(menuPos)){					clearTimeout(tim);						var menuLijevo = parseInt(menuPos.clientHeight);						srediVisinu("","menuDpadding",0);					srediVisinu("","IEmenuD",parseInt(minHeight - 18));					var contentSize = visina();			var menuDesno = parseInt(kalkDmenu());					var dok =document.URL.toLowerCase();						//hack za vijesti i searchtdu			if (dok.indexOf('vijest') !=-1){				if((brName == "Netscape" &&  contentSize == 549) || (brName != "Netscape" &&  contentSize == 543)){	 				contentSize=minHeight;	 			}				if(brName != "Netscape" &&  contentSize == 537){	 				contentSize=514;	 			}	 						}			if (dok.indexOf('searchrestdu') !=-1){ 				contentSize=505;			}/*					alert ('l='+menuLijevo);			alert ('c='+contentSize);			alert ('d='+menuDesno);*/			var duzi=0;						// dodatno skracivanje L i D//			contentSize = parseInt(contentSize  + 2);								if (menuLijevo > menuDesno){				if (menuLijevo > contentSize){					duzi = menuLijevo;				}else{					duzi = contentSize;				}			}else{				if (menuDesno > contentSize){					duzi = menuDesno;				}else{					duzi = contentSize;				}			}			var razlika = parseInt(duzi - menuLijevo);			srediVisinu("parent","menuPadding",razlika);				srediVisinu("","IEmenuD",duzi);						razlika = parseInt(duzi - menuDesno);			srediVisinu("","menuDpadding",razlika);					var dodatniPomak;			switch(stilVelicina) { 		       case 'standardni':           		dodatniPomak = 6;				break;			  case 'veci':           		dodatniPomak = 12;				break;			  case 'najveci':          		dodatniPomak = 22;				break;			  default:          		dodatniPomak = 0;				break;		     }			setHeight("sad","parent",parseInt(duzi+dodatniPomak));			setHeight("contentFRM","top",parseInt(duzi+dodatniPomak));		} else {		tim = setTimeout("doDna()",100);	}} else {		tim = setTimeout("doDna()",100);	}} else {		tim = setTimeout("doDna()",100);	}}function visina() { 	//nece uzeti u obzir floated elemente	if (typeof document.height!= 'undefined') { 		docheight = document.height; 	} else if (document.compatMode && document.compatMode!= 'BackCompat') { 		docheight = document.documentElement.scrollHeight; 	} else if (document.body && typeof document.body.scrollHeight!= 'undefined') { 		docheight = document.body.scrollHeight; 	} 	return(docheight); } function showMenus() {// prikazuje lijevi i desni menu te ih poravnava (uzimajuci u obzir i sadrzaj)	window.parent.menuGenerated = false;	if (window.parent.loaded){			menuPos = window.parent.document.getElementById("menu");		if (! isNull(menuPos)){					clearTimeout(tim);						menuPos.innerHTML = dokTopmenu;			window.parent.menuGenerated = true;			var menuLijevo = parseInt(menuPos.clientHeight+0);//			var menuLijevoUK = parseInt(menuLijevo + 10);			var menuLijevoUK = parseInt(menuLijevo + 3);						srediVisinu("","menuDpadding",0);					srediVisinu("","IEmenuD",parseInt(minHeight - 20));								var contentSize = parseInt(document.body.scrollHeight+0);			var menuDesno = parseInt(kalkDmenu()+0);					var dok =document.URL.toLowerCase();//			alert(dok + ' ' + contentSize);						//hack za vijesti i searchtdu			if (dok.indexOf('vijest') !=-1){				if((brName == "Netscape" &&  contentSize == 549) || (brName != "Netscape" &&  contentSize == 543)){	 				contentSize=minHeight;	 			}				if(brName != "Netscape" &&  contentSize == 537){	 				contentSize=514;	 			}	 						}			if (dok.indexOf('searchrestdu') !=-1){ 				contentSize=505;			}/*						alert ('l='+menuLijevoUK);			alert ('c='+contentSize);			alert ('d='+menuDesno);*/			var duzi=0;						// dodatno skracivanje L i D			//contentSize = parseInt(contentSize  + 10);				//menuLijevoUK = parseInt(menuLijevoUK  - 10);					//menuDesno = parseInt(menuDesno  - 10);				contentSize = parseInt(contentSize  + 2);					/*			menuLijevoUK = parseInt(menuLijevoUK  - 8);					menuDesno = parseInt(menuDesno  - 8);					*/						if (parseInt(menuLijevoUK) > menuDesno){				if (parseInt(menuLijevoUK) > contentSize){					duzi = parseInt(menuLijevoUK);				}else{					duzi = contentSize;				}			}else{				if (menuDesno > contentSize){					duzi = menuDesno;				}else{					duzi = contentSize;				}			}//			var razlika = parseInt(duzi - menuLijevo);			var razlika = parseInt(duzi - menuLijevoUK);			srediVisinu("parent","menuPadding",razlika);				srediVisinu("","IEmenuD",duzi);						var razlika = parseInt(duzi - menuDesno);			srediVisinu("","menuDpadding",razlika);					var dodatniPomak;			switch(stilVelicina) { 		       case 'standardni': //          		dodatniPomak = 2;          		dodatniPomak = 6;				break;			  case 'veci':           		dodatniPomak = 12;				break;			  case 'najveci':          		dodatniPomak = 22;				break;			  default:          		dodatniPomak = 0;				break;		     }			setHeight("sad","parent",parseInt(duzi+dodatniPomak));			setHeight("contentFRM","top",parseInt(duzi+dodatniPomak));		}	} else {		tim = setTimeout("showMenus()",100);	}}function showSearchResults(){	if (window.parent.menuGenerated){		this.location.href=window.parent.top.document.forms[1].param.value;	} else {		setTimeout("showSearchResults()",100);	}}	function showSearchResults2(){//		document.frames['rez'].location.href=window.parent.top.document.forms[1].param.value;		frames['rez'].location.href=window.parent.top.document.forms[1].param.value;}function showSearchResults3(){		frames['rez'].location.href="brisi.html";}function showSearchResults4(){	x = document.getElementById("rez");	if (! isNull(x)){		x.src =  window.parent.top.document.forms[1].param.value;	}}function	showBC(){	bcPos = window.parent.top.document.getElementById("bc");	if (! isNull(bcPos)){		bcPos.innerHTML =  bc;	}}function uzmiBC(){	var bcPos;	var elem;	var sad;	var i;	var rez = '';	bcPos = window.parent.top.document.getElementById("bc");	if (! isNull(bcPos)){		var elements = bcPos.childNodes;		for (i in elements) {		     elem = elements[i];			if (typeof(elem) == 'object'){				sad = elem.innerHTML;				if(sad=='Gdje sam: ') {sad='';}				if(sad==' &gt; ') {sad= ' > ';}				rez += sad;			}		}	}	return rez;}function showPodnivos(){		podnivoPos = document.getElementById("podnivoi");		if (! isNull(podnivoPos)){			podnivoPos.innerHTML = podnivoPos.innerHTML + podnivoi;		}}function	showVijesti(){	vPos = window.document.getElementById("vij1");	if (! isNull(vPos)){		vPos.innerHTML =  vijest1;	}	vPos = window.document.getElementById("vij2");	if (! isNull(vPos)){		vPos.innerHTML =  vijest2;	}	vPos = window.document.getElementById("vij3");	if (! isNull(vPos)){		vPos.innerHTML =  vijest3;	}	vPos = window.document.getElementById("vijO");	if (! isNull(vPos)){		vPos.innerHTML =  vijestO;	}	vPos = window.document.getElementById("vijB");	if (! isNull(vPos)){		vPos.innerHTML =  vijestB;	}}function resizeIframe(frameId,level){	var nivo = "";	switch(arguments.length) {        case 0:            return; break;	  case 1: 		nivo = ""; break;	  case 2:		if (level == "top") {			nivo = "window.top.";		} else {			if (level == "parent") {				nivo = "window.parent.";			} else {		           return; 		     }		}		break;	  default:           return;  break;     }     var visina;     var sirEkr;	try{		frame = eval(nivo+'document.getElementById("'+frameId+'");');		innerDoc = (frame.contentDocument) ? frame.contentDocument : frame.contentWindow.document;		objToResize = (frame.style) ? frame.style : frame;		// bez ovog ne radi dobro resize s veceg na manje		objToResize.height =  "1px";		visina = parseInt(innerDoc.body.scrollHeight);		visina = (visina<minHeight) ? minHeight : visina;		objToResize.height = visina + "px";				// korigiraj sirinu vijesti u temama		if (frameId == "contentFRM") { 			var elVij = innerDoc.getElementById('sirinaVijesti');			if (! isNull(elVij)){				sirEkr = parseInt(document.body.clientWidth);				var sirVij = sirEkr-205-20-15;				sirVij = (sirVij<minWidth) ? minWidth : sirVij;				elVij.style.width = sirVij + "px";				var minVis;				var minPomak;				if (stilVelicina=='najveci'){					minVis = 600;					minPomak = 0;				}else{					minVis = 515;					minPomak = -15;				}				// korekcije trebaju samo za IE								if (visina <= minVis){//					elVij.style.bottom = minPomak;				}else{//					elVij.style.bottom = 0;				}//				 window.status = sirEkr + "/" + tmpSir;			}					}				return visina;	}	catch(err){		window.status = err.message;	}}function getHeight(frameId,level){	var nivo = "";	switch(arguments.length) {        case 0:            return; break;	  case 1: 		nivo = ""; break;	  case 2:		if (level == "top") {			nivo = "window.top.";		} else {			if (level == "parent") {				nivo = "window.parent.";			} else {		           return; 		     }		}		break;	  default:           return;  break;     }     var visina;//     var visDok = eval(nivo+'document.body.scrollHeight');//     alert (eval(nivo+'document.URL') + ' ima visinu ' + visDok);	var dkm =eval(nivo+'document');     var visDok = dkm.body.scrollHeight;//     alert (dkm.URL + ' ima visinu ' + visDok);     	try{		frame = eval(nivo+'document.getElementById("'+frameId+'");');		innerDoc = (frame.contentDocument) ? frame.contentDocument : frame.contentWindow.document;		objToResize = (frame.style) ? frame.style : frame;		visina = parseInt(innerDoc.body.scrollHeight);		return visina;	}	catch(err){		window.status = 'getHeight: ' + err.message;	}}function setHeight(frameId,level,height){	if (arguments.length!=3){		alert('setHeight zahtjeva sva 3 argumenta');		return false;	}	var nivo = "";	if (level == "top") {		nivo = "window.top.";	} else {		if (level == "parent") {			nivo = "window.parent.";		}	}	try{		frame = eval(nivo+'document.getElementById("'+frameId+'");');		innerDoc = (frame.contentDocument) ? frame.contentDocument : frame.contentWindow.document;		objToResize = (frame.style) ? frame.style : frame;		objToResize.height =  "1px";		objToResize.height = height + "px";//		alert('postavljena visina contenta ' + frame.id + ' je ' + objToResize.height);			}	catch(err){		window.status = 'setHeight: ' + err.message;	}}function getWidth(frameId,level){	var nivo = "";	switch(arguments.length) {        case 0:            return; break;	  case 1: 		nivo = ""; break;	  case 2:		if (level == "top") {			nivo = "window.top.";		} else {			if (level == "parent") {				nivo = "window.parent.";			} else {		           return; 		     }		}		break;	  default:           return;  break;     }     var sirina;	var dkm =eval(nivo+'document');     var visDok = dkm.body.scrollWidth;	try{		frame = eval(nivo+'document.getElementById("'+frameId+'");');		innerDoc = (frame.contentDocument) ? frame.contentDocument : frame.contentWindow.document;		objToResize = (frame.style) ? frame.style : frame;		sirina = parseInt(innerDoc.body.scrollWidth);		return sirina;	}	catch(err){		window.status = 'getWidth: ' + err.message;	}}function setWidth(frameId,level,width){	if (arguments.length!=3){		alert('setWidth zahtjeva sva 3 argumenta');		return false;	}	var nivo = "";	if (level == "top") {		nivo = "window.top.";	} else {		if (level == "parent") {			nivo = "window.parent.";		}	}	try{		frame = eval(nivo+'document.getElementById("'+frameId+'");');		innerDoc = (frame.contentDocument) ? frame.contentDocument : frame.contentWindow.document;		objToResize = (frame.style) ? frame.style : frame;		objToResize.width =  "1px";		objToResize.width = width + "px";	}	catch(err){		window.status = 'setWidth: ' + err.message;	}}	// Must launched on the body onload event handler for IE	// Use document.documentElement if you are in Compat mode/*		i = parent.document.getElementById(window.name)	if( document.documentElement &&      ( document.documentElement.scrollHeight || document.documentElement.scrollHeight ) ) {		iHeight = document.documentElement.scrollHeight	}else{		iHeight = document.body.scrollHeight	}	i.style.height = iHeight + 5 + "px"*/	function getElementStyle(elemID, IEStyleProp, CSSStyleProp) {    var elem = document.getElementById(elemID);    if (elem.currentStyle) {        return elem.currentStyle[IEStyleProp];    } else if (window.getComputedStyle) {        var compStyle = window.getComputedStyle(elem, "");        return compStyle.getPropertyValue(CSSStyleProp);    }    return "";}function getQueryVariable(variable) {  var query = window.location.search.substring(1);  var vars = query.split("&");  for (var i=0;i<vars.length;i++) {    var pair = vars[i].split("=");    if (pair[0] == variable) {      return pair[1];    }  }   return "";}function setBookmark(url,str){	if(str=='')str=url;	if (document.all)window.external.AddFavorite(url,str);	else alert('pritisnite CTRL + D kako bi dodali bookmark na:\n"'+url+'".');} /*drazen -3-state navigacija s promjenom klasa na over, out i clickthanks to: Jehiah Czebotar, Jonathan Snook & Robert Nyman------navigacija mora biti vezana uz td koji ima klasu menuOpt asve skupa se treba nalaziti unutar nekog taga ciji je id=menuu css-u je potrebno definirati klase: tabActive, tabInactive i tabOver*/ var menuOptions;					//sadrzi sve TD-ove meni opcijavar clickOptions;					//sadrzi odgovarajuce onClickvar menuSel;					//redni broj pocetno selektirane opcijevar brName=navigator.appName; 		// Netscape, Explorer i sl.var brVer=navigator.appVersion; 	// Mac ili PCvar isIE;var classStr;var cssFile="";						// initial CSS filevar currentStyle="no";				// initial styleif (brName == "Netscape") {			isIE = false;     		if (brVer.indexOf("Macintosh") == -1) {          		cssFile='winnn.css';          		currentStyle='Windows Netscape';          	} else {          		cssFile='macnn.css';          		currentStyle='Macintosh Netscape';          	}}if (brName == "Microsoft Internet Explorer") {		isIE = true;         	if (brVer.indexOf("Macintosh") == -1) {               	cssFile='winie.css';               	currentStyle='Windows Explorer';          } else {               	cssFile='macie.css';               	currentStyle='Macintosh Explorer';          }}classStr = isIE ? "className" : "class";function menuSetup(){	menuOptions = getElementsByClassName("menuOpt","td",document.getElementById("menu"))	clickOptions= new MakeArray(menuOptions.length);	for (var i=0;i<menuOptions.length;i++){		var tmp=menuOptions[i].getAttribute("onClick"); 		clickOptions[i]= isNull(tmp) ? "" : tmp;		if (i==parseInt(menuSel-1)){			mOptActive(menuOptions[i]);		}else{			mOptNotActive(menuOptions[i],parseInt(i+1));		}    }}	  function zamjeni(el,rbr){	mOptNotActive(menuOptions[menuSel-1],menuSel);	menuSel = rbr;	mOptActive(el);}function mOptActive(el){//  el.setAttribute(classStr,'tabActive');	if (menuSel==1){	  el.setAttribute(classStr,'tabActiveBlue');	}else{	  el.setAttribute(classStr,'tabActiveRed');	}  el.onmouseover = "";  el.onmouseout =  "";}function mOptNotActive(el,rbr){  el.setAttribute(classStr,'tabInactive');//  el.onmouseover = new Function("this.className='tabOver hand'");	if (rbr==1){	  el.onmouseover = new Function("this.className='tabOverBlue hand'");	}else{	  el.onmouseover = new Function("this.className='tabOverRed hand'");	}    el.onmouseout =  new Function("this.className='tabInactive hand'");  el.onclick = function(){	  zamjeni(this, parseInt(rbr));	  var naKlik = clickOptions[parseInt(rbr-1)];       typeof naKlik == 'function' ? naKlik() : eval(naKlik);  }}// inicijaliziranje areee s blankovimafunction MakeArray(num){	this.length = num;    for (var i = 0; i<=num; i++){         this[i] = "";    }    return this;}function isNull(val){return(val==null);}// Revised version May 11th 2007function getElementsByClassName(className, tag, elm){	var testClass = new RegExp("(^|\\s)" + className + "(\\s|$)");	var tag = tag || "*";	var elm = elm || document;	var elements = (tag == "*" && elm.all)? elm.all : elm.getElementsByTagName(tag);	var returnElements = [];	var current;	var length = elements.length;	for(var i=0; i<length; i++){		current = elements[i];		if(testClass.test(current.className)){			returnElements.push(current);		}		}	return returnElements;}// Array support for the push method in IE 5if(typeof Array.prototype.push != "function"){	Array.prototype.push = ArrayPush;	function ArrayPush(value){		this[this.length] = value;	}}/*var prepareMenu =(window.onload)? window.onload : function(){};window.onload = function(){prepareMenu(); menuSetup();}*/// -----------------// style switcherfunction setActiveStyleSheet(title) {  var i, a, main;  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {      a.disabled = true;      if(a.getAttribute("title") == title) {//      alert("izabran je " + title);		a.disabled = false;	}    }  }/*for ( i = 0; i < document.styleSheets.length; i++ ){    alert( document.styleSheets(i).title + " je " + document.styleSheets(i).disabled);}*/}function showActiveIcon(title){	//	alert('show active:' + title);	//	if (title=='standardniNE'){title='standardni'};		var trazis ='standardni';	var fotka = 'a_small';	var sl = document.getElementById(trazis);		if (title==trazis){sl.src = dp_httpRoot + fotka + '_o.gif';}else{sl.src = dp_httpRoot + fotka + '.gif';};		trazis ='veci';	fotka = 'a_medium';	var sl = document.getElementById(trazis);	if (title==trazis){sl.src = dp_httpRoot + fotka + '_o.gif';}else{sl.src = dp_httpRoot + fotka + '.gif';};		trazis ='najveci';	fotka = 'a_large';	var sl = document.getElementById(trazis);	if (title==trazis){sl.src = dp_httpRoot + fotka + '_o.gif';}else{sl.src = dp_httpRoot + fotka + '.gif';};	}//osvjezavanje sadrzaja sredisnjeg iframeafunction osvjeziOld(){	var adresa='';	var adresa2='';	var ifr = 	window.top.document.getElementById('contentFRM');	if (! isNull(ifr)){//		alert('contentFRM postoji');		adresa = top.frames['contentFRM'].location.href;		var innerDoc = (ifr.contentDocument) ? ifr.contentDocument : ifr.contentWindow.document;		var ifr2 = innerDoc.getElementById('sad');		if (! isNull(ifr2)){//			alert('sad postoji');	var xx = (ifr2.contentDocument) ? ifr2.contentDocument : ifr2.contentWindow.document;//	alert(xx.URL);				if (brName == "Netscape") {			//				adresa2 = ifr2.src;				adresa2 = xx.URL;				top.frames['contentFRM'].loaded = false;				top.frames['contentFRM'].location.href = adresa;				prikaziSadFF(adresa2);			}else{//				adresa2 = innerDoc.frames['sad'].location.href;				adresa2 = xx.URL;								top.frames['contentFRM'].loaded = false;				top.frames['contentFRM'].location.href = adresa;				prikaziSadIE(adresa2);			}		}else{//			alert('sad NE postoji');			top.frames['contentFRM'].location.href = adresa;		}	}else{//		alert('contentFRM NE postoji');	}}// var bbb;function osvjezi(){	var adresa='';	var adresa2='';	var ifr = 	window.top.document.getElementById('contentFRM');	if (! isNull(ifr)){		adresa = top.frames['contentFRM'].location.href;		var innerDoc = (ifr.contentDocument) ? ifr.contentDocument : ifr.contentWindow.document;		var ifr2 = innerDoc.getElementById('sad');		if (! isNull(ifr2)){			var sadrzaj = (ifr2.contentDocument) ? ifr2.contentDocument : ifr2.contentWindow.document;			adresa2 = sadrzaj.URL;			if (brName == "Netscape") {				top.frames['contentFRM'].loaded = false;				top.frames['contentFRM'].location.href = adresa;				prikaziSadFF(adresa2);			}else{				top.frames['contentFRM'].loaded = false;				top.frames['contentFRM'].location.href = adresa;//				bbb = 0;				prikaziSadIE(adresa2);			}		}else{			top.frames['contentFRM'].location.href = adresa;		}	}else{//		alert('contentFRM NE postoji');	}}function osvjezi2(){		var ifr1 = window.top.document.getElementById('contentFRM');		var innerDoc = (ifr1.contentDocument) ? ifr1.contentDocument : ifr1.contentWindow.document;				var ifr2 = innerDoc.getElementsByTagName('iframe')[0];//		var ifr2 = innerDoc.frames[0];	//nije ok za ff				if (! isNull(ifr2)){		// REFRESH frame unutar contentFRM			var innerDoc2 = (ifr2.contentDocument) ? ifr2.contentDocument : ifr2.contentWindow.document;			adresa = innerDoc2.URL			ime = ifr2.name;//			alert(ime + ' ' + adresa);			ifr2.src = adresa;			// promjeni stil u contentFRM			aktivirajStil2(innerDoc);		} else{		// REFRESH contentFRM			adresa = parent.frames[0].location.href;			parent.frames[0].location.href = adresa;			}}function aktivirajStil2(dok) {  var i, a, main;  for(i=0; (a = dok.getElementsByTagName("link")[i]); i++) {    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {      a.disabled = true;      if(a.getAttribute("title") == stilTitle) {//      alert(stilTitle);		a.disabled = false;	}    }  }}	function osvjeziNew(){	var adresa='';	var adresa2='';	var ifr = 	window.top.document.getElementById('contentFRM');	if (! isNull(ifr)){		adresa = top.frames['contentFRM'].location.href;		var innerDoc = (ifr.contentDocument) ? ifr.contentDocument : ifr.contentWindow.document;		var ifr2 = innerDoc.getElementById('sad');		if (! isNull(ifr2)){			var sadrzaj = (ifr2.contentDocument) ? ifr2.contentDocument : ifr2.contentWindow.document;			adresa2 = sadrzaj.URL;						var p1 = parseInt(adresa2.indexOf('.nsf/') + 5);			var p2 = adresa2.indexOf('?');			var dok = adresa2.substring(p1,p2);						var p3 = parseInt(adresa.indexOf('&d=')+3);			var noviLink = adresa.substring(0,p3) + dok						var p4 = adresa.indexOf('temaDirekt');			if (p4 != -1) {noviLink = adresa;	}//			p4 = adresa.indexOf('searchTDU');			p4 = adresa.indexOf('search');			if (p4 != -1) {noviLink = adresa;	}									alert(adresa);			alert(adresa2);			alert(noviLink);									if (brName == "Netscape") {				top.frames['contentFRM'].loaded = false;				top.frames['contentFRM'].location.href = adresa;				prikaziSadFF(adresa2);			}else{//				top.frames['contentFRM'].loaded = false;				setTimeout("prikaziIE('"+noviLink+"')",200);				//				top.frames['contentFRM'].location.href = noviLink;				//				bbb = 0;//				prikaziSadIE(adresa2);			}		}else{			top.frames['contentFRM'].location.href = adresa;		}	}else{//		alert('contentFRM NE postoji');	}}function prikaziIE(adresa){	if (top.frames['contentFRM'].loaded){		top.frames['contentFRM'].location.href = adresa;	}else{		setTimeout("prikaziIE('"+adresa+"')",200);	}}function prikaziSadIE(adresa){	if (top.frames['contentFRM'].loaded){		var ifr = 	window.top.document.getElementById('contentFRM');		var innerDoc = (ifr.contentDocument) ? ifr.contentDocument : ifr.contentWindow.document;		innerDoc.frames['sad'].location.href = adresa;	//		alert(bbb + ' pokusaja');	}else{//		bbb +=1;		setTimeout("prikaziSadIE('"+adresa+"')",555);	}}function prikaziSadFF(adresa){	if (top.frames['contentFRM'].loaded){		var ifr = 	window.top.document.getElementById('contentFRM');		var innerDoc = (ifr.contentDocument) ? ifr.contentDocument : ifr.contentWindow.document;		var ifr2 = innerDoc.getElementById('sad');		ifr2.src = adresa;	}else{		setTimeout("prikaziSadFF('"+adresa+"')",555);	}}function getActiveStyleSheet() {  var i, a;  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");  }  return null;}function getPreferredStyleSheetWork() {  var i, a;  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {    if(a.getAttribute("rel").indexOf("style") != -1       && a.getAttribute("rel").indexOf("alt") == -1 	  && ((brName == "Netscape" && a.getAttribute("rel").indexOf("NE") != -1) ||  (isIE && a.getAttribute("rel").indexOf("IE") != -1))        && a.getAttribute("title")       ) return a.getAttribute("title");  }  return null;}function getPreferredStyleSheet() {  var i, a;  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {    if(a.getAttribute("rel").indexOf("style") != -1       && a.getAttribute("rel").indexOf("alt") == -1       && a.getAttribute("title")       ) return a.getAttribute("title");  }  return null;}function createCookie(name,value,days) {  if (days) {    var date = new Date();    date.setTime(date.getTime()+(days*24*60*60*1000));    var expires = "; expires="+date.toGMTString();  }  else expires = "";  document.cookie = name+"="+value+expires+"; path=/";}function readCookie(name) {  var nameEQ = name + "=";  var ca = document.cookie.split(';');  for(var i=0;i < ca.length;i++) {    var c = ca[i];    while (c.charAt(0)==' ') c = c.substring(1,c.length);    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);  }  return null;}function postaviStil(){	var cookie = readCookie("style");	var velicina = cookie ? cookie : getPreferredStyleSheet();	var tmpBoja = readCookie("boja");	if (! isNull(tmpBoja)){		boja = tmpBoja;	}else{		boja = 'da';		//default	}	if (boja =='ne'){		stil = velicina + 'CB';	}else{		stil = velicina;		}	setActiveStyleSheet(stil); 	return stil;}function changeStyle (noviStil){	if (boja =='ne'){		cb = '';	}else{		cb = "CB";		}	stil = noviStil + cb;	setActiveStyleSheet(stil);	showActiveIcon(stil);	createCookie('style', noviStil, 365);	osvjezi2();}//---function ustanoviStilHome(){	var cookie = readCookie("velicina");	stilVelicina = cookie ? cookie : getPreferredStyleSheet();	cookie = readCookie("boja");	var boja = cookie ? cookie : 'da';	stilBoja = (boja == 'da') ? '' : 'CB';	switch (stilVelicina){		case 'standardni':			stilFajl = 'styles' + stilBoja + '.css'			break		case 'veci':			stilFajl = 'stylesV' + stilBoja + '.css'			break		case 'najveci':			stilFajl = 'stylesVV' + stilBoja + '.css'			break		default:			stilFajl = 'styles' + stilBoja + '.css'	}	stilTitle = stilVelicina + stilBoja;}function ustanoviStil(){	stilVelicina = window.parent.top.stilVelicina;	stilBoja = window.parent.top.stilBoja;	stilFajl =  window.parent.top.stilFajl;	stilTitle =  window.parent.top.stilTitle;}function promjeniVelicinu(vel){	stilVelicina = vel;	createCookie('velicina', stilVelicina, 365);	ustanoviStilHome();	aktivirajStil();	oznaciVelicinu();//	osvjeziNew();	osvjezi2();//	resizeIframe("contentFRM","top")//alert(stilVelicina);}function promjeniBoju(){	//provjeriSad()	if(stilBoja==''){		stilBoja = 'CB';	}else{		stilBoja = '';	}	var boja = (stilBoja == '') ? 'da' : 'CB';		// boja koja se sprema u keks je 'da' ili 'CB'																// boja s kojom se radi u aplikaciji (stilBoja) je '' ili 'CB'	createCookie('boja', boja, 365);	ustanoviStilHome();	aktivirajStil();	oznaciBoju();	oznaciVelicinu();//	osvjeziNew();	osvjezi2();	//	alert(stilBoja);}function aktivirajStil() {  var i, a, main;  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {      a.disabled = true;      if(a.getAttribute("title") == stilTitle) {//      alert(stilTitle);		a.disabled = false;	}    }  }}function oznaciVelicinu(){	var trazis;	var fotka;	var sl;		trazis = 'standardni';	fotka =  (stilBoja == '') ? 'a_small' : 'a_smallCB';	sl = document.getElementById(trazis);	if (trazis==stilVelicina){sl.src = dp_httpRoot + fotka + '_o.gif';}else{sl.src = dp_httpRoot + fotka + '.gif';};	trazis = 'veci';	fotka =  (stilBoja == '') ? 'a_medium' : 'a_mediumCB';	sl = document.getElementById(trazis);	if (trazis==stilVelicina){sl.src = dp_httpRoot + fotka + '_o.gif';}else{sl.src = dp_httpRoot + fotka + '.gif';};	trazis = 'najveci';	fotka =  (stilBoja == '') ? 'a_large' : 'a_largeCB';	sl = document.getElementById(trazis);	if (trazis==stilVelicina){sl.src = dp_httpRoot + fotka + '_o.gif';}else{sl.src = dp_httpRoot + fotka + '.gif';};}function oznaciBoju(){	var sl;	var opis;	var fotka;	var fotka2;	var fotka3;	var fotka4;	var fotka5;	var fotka6;	var fotka7;	var fotka8;							sl = document.getElementById('cb');	fotka =  (stilBoja == '') ? 'bw.gif' : 'color.gif';	opis =  (stilBoja == '') ? 'crno-bijeli prikaz' : 'prikaz u boji';	sl.src = dp_httpRoot + fotka;	sl.setAttribute("alt", opis);	sl.setAttribute("title", opis);		fotka2 =  (stilBoja == '') ? 'search.gif' : 'search_cb.gif';	sl = document.getElementById('traziGif');	sl.src = dp_httpRoot + fotka2;		fotka3 =  (stilBoja == '') ? 'accesibility.jpg' : 'accesibility_cb.jpg';	sl = document.getElementById('acsb');	sl.src = dp_httpRoot + fotka3;	fotka4 =  (stilBoja == '') ? 'valid-wai-blue-v.gif' : 'valid-wai-blue-v_cb.gif';	sl = document.getElementById('ikona1');	sl.src = dp_httpRoot + fotka4;/*	fotka5 =  (stilBoja == '') ? 'valid-html-blue-v.gif' : 'valid-html-blue-v_cb.gif';	sl = document.getElementById('ikona2');	sl.src = dp_httpRoot + fotka5;*/	fotka6 =  (stilBoja == '') ? 'valid-css2-blue-v.gif' : 'valid-css2-blue-v_cb.gif';	sl = document.getElementById('ikona3');	sl.src = dp_httpRoot + fotka6;/*		fotka7 =  (stilBoja == '') ? 'apis_it.jpg' : 'apis_it_cb.jpg';	sl = document.getElementById('ikona4');	sl.src = dp_httpRoot + fotka7;*/	fotka8 =  (stilBoja == '') ? 'ehrvatska.jpg' : 'ehrvatska_cb.jpg';	sl = document.getElementById('ikona5');	sl.src = dp_httpRoot + fotka8;}function provjeriSad(){	var adresa='';	var adresa2='';	var ifr = 	window.top.document.getElementById('contentFRM');	if (! isNull(ifr)){		adresa = top.frames['contentFRM'].location.href;		var innerDoc = (ifr.contentDocument) ? ifr.contentDocument : ifr.contentWindow.document;		var ifr2 = innerDoc.getElementById('sad');		if (! isNull(ifr2)){			var sadrzaj = (ifr2.contentDocument) ? ifr2.contentDocument : ifr2.contentWindow.document;			adresa2 = sadrzaj.URL;			var p1 = adresa2.indexOf('www.trazilica.hr');			if (p1>0){				alert(adresa2);			}		}	}}function showFrames(){	var oldIme = '';	var prefix = 'parent.';	var naz = 'frames';	naz = prefix + naz;	var u1= eval(naz+'.length');	while (u1>0) {		i=0;		ime = eval(naz+'['+i+']'+'.name');		if (ime == oldIme) break;		oldIme = ime;		adresa = eval(naz+'['+i+']'+'.location.href');		alert(ime + ' ' + adresa);		naz = prefix + naz;		u1= eval(naz+'.length');	}/*		for (i=0;i<u1;i++){		ime = eval('parent.frames['+i+'].name');		adresa = eval('top.frames['+i+'].location.href');		alert(ime + ' ' + adresa);	}*/	//	top.frames['contentFRM'].location.href;}