﻿// zamijena fontova sIFR fontovima
function do_sIFR() {
    if (typeof sIFR == "function") {
        sIFR.replaceElement(named({ sSelector: ".vijest .sh3", sFlashSrc: "sIFR/CS_frutiger_bold.swf", sColor: "#A72323", sBgColor: "#f5f1ec", sWmode: "transparent" }));
        sIFR.replaceElement(named({ sSelector: ".vijest .sh3-2", sFlashSrc: "sIFR/CS_frutiger_bold.swf", sColor: "#A72323", sBgColor: "#f5f1ec", sWmode: "transparent" }));
        sIFR.replaceElement(named({ sSelector: ".vijest .sh3-normal", sFlashSrc: "sIFR/CS_frutiger_bold.swf", sColor: "#A72323", sBgColor: "#f5f1ec", sWmode: "transparent" }));

        if (navigator.appName != 'Microsoft Internet Explorer') {
            sIFR.replaceElement(named({ sSelector: "#box-sredina .sh3", sFlashSrc: "sIFR/CS_frutiger_bold.swf", sColor: "#A72323", sBgColor: "#f5f1ec", sWmode: "transparent", nFlashVars: "offsetTop=-16" }));
        }
        else {
            sIFR.replaceElement(named({ sSelector: "#box-sredina .sh3", sFlashSrc: "sIFR/CS_frutiger_bold.swf", sColor: "#A72323", sBgColor: "#f5f1ec", sWmode: "transparent" }));
        }
    }
    return;
}

function CharactersCount(text, long) {
    var maxlength = new Number(long); // Change number to your max length.

    if (text.value.length > maxlength) {

        text.value = text.value.substring(0, maxlength);
        alert(" U polje poruke dozvoljen unos " + long + " znakova!");
    }
}

//var min = 8;
//var max = 18;

//function increaseFontSize() {
//    var p = document.getElementById('content');

//    p.style.fontSize = "20px";
////    for (i = 0; i < p.length; i++) {
////        if (p[i].style.fontSize) {
////            var s = parseInt(p[i].style.fontSize.replace("px", ""));
////        } else {
////            var s = 12;
////        }
////        if (s != max) {
////            s += 1;
////        }
////        p[i].style.fontSize = s + "px"
////    }
//}
//function decreaseFontSize() {
//    var p = document.getElementById('content');
//    for (i = 0; i < p.length; i++) {
//        if (p[i].style.fontSize) {
//            var s = parseInt(p[i].style.fontSize.replace("px", ""));
//        } else {
//            var s = 12;
//        }
//        if (s != min) {
//            s -= 1;
//        }
//        p[i].style.fontSize = s + "px"
//    }
//}

function show_div() {
    
    document.getElementById('divSendToFriend').style.visibility = 'visible';
    //document.getElementById('divSendToFriendTitle').style.visibility = 'visible';
    document.getElementById('divOuter').style.visibility = 'visible';

}

function upis_datuma(what) {
    // funkcija dodaje točke u datumu (dan i mjesec)
    if (what.value.length == 2 || what.value.length == 5) {
        what.value = what.value + '.';
    }
}






