    function get_window_width() {
            var intW = 0;

            if(self.innerHeight) {
                    intW = window.innerWidth;
            } else {
                    if(document.documentElement && document.documentElement.clientHeight) {
                            intW = document.documentElement.clientWidth;
                    } else {
                            if(document.body) {
                                    intW = document.body.clientWidth;
                            }
                    }
            }
            return parseInt(intW, 10);
    }

    function get_window_height() {
            var intH = 0;

            if(self.innerHeight) {
                    intH = window.innerHeight;
            } else {
                    if(document.documentElement && document.documentElement.clientHeight) {
                            intH = document.documentElement.clientHeight;
                    } else {
                            if(document.body) {
                                    intH = document.body.clientHeight;
                            }
                    }
            }
            return parseInt(intH, 10);
    }

    function galeria_center(obj,obj2) {

            var obj_left = parseInt(document.getElementById(obj).style.left, 10);
            var obj_width = Math.round(parseInt(document.getElementById(obj).style.width, 10)/2);
            var window_width = Math.round(get_window_width()/2);

            var pos_x = window_width - obj_width - obj_left-1;
            var pos_y = 0;

            new Effect.Move('galeria', { duration:0.5, x: pos_x, y: pos_y, mode: 'absolute'} );

            for(n=0; n<photosy.length; n++) {
                document.getElementById('index'+n).style.color='blue';
            }

            document.getElementById(obj2).style.color='white';
    }

	var photosy = new Array();
            h=324;mnoznik='1';

                photosy.push(new Array('kolkaBMC',1000,''));
                for (i=1;i<res.length-1;i++) photosy.push(new Array(katalog+''+i,res[i]*mnoznik,''));
		photosy.push(new Array('kolkaBMC',1000,''));


