<!--
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_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_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];}
}

function bojaOn(ovo)
{
	ovo.className = "box_slika_on";
}

function bojaOff(ovo)
{
	ovo.className = "box_slika_off";
}

function trim_string(ovo)
{
	var s = ovo;
	
	while (s.substring(0,1) == " "){
		s = s.substring(1,s.length);
	}
	
	while (s.substring(s.length-1,s.length) == " "){
		s = s.substring(0,s.length-1);
	}
	return s;
}

function play(url)
{
	var width = parseInt((window.screen.width/2) - 150);
	var height = parseInt((window.screen.height/2) - 150);
	
	var media = window.open('', "media", "TOP=" + height +", LEFT=" + width + ", WIDTH=300, HEIGHT=300, RESIZABLE");
	
	var start = "<html><body>";
	var end = "<br /><br /><div align='center'><a href='" + url +  "' title='kliknite desnim tasterom misa i izaberite - Save Target As'>Download</a></div></body></html>";
	
	var html_w = '<OBJECT ID="MediaPlayer1" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject" width="320" height="240">'+
				 '<PARAM NAME="URL" VALUE="' +  url + '">'+
				 '<PARAM NAME="ShowStatusBar" VALUE="False">'+
				 '<PARAM NAME="playCount" VALUE="1">'+
				 '<PARAM NAME="uiMode" VALUE="full">'+
				 '<PARAM NAME="showcontrols" VALUE="1">'+
				 '<EMBED type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="' + url + '" name="MediaPlayer1" width="320" height="240" autostart="1" uimode="full" playcount="1" showcontrols="1" loop="0" showstatusbar="0"></EMBED></OBJECT>';
				 
	var html_l = '<object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" id="video1" align="absmiddle" height="240" width="320">' + 
  				 '<param name="controls" value="All" />' +
  				 '<param name="controller" value="true" />' + 
                 '<param name="src" value="' +  url + '" />' +
				 '<param name="console" value="Clip1" />' + 
				 '<param name="autostart" value="true" />' + 
				 '<embed type="audio/x-pn-realaudio-plugin" src="' + url + '" console="Clip1" controls="All" autostart="true" nojava="true" height="240" width="320"></embed>' + 
                 '</object>';
				 
	var os = navigator.appVersion.toLowerCase();
	
	html = html_w;
	if(os.indexOf("windows") == -1) html = html_l;
	
	html = start + html + end;
	//window.setTimeout('', 1000);
	media.document.write(html);
	media.focus();
}

function show(url)
{
	var width = parseInt((window.screen.width/2) - 260);
	var height = parseInt((window.screen.height/2) - 210);
	var media = window.open(url, "media", "TOP=" + height +", LEFT=" + width + ", WIDTH=520, HEIGHT=420, RESIZABLE, SCROLLBARS");
	media.focus();
}

function viewDetails(sid, type)
{
	var width = parseInt((window.screen.width/2) - 280);
	var height = parseInt((window.screen.height/2) - 220);
	var url = "view_details.php?sid=" + sid + "&type=" + type;
	
	var details = window.open(url, "details", "TOP=" + height +", LEFT=" + width + ", WIDTH=560, HEIGHT=440, SCROLLBARS");
	details.focus();
}

function showTime(){

		var Digital = new Date();
		var ClockDisplay = document.getElementById("clock");
		var hours = Digital.getHours();
		var minutes = Digital.getMinutes();
		var seconds = Digital.getSeconds();
		
		if (hours <= 9) hours = "0" + hours; 
		if (minutes <= 9) minutes = "0" + minutes; 
		if (seconds <= 9) seconds = "0" + seconds; 

		var curTime = hours + ":" + minutes + ":" + seconds;
		
		ClockDisplay.innerHTML = curTime;
		
		setTimeout("showTime()",1000);
}
//-->