    var ua = navigator.userAgent.toLowerCase();
    var isIE = ((ua.indexOf("msie")!=-1 && ua.indexOf("opera")==-1 && ua.indexOf("webtv") == -1) && (ua.indexOf("5.5")!=-1 || ua.indexOf("6.0")!=-1))
    var image_big = new Array();
    var image_med = new Array();
    var image_thumb = new Array();

    function switchPhotos(directory, image_big_w, image_big_h) {
/*
        var mainPhoto=document.getElementById("photomain");
        if (mainPhoto==null)
            return;
        
        mainPhoto.poradi = 0;
*/
        var img = document.getElementById("model-photos").getElementsByTagName("img");
        var directory = directory;
        
        for (i=0;i<img.length;i++) {

/*
            var file = img[i].src.replace(/.+\/(.+\.jpg)/gi, "$1");

            image_big[i] = new Image();
            image_big[i].src = directory+"big/"+file;

            image_thumb[i] = new Image();
            image_thumb[i].src = directory+"thumb/"+file;

            image_med[i] = new Image();
            image_med[i].src = directory+file;
*/

            if (!isIE && img[i].id=="photomain") {
                var bFoto = new bigFoto(img[i]);
                //bFoto.setValues(image_big[i].width, image_big[i].height);
                bFoto.setValues(image_big_w[i], image_big_h[i]);
                continue;
            }


            img[i].bFoto = new bigFoto(img[i]);
            //img[i].bFoto.setValues(image_big[i].width, image_big[i].height);
            img[i].bFoto.setValues(image_big_w[i], image_big_h[i]);

        }
    }


