<!--
    function showtab(obj){
			//document.getElementById('divtabh').innerHTML='<span></span>';
			var id=obj.id.replace("tabtab","");
			for (var i=1;i<3;i++){
				if (i==id){document.getElementById('divtabtab' + i).style.display='block';obj.src="/img/go" + (i*2) + ".gif"}
				else{document.getElementById('divtabtab' + i).style.display='none';document.getElementById('tabtab' + i).src="/img/go" + (i*2-1) + ".gif"}
			}
		}

    function shownews(obj){
			//document.getElementById('divtabh').innerHTML='<span></span>';
			var id=obj.id.replace("newstab","");
			for (var i=1;i<3;i++){
				if (i==id){document.getElementById('divnewstab' + i).style.display='block';obj.src="/img/go" + (i*2) + ".gif"}
				else{document.getElementById('divnewstab' + i).style.display='none';document.getElementById('divnewstab' + i).src="/img/go" + (i*2-1) + ".gif"}
			}
		}

    function showsport(obj){
			//document.getElementById('divtabh').innerHTML='<span></span>';
			var id=obj.id.replace("sporttab","");
			for (var i=1;i<3;i++){
				if (i==id){document.getElementById('divsporttab' + i).style.display='block';obj.src="/img/go" + (i*2) + ".gif"}
				else{document.getElementById('divsporttab' + i).style.display='none';document.getElementById('divsporttab' + i).src="/img/go" + (i*2-1) + ".gif"}
			}
		}

    function showshow(obj){
			//document.getElementById('divtabh').innerHTML='<span></span>';
			var id=obj.id.replace("showtab","");
			for (var i=1;i<3;i++){
				if (i==id){document.getElementById('divshowtab' + i).style.display='block';obj.src="/img/go" + (i*2) + ".gif"}
				else{document.getElementById('divshowtab' + i).style.display='none';document.getElementById('divshowtab' + i).src="/img/go" + (i*2-1) + ".gif"}
			}
		}

        function displayRow(name)
		{      
        var row = document.getElementById(name);      
        if (row.style.display == '')  row.style.display = 'none';      
        else row.style.display = '';
		}






function VirtualTour(text) {
	document.write(text);
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0

  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");

  if (restore) selObj.selectedIndex=0;

}



var fadearray=new Array()
var fadeclear=new Array()
 
var dom=(document.getElementById)
var iebrowser=document.all
 
function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder){
this.pausecheck=pause
this.mouseovercheck=0
this.delay=delay
this.degree=10
this.curimageindex=0
this.nextimageindex=1
fadearray[fadearray.length]=this
this.slideshowid=fadearray.length-1
this.canvasbase="canvas"+this.slideshowid
this.curcanvas=this.canvasbase+"_0"
if (typeof displayorder!="undefined")
theimages.sort(function() {return 0.5 - Math.random();})
this.theimages=theimages
this.imageborder=parseInt(borderwidth)
this.postimages=new Array()
for (p=0;p<theimages.length;p++){
this.postimages[p]=new Image()
this.postimages[p].src=theimages[p][0]
}
 
var fadewidth=fadewidth+this.imageborder*2
var fadeheight=fadeheight+this.imageborder*2
 
if (iebrowser&&dom||dom)
document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+fadebgcolor+'"></div></div>')
else
document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')
 
if (iebrowser&&dom||dom)
this.startit()
else{
this.curimageindex++
setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay)
}
}

function fadepic(obj){
if (obj.degree<100){
obj.degree+=10
if (obj.tempobj.filters&&obj.tempobj.filters[0]){
if (typeof obj.tempobj.filters[0].opacity=="number")
obj.tempobj.filters[0].opacity=obj.degree
else
obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
}
else if (obj.tempobj.style.MozOpacity)
obj.tempobj.style.MozOpacity=obj.degree/101
else if (obj.tempobj.style.KhtmlOpacity)
obj.tempobj.style.KhtmlOpacity=obj.degree/100
else if (obj.tempobj.style.opacity&&!obj.tempobj.filters)
obj.tempobj.style.opacity=obj.degree/101
}
else{
clearInterval(fadeclear[obj.slideshowid])
obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")? obj.canvasbase+"_0" : obj.canvasbase+"_1"
obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
obj.populateslide(obj.tempobj, obj.nextimageindex)
obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)? obj.nextimageindex+1 : 0
setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)
}
}
 
fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
if (this.theimages[picindex][1]!="")
slideHTML='<a href="'+this.theimages[picindex][1]+'" rel="'+this.theimages[picindex][2]+'">'
slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'
if (this.theimages[picindex][1]!="")
slideHTML+='</a>'
picobj.innerHTML=slideHTML
}
 
 
fadeshow.prototype.rotateimage=function(){
if (this.pausecheck==1)
var cacheobj=this
if (this.mouseovercheck==1)
setTimeout(function(){cacheobj.rotateimage()}, 100)
else if (iebrowser&&dom||dom){
this.resetit()
var crossobj=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
crossobj.style.zIndex++
fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50)
this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
}
else{
var ns4imgobj=document.images['defaultslide'+this.slideshowid]
ns4imgobj.src=this.postimages[this.curimageindex].src
}
this.curimageindex=(this.curimageindex<this.postimages.length-1)? this.curimageindex+1 : 0
}
 
