function getObject(obj) {
        if (document.getElementById) {
                return document.getElementById(obj);
        } else if (document.all) {
                return document.all[obj];
        } else if (document.layers) {
                return document.layers[obj];
        }
}

function MA_openWin(what,title,width,height,src) {
    var MAWin = window.open('MA_win.php?what='+what+'&src='+src+'&title='+title+'&width='+width+'&height='+height,'MAWin','left=50,top=50,width='+width+',height='+height+',toolbar=0,directories=0,menubar=0,status=no,resizable=1,location=0,scrollbars=0');
    MAWin.focus();
}

function openImg(src) {
    MA_openWin('img','di5',800,600,src);
}

function switchImage(position) {
        //na pozici kliknuteho obrazku dame paty obr
        getObject('img'+position).src = img5thumb100.src;
        //na pozici pateho obr dame imgKLIKNUTEHOthumb204,src
        getObject('img5').src = eval('img'+position+'thumb204.src');
        
        // zmenime imgKLIKNUTEHOthumb100.src na img5
        temp5src = img5;
        temp5 = eval('img'+position);
        temp5100 = eval('img'+position+'thumb100.src');
        
        eval('img'+position+'thumb100.src = img5thumb100.src');
        // zmenime imgKLIKNUTEHOthumb204.src 
        temp5204 = eval('img'+position+'thumb204.src');
        eval('img'+position+'thumb204.src = img5thumb204.src');
        eval('img'+position+'= img5');

        // zmenime img5thumb100.src imgKLIKNUTEHOthumb100.src
        img5 = temp5src;
        img5 = temp5;
        img5thumb100.src = temp5100;
        // zmenime img5thumb204.src na imgKLIKNUTEHOthumb204.src
        img5thumb204.src = temp5204;
}

