		
		function change_thumb(absolute_adress,timestamp,dir,i) {
			
			var loader = new ImageLoader(absolute_adress+dir+'/'+timestamp+'/big_'+i+'.jpg');
			
			loader.loadEvent = function(url, image){
			   //actions to perform when the image is loaded
			   //alert(url + ' is loaded');
			   //document.body.appendChild(image);
			   
			   //alert(url + ' is loaded')
			   
			   document.getElementById('big_thumb').src = image.src;
			   
			  //hide loading indicator if applicable
			}
			
			document.getElementById('big_thumb').onclick = function window_open() {
				window.open(''+absolute_adress+'image.php?img='+dir+'/'+timestamp+'/biggest_'+i+'.jpg'+'','','width=100,height=100,left=100,top=100,enubar=no,directories=no,toolbar=no,locaiton=no,status=no,scrollbars=no');
			};
			
			loader.load();
			
		}
		
		
		function load(timestamp,absolute_url) {
			if (typeof(window['fotky'] ) != "undefined") {
				if (fotky[1]==null) {
					document.getElementById("img_navigation").style.display = 'none';
				}
			}
		}
		
		
		function next() {
			
			if (fotky[pointer+1]==null) {
				pointer=0;
			}
			
			pointer++;
			
			change_thumb(fotky[pointer][0],fotky[pointer][1],fotky[pointer][2],fotky[pointer][3]);
		}
		
		
		function prev() {
			
			if (fotky[pointer-1]==null) {
				pointer=fotky.length-1;
			}
			
			pointer--;
			
			change_thumb(fotky[pointer][0],fotky[pointer][1],fotky[pointer][2],fotky[pointer][3]);
		}
		
		