fadeshow.prototype.resetit=function(){
this.degree=10
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
if (crossobj.filters&&crossobj.filters[0]){
if (typeof crossobj.filters[0].opacity=="number")
crossobj.filters(0).opacity=this.degree
else
crossobj.style.filter="alpha(opacity="+this.degree+")"
}
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=this.degree/101
else if (crossobj.style.KhtmlOpacity)
crossobj.style.KhtmlOpacity=this.degree/100
else if (crossobj.style.opacity&&!crossobj.filters)
crossobj.style.opacity=this.degree/101
}
 
 
fadeshow.prototype.startit=function(){
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
this.populateslide(crossobj, this.curimageindex)
if (this.pausecheck==1){ 
var cacheobj=this
var crossobjcontainer=iebrowser? iebrowser["master"+this.slideshowid] : document.getElementById("master"+this.slideshowid)
crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}
}
this.rotateimage()
}




function openFoto(imageURL,imageTitle)
{
	var imgWin = window.open(imageURL,'newwindow','scrollbars=yes,resizable=1,width=520,height=500,left=100,top=100');
	if( !imgWin ) { return true; } //popup blockers should not cause errors
	imgWin.document.write('<html><head><title>'+imageTitle+'<\/title>'+
		'<\/head><body style="background:url(images/hotnewsbg3.jpg) repeat-x; background-color: #242D4C">'+
		(document.layers?('<layer left="0" top="0">'):('<div style="position:absolute;left:0px;top:0px;">'))+
		'<a href="javascript:self.close()"><img src='+imageURL+' border=0 alt="Loading image ..." title="'+imageTitle+'"></a>'+
		(document.layers?'<\/layer>':'<\/div>')+'<\/body><\/html>');
	imgWin.document.close();
}


function openMapa(url)
{
window.open(url,'newwindow','top=100,left=100,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=0,scrollbars=0, copyhistory=0,width=640,height=410')
}

function openSlika(url)
{
window.open(url,'newwindow','top=100,left=200,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=1,scrollbars=1, copyhistory=0,width=500,height=500')
}

function tehnicke_karakteristike_print(model_id)                                   
{
        window.open('iframe_teh_karakteristike.php?printversion=1&model_id='+model_id,'_blank','top=100,left=100,toolbar=yes,location=no,directories=no,status=no,menubar=no,resizable=1,scrollbars=1,clpyhistory=0,width=650,height=500');
}

function cjenikpdf(model_id)                                   
{
        window.open('getpdf.php?model_id='+model_id,'_blank','top=100,left=100,toolbar=yes,location=no,directories=no,status=no,menubar=no,resizable=1,scrollbars=1,clpyhistory=0,width=650,height=500');
}

function play_mp3(p_track_id)
{
    _width  =   screen.width;
    _height =   screen.height;

    _x  =   screen.width/2 - 110;
    _y  =   screen.height/2 - 45;
    
    _win_mp3_preview =   window.open('mp3_player.php?audio_id=' + p_track_id, 'win_mp3_preview', 'width=200, height=20, left=' + _x + ', top=' + _y +', status=no, resizable=no');
    _win_mp3_preview.focus();
}


//ukradeno sa http://www.howtocreate.co.uk/perfectPopups.html
//really not important (the first two should be small for Opera's sake)
PositionX = 10;
PositionY = 10;
defaultWidth  = 600;
defaultHeight = 400;

//kinda important
var AutoClose = true;

//don't touch
function popImage(imageURL,imageTitle){
	var imgWin = window.open('','_blank','scrollbars=no,resizable=1,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY);
	if( !imgWin ) { return true; } //popup blockers should not cause errors
	imgWin.document.write('<html><head><title>'+imageTitle+'<\/title><script type="text\/javascript">\n'+
		'function resizeWinTo() {\n'+
		'if( !document.images.length ) { document.images[0] = document.layers[0].images[0]; }'+
		'var oH = document.images[0].height, oW = document.images[0].width;\n'+
		'if( !oH || window.doneAlready ) { return; }\n'+ //in case images are disabled
		'window.doneAlready = true;\n'+ //for Safari and Opera
		'var x = window; x.resizeTo( oW + 200, oH + 200 );\n'+
		'var myW = 0, myH = 0, d = x.document.documentElement, b = x.document.body;\n'+
		'if( x.innerWidth ) { myW = x.innerWidth; myH = x.innerHeight; }\n'+
		'else if( d && d.clientWidth ) { myW = d.clientWidth; myH = d.clientHeight; }\n'+
		'else if( b && b.clientWidth ) { myW = b.clientWidth; myH = b.clientHeight; }\n'+
		'if( window.opera && !document.childNodes ) { myW += 16; }\n'+
		'x.resizeTo( oW = oW + ( ( oW + 200 ) - myW ), oH = oH + ( (oH + 200 ) - myH ) );\n'+
		'var scW = screen.availWidth ? screen.availWidth : screen.width;\n'+
		'var scH = screen.availHeight ? screen.availHeight : screen.height;\n'+
		'if( !window.opera ) { x.moveTo(Math.round((scW-oW)/2),Math.round((scH-oH)/2)); }\n'+
		'}\n'+
		'<\/script>'+
		'<\/head><body onload="resizeWinTo();"'+(AutoClose?' onblur="self.close();"':'')+'>'+
		(document.layers?('<layer left="0" top="0">'):('<div style="position:absolute;left:0px;top:0px;">'))+
		'<img src='+imageURL+' alt="Loading image ..." title="" onload="resizeWinTo();">'+
		(document.layers?'<\/layer>':'<\/div>')+'<\/body><\/html>');
	imgWin.document.close();
	if( imgWin.focus ) { imgWin.focus(); }
	return false;
}

//-->