// ----------------------------------------------------	

    String.prototype.reverse = function() {
        var newCena = new String();
        for (var j=this.length-1;j>-1;j--)
            newCena+=this.substr(j,1);

        return newCena.valueOf();
    }

    function changeSum(id, elem, sourceId) {
        for(i=0;i<id.length;i++) {
            var el = document.getElementById(id[i]);
            el.price = parseInt(document.getElementById(el.id+"_price").innerHTML);
            el.elem = elem;
            el.sourceId = sourceId;
            el.onclick = function() {
                var suma = parseInt( document.getElementById(this.sourceId).innerHTML.replace(/ /gi,""));

                if (document.getElementById("sleva"))
                    suma -= parseInt(document.getElementById("sleva").innerHTML);

                var Cena = new String(suma+this.price);
                Cena = Cena.reverse().replace(/(\d{3})/gi, "$1 ").reverse();
                for (var i=0;i<elem.length; i++)
                    document.getElementById(elem[i]).innerHTML = Cena;
            }
        }
    }

// ----------------------------------------------------

    function openCenterWindow(file) {
        var winWidth = 350;
        var winHeight = 350;
        var posW = (screen.availWidth/2) - (winWidth/2);
        var posH = (screen.availHeight/2) - (winHeight/2);
        window.open(file, "INFO", "scrollbars=no,resizable=no,status=no,width="+winWidth+",height="+winHeight+",left="+posW+",top="+posH);
    }

// ----------------------------------------------------
    function openPictograms(file) {
        var winWidth = 600;
        var winHeight = 300;
        var posW = (screen.availWidth/2) - (winWidth/2);
        var posH = 100;
        window.open(file, "PICTO", "scrollbars=yes,resizable=no,status=no,width="+winWidth+",height="+winHeight+",left="+posW+",top="+posH);
    }
// ----------------------------------------------------

    function openCenterWindow2(file) {
        var winWidth = 350;
        var winHeight = 350;
        var posW = (screen.availWidth/2) - (winWidth/2);
        var posH = (screen.availHeight/2) - (winHeight/2);
        window.open(file, "INFO", "scrollbars=yes,resizable=no,status=no,width="+winWidth+",height="+winHeight+",left="+posW+",top="+posH);
    }

// ----------------------------------------------------

    function inputback() {
        document.write('\074input type="button" value="&nbsp;&laquo;&nbsp;zpět&nbsp;&laquo;&nbsp;" onclick="history.back()" class="likebutton" /\076&nbsp;');
    }
    function buttonback() {
        document.write('\074button type="button" class="likebutton" onclick="history.back()" title="O stránku zpět"\076&laquo;&nbsp;zpět&nbsp;&laquo;\074/button\076');
    }

// ----------------------------------------------------

    window.onload = function() {
        var anch = document.getElementById("allinfoli");
        document.getElementById("allinfo").href="javascript: void(0);";
        anch.menu = document.getElementById("js");
        anch.onmouseover = function() { this.menu.style.display="block"; }
        anch.onmouseout = function() { this.menu.style.display="none"; }

        if (document.getElementById("discussopen")!=null)
            document.getElementById("discussopen").onclick=function() { document.getElementById("disscussform").style.display="block"; }
    }

// ------------------------------------------------------------------
    function prn() {
        document.write('\074a href=\"javascript:goprn();\"\076tisknout stránku\074/a\076, ');
    }
    function goprn() {
        if(window.print) {
            window.print();
        }
        else {
            alert("Stránky jsou připraveny pro tisk.\nZvolte Tisk/Print ve svém prohlížeči.");
        }
    }



