
img_display_max = 4;
function display() {
	var image;
	for (var i=0; i<img_display_max ; i++ ) {
	    image = document.getElementById( "subPhote_" + i );
	    if ( image != null ) {
		image.style.display = "block";
	    }
	}
}
current_top = 0;

function img_move( up_or_down, img_max ) {;
var image;
var current_image_index;
    if ( up_or_down == "up" ) {
    	if ( current_top > 0 ) {
    	    for (var i=0; i<img_display_max ; i++ ) {
    	    	current_image_index = current_top + i;
                image = document.getElementById( "subPhote_" + current_image_index );
                image.style.display = "none";
            }
            current_top = current_top - 1;
            for (var i=0; i<img_display_max ; i++ ) {
    	    	current_image_index = current_top + i;
                image = document.getElementById( "subPhote_" + current_image_index );
                image.style.display = "block";
            }

        }
    } else {
        if ( current_top < img_max - img_display_max  ) {
            for (var i=0; i<img_display_max ; i++ ) {
    	    	current_image_index = current_top + i;
                image = document.getElementById( "subPhote_" + current_image_index );
                image.style.display = "none";
            }
            current_top = current_top + 1;
            for (var i=0; i<img_display_max ; i++ ) {
    	    	current_image_index = current_top + i;
                image = document.getElementById( "subPhote_" + current_image_index );
                image.style.display = "block";
            }
        }
    }
}

function img_onclick( src ) {
    var src_large = src.replace("medium", "large");
    src_large = src_large.replace("_MED", "_LRG");
    if ( src_large.indexOf( "no_picture.gif" ) == -1 ) {
        window.open(src_large);
    }
}

function medium_image_onclick( medium_image_file , alt ) {
    var img_main = document.getElementById("main_image");
    img_main.src = medium_image_file;
    img_main.alt = alt;
    img_main.title = alt;
    var main_img_a = document.getElementById("main_img_a");
    if ( medium_image_file.indexOf( "no_picture.gif" ) == -1 ) {
        main_img_a.style.cursor = "hand";
    } else {
        main_img_a.style.cursor = "default";
    }
}
