var path_temp=Array();
function changeToActive(obj,path,x)
{
   
    path_temp[obj.id]=obj.src;
    obj.src=path;
    if(x==1) {
        path_temp[obj.id]= obj.style.backgroundImage;
        obj.style.backgroundImage="url("+path+")";
        
        
    }
}

function changetToNonActive(obj,path,x)
{
    obj.src=path_temp[obj.id];
    if(x==1) {
        obj.style.backgroundImage=path_temp[obj.id];
    
    }
}

function onload_admin_editor()
{
    if(document.getElementsByName("content[0]").length>0)
    {
        var name = 'content[0]';
        var base_url = window.location.href;
        base_url = base_url.substring(0,base_url.indexOf('/admin'));
        var editor = new FCKeditor(name,'100%','400','ToolBarSetName') ;
        editor.BasePath= base_url + '/js/fckeditor/';
        editor.Width = '650px';
        editor.Height = '350px';
        editor.Config['CustomConfigurationsPath'] = editor.BasePath + 'my_config.js';
        editor.ToolbarSet ='ToolBarSetName';
        editor.ReplaceTextarea() ;
    }
    else
    {
        if(datum!=undefined)
        {
            d=new Date(datum.substr(0,4), datum.substr(5,2), datum.substr(8,2), vreme.substr(0,2), vreme.substr(3,2), 0, 0);
            setInterval("timer()", 1000 );
        }
    }
}
var d;
function timer()
{    
  if (d.getHours()<10)
    hours="0"+d.getHours();
  else
    hours=d.getHours();

  if (d.getMinutes()<10)
    mins="0"+d.getMinutes();
  else
    mins=d.getMinutes();
  if(document.getElementById("time"))
   document.getElementById("time").innerHTML=hours+":"+mins;

   d.setTime(d.getTime()+1000);
}

window.onload=onload_admin_editor;
