function switch1(div) {
	var i = 1;
	while( document.getElementById( 'thumb' + i ) ) {
		obj = document.getElementById( 'thumb' + i );
		obj.style.display = ( 'thumb' + i == div ) ? "block" : "none";
		i = i + 1;
	}
}

window.onload = function() { switch1( 'thumb1' ); }