
	var count_pict = arr_pict_url.length;
	var count_in_str = 4;
	if(count_in_str > count_pict)
	{
	    count_in_str = count_pict;
	}
	var end_pict = count_pict - 1;
	var start = 0;
	var end = count_in_str-1;
	var step = 0;
	
	function show_picture()
	{
	    //alert(step);
	    str='';
	    start += step;
	    end += step;
	    var iCounter = 0
    
    	sClickEvents = '';
	    if ( start > 0 ) {
	    	//$$('img_left').src = aButtons['left']['on'].src;
	    	$$('img_left_on').style.display = 'block';
	    	$$('img_left_off').style.display = 'none';
	    }
	    if ( end < end_pict ) {
	    	//$$('img_right').src = aButtons['right']['on'].src;
	    	$$('img_right_on').style.display = 'block';
	    	$$('img_right_off').style.display = 'none';
	    }
		
	    for(i=start;i<=end;i++)
	    {
    	
    		$$( 'photoImage' + iCounter ).src = arr_pict_url[i];
    		$$( 'photoImage' + iCounter ).title = arr_pict_alt[i];
    		$$( 'photoImage' + iCounter ).alt = arr_pict_alt[i];
    		sClickEvents += "$$( 'photoImage" + iCounter + "').onclick = function(){showBigImg( " + i + " )};";
			
	        if(end==end_pict)
	        {
	        	//$$('img_right').src = aButtons['right']['off'].src;
	        	$$('img_right_off').style.display = 'block';
	        	$$('img_right_on').style.display = 'none';
	        }

	        if(start==0)
	        {
	        	$$('img_left_off').style.display = 'block';
	        	$$('img_left_on').style.display = 'none';
	        }

	        iCounter++;
	    }
	    eval( sClickEvents );
	    
	
	}
	function move_picture(go)
	{
	    //alert(go);
	    //alert('st='+start+',end='+end);
	    
	    if((go > 0 && end < end_pict) || (go < 0 && start > 0))
	    {
	        step = go;
	        show_picture();
	        timerId= setTimeout('move_picture('+go+')', period);
	    }
	    else
	    {
	        step = 0;
	        clearTimeout(timerId);
	    }
	
	}
	function stopTimer()
	{
	    clearTimeout(timerId);
	}
	
	function showBigImg( iNumber ){
		
		$$( 'bigImage' ).src = arr_pict_big_url[iNumber];
		$$( 'titleBigImage' ).innerHTML = arr_pict_alt[iNumber];
		$$( 'companyBigImage' ).innerHTML = arr_pict_company[iNumber];
	}
