/*function init_top_pict()
{

    banner = 1;
    step = -3;

    var container = document.getElementById('container');
    var banner11 = document.getElementById('banner11');
    var banner12 = document.getElementById('banner12');
    var banner13 = document.getElementById('banner13');
    var banner14 = document.getElementById('banner14');
    var banner21 = document.getElementById('banner21');
    var banner22 = document.getElementById('banner22');
    var banner23 = document.getElementById('banner23');
    var banner24 = document.getElementById('banner24');
    var text1 = document.getElementById('text1');
    var text2 = document.getElementById('text2');

    banner11.style.zIndex = banner12.style.zIndex = banner13.style.zIndex = banner14.style.zIndex = 0;
    banner21.style.zIndex = banner22.style.zIndex = banner23.style.zIndex = banner24.style.zIndex = 1;

    setWidthCycle();

    text1.style.display = "none";
    text2.style.display = "block";
    banner11.style.zIndex = banner12.style.zIndex = banner13.style.zIndex = banner14.style.zIndex = 1;
    banner21.style.zIndex = banner22.style.zIndex = banner23.style.zIndex = banner24.style.zIndex = 0;
    banner11.style.clip = banner12.style.clip = banner13.style.clip = banner14.style.clip = "rect(0px 0px 0px 0px)";
    banner21.style.clip = banner22.style.clip = banner23.style.clip = banner24.style.clip = "rect(auto auto auto auto)";
    
    setTimeout("NextStep()", 4000);

}

    function NextStep()
    {
        setWidth();
        if(banner == 1)
        {
            banner11.style.clip = "rect(auto " + (step+3)*57 + "px auto auto)";
            banner12.style.clip = "rect(auto " + (step+2)*57 + "px auto auto)";
            banner13.style.clip = "rect(auto " + (step+1)*57 + "px auto auto)";
            banner14.style.clip = "rect(auto " + step*57 + "px auto auto)";
        } else
        {
            banner21.style.clip = "rect(auto " + (step+3)*57 + "px auto auto)";
            banner22.style.clip = "rect(auto " + (step+2)*57 + "px auto auto)";
            banner23.style.clip = "rect(auto " + (step+1)*57 + "px auto auto)";
            banner24.style.clip = "rect(auto " + step*57 + "px auto auto)";
        }

        if(step*57 < container.clientWidth)
        {
            step++;
            setTimeout("NextStep()", 100);
        }
        else
        {
            step = -3;
            if(banner == 1)
            {
                banner = 2;
                text2.style.display = "none";
                text1.style.display = "block";
                banner11.style.zIndex = banner12.style.zIndex = banner13.style.zIndex = banner14.style.zIndex = 0;
                banner21.style.zIndex = banner22.style.zIndex = banner23.style.zIndex = banner24.style.zIndex = 1;
                banner11.style.clip = "rect(auto auto auto auto)";
                banner12.style.clip = "rect(auto auto auto auto)";
                banner13.style.clip = "rect(auto auto auto auto)";
                banner14.style.clip = "rect(auto auto auto auto)";
                banner21.style.clip = "rect(0px 0px 0px 0px)";
                banner22.style.clip = "rect(0px 0px 0px 0px)";
                banner23.style.clip = "rect(0px 0px 0px 0px)";
                banner24.style.clip = "rect(0px 0px 0px 0px)";
            }
            else
            {
                banner = 1;
                text1.style.display = "none";
                text2.style.display = "block";
                banner11.style.zIndex = banner12.style.zIndex = banner13.style.zIndex = banner14.style.zIndex = 1;
                banner21.style.zIndex = banner22.style.zIndex = banner23.style.zIndex = banner24.style.zIndex = 0;
                banner11.style.clip = "rect(0px 0px 0px 0px)";
                banner12.style.clip = "rect(0px 0px 0px 0px)";
                banner13.style.clip = "rect(0px 0px 0px 0px)";
                banner14.style.clip = "rect(0px 0px 0px 0px)";
                banner21.style.clip = "rect(auto auto auto auto)";
                banner22.style.clip = "rect(auto auto auto auto)";
                banner23.style.clip = "rect(auto auto auto auto)";
                banner24.style.clip = "rect(auto auto auto auto)";
            }
            setTimeout("NextStep()", 9000);
        }
}
    
    function setWidth() {
        banner11.style.width = banner12.style.width = banner13.style.width = banner14.style.width = banner21.style.width = banner22.style.width = banner23.style.width = banner24.style.width = container.clientWidth + 'px';
    }

    function setWidthCycle() {
        setTimeout("setWidth()", 100);
    }
    
*/
    
    function openPhoto(id, width, height) {
        width = width + 50;
        height = height + 117;
        window.open("/photo/" + id + "/", "", "resizable=yes,scrollbars=yes,status=no,toolbar=no,width=" + width + ",height=" + height );
    }
    function openNewYearKupon(sHREF, iWidth, iHeight, sWindowName) {
        popupWin = window.open(sHREF, sWindowName, "width=" +  iWidth + ",height=" +  iHeight + ",status=yes,toolbar=no,menubar=yes,scrollbars=yes,resizable=yes");
        popupWin.focus();
    }

function correct_fixed(e)
{
    if(f_scrollTop() >= 50)
    {
        document.getElementById('right').style.top = 0 + f_scrollTop() + 'px';
    }
    else
    {
        document.getElementById('right').style.top = '77px';
    }
}

function f_clientWidth() {
    return f_filterResults (
        window.innerWidth ? window.innerWidth : 0,
        document.documentElement ? document.documentElement.clientWidth : 0,
        document.body ? document.body.clientWidth : 0
    );
}
function f_clientHeight() {
    return f_filterResults (
        window.innerHeight ? window.innerHeight : 0,
        document.documentElement ? document.documentElement.clientHeight : 0,
        document.body ? document.body.clientHeight : 0
    );
}
function f_scrollLeft() {
    return f_filterResults (
        window.pageXOffset ? window.pageXOffset : 0,
        document.documentElement ? document.documentElement.scrollLeft : 0,
        document.body ? document.body.scrollLeft : 0
    );
}
function f_scrollTop() {
    return f_filterResults (
        window.pageYOffset ? window.pageYOffset : 0,
        document.documentElement ? document.documentElement.scrollTop : 0,
        document.body ? document.body.scrollTop : 0
    );
}
function f_filterResults(n_win, n_docel, n_body) {
    var n_result = n_win ? n_win : 0;
    if (n_docel && (!n_result || (n_result > n_docel)))
        n_result = n_docel;
    return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
}    
    