﻿function PrilagodiDuljinuStranice() 
{
    if (navigator.appName == "Microsoft Internet Explorer") 
    {
        var ua = navigator.userAgent;
        var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");

        if (re.exec(ua) != null) 
        {
            var rv = parseFloat(RegExp.$1);

            if (rv <= 6.0) 
            {
                document.getElementById("divZaglavljeMaster").style.height = "15%";
                document.getElementById("divSadrzajMaster").style.height = "60%";
                document.getElementById("divPodnozjeMaster").style.height = "15%";
            }
        }
    }
}

function prikaziAktivno(i) 
{
    if (document) 
    {
        document.images[i-1].src = "images/rubrika" + i.toString() + "b.jpg";
    }
}

function prikaziNeaktivno(i) 
{
    if (document) 
    {
        document.images[i-1].src = "images/rubrika" + i.toString() + "a.jpg";
    }
}

function prikaziIE(i) 
{
    if (document) 
    {
        opis = document.getElementById("divOpisIE_" + i.toString());
        html = document.getElementById("divHtmlAzurnostIE_" + i.toString());
        
        if (opis.style.display == "block") 
        {
            opis.style.display = "none";
            html.style.display = "block";
        }
        else 
        {
            opis.style.display = "block";
            html.style.display = "none";
        }
    }
}

function prikaziFL(i) 
{
    if (document) 
    {
        opis = document.getElementById("divOpisFL_" + i.toString());
        html = document.getElementById("divHtmlAzurnostFL_" + i.toString());

        if (opis.style.display == "block") 
        {
            opis.style.display = "none";
            html.style.display = "block";
        }
        else 
        {
            opis.style.display = "block";
            html.style.display = "none";
        }
    }
}

function prikaziNL(i) 
{
    if (document) 
    {
        opis = document.getElementById("divOpisNL_" + i.toString());
        html = document.getElementById("divHtmlAzurnostNL_" + i.toString());

        if (opis.style.display == "block") 
        {
            opis.style.display = "none";
            html.style.display = "block";
        }
        else 
        {
            opis.style.display = "block";
            html.style.display = "none";
        }
    }
}

function prikaziHBL(i) 
{
    if (document) 
    {
        opis = document.getElementById("divOpisHBL_" + i.toString());
        html = document.getElementById("divHtmlAzurnostHBL_" + i.toString());

        if (opis.style.display == "block") 
        {
            opis.style.display = "none";
            html.style.display = "block";
        }
        else 
        {
            opis.style.display = "block";
            html.style.display = "none";
        }
    }
}
