var path = new Array();
var memo = new Array();
path[0] = '0_12231238541097.jpg';
memo[0] = '';
path[1] = '0_12211694238369.jpg';
memo[1] = '';
path[2] = '0_12210741317440.jpg';
memo[2] = '';
path[3] = '0_12231238534560.jpg';
memo[3] = '';
path[4] = '0_12209497858951.jpg';
memo[4] = '';
path[5] = '0_12209563325360.jpg';
memo[5] = '';
path[6] = '0_12205373617029.jpg';
memo[6] = '';
path[7] = '0_12205373632743.jpg';
memo[7] = '';
path[8] = '0_1220537368810.jpg';
memo[8] = '';
path[9] = '0_12245808242962.jpg';
memo[9] = '';
path[10] = '0_12220994482247.jpg';
memo[10] = '';
path[11] = '0_12233148152777.jpg';
memo[11] = '';
path[12] = '0_1223129234446.jpg';
memo[12] = '';
path[13] = '0_12253601675371.jpg';
memo[13] = '';
path[14] = '0_12284301895866.jpg';
memo[14] = '';
path[15] = '0_12294218533633.jpg';
memo[15] = '';
path[16] = '0_12323758727931.jpg';
memo[16] = '';
path[17] = '0_12323878236529.jpg';
memo[17] = '';
path[18] = '0_12325009398358.jpg';
memo[18] = '';
path[19] = '0_1232546307111.jpg';
memo[19] = '';
path[20] = '0_12325463286658.jpg';
memo[20] = '';
path[21] = '0_12325463662688.jpg';
memo[21] = '';
path[22] = '0_12336970831788.jpg';
memo[22] = '';
path[23] = '0_1232546440398.jpg';
memo[23] = '';
path[24] = '0_12325465141327.jpg';
memo[24] = '';
path[25] = '0_12337044666622.jpg';
memo[25] = '';
path[26] = '0_12403912729064.jpg';
memo[26] = '';
path[27] = '0_12409263634834.jpg';
memo[27] = '';
path[28] = '0_12436000871839.jpg';
memo[28] = '';
path[29] = '0_12440242906307.jpg';
memo[29] = '';
path[30] = '0_12447398898373.jpg';
memo[30] = '';
path[31] = '0_12450823808159.jpg';
memo[31] = '';
path[32] = '0_12514619411006.jpg';
memo[32] = '';
path[33] = '0_12516285443899.jpg';
memo[33] = '';
path[34] = '0_12518090612916.jpg';
memo[34] = '';
path[35] = '0_1251902807821.jpg';
memo[35] = '';
path[36] = '0_12525056233535.jpg';
memo[36] = '';
path[37] = '0_12525056335303.jpg';
memo[37] = '';
path[38] = '0_12525056408833.jpg';
memo[38] = '';
path[39] = '0_12525119061249.jpg';
memo[39] = '';
path[40] = '0_12532032945432.jpg';
memo[40] = '';
path[41] = '0_12543180984199.jpg';
memo[41] = '';
path[42] = '0_12547363762092.jpg';
memo[42] = '';
path[43] = '0_12549564269838.jpg';
memo[43] = '';
path[44] = '0_12585647227995.jpg';
memo[44] = '';
path[45] = '0_12597508316688.jpg';
memo[45] = '';
path[46] = '0_12597564308485.jpg';
memo[46] = '';
path[47] = '0_12597712433639.jpg';
memo[47] = '';
path[48] = '0_12598407971949.jpg';
memo[48] = '';
path[49] = '0_12599290795145.jpg';
memo[49] = '';
path[50] = '0_12602264957461.jpg';
memo[50] = '';
path[51] = '0_12603842522410.jpg';
memo[51] = '';
path[52] = '0_12605438532722.jpg';
memo[52] = '';
path[53] = '0_12620820171621.jpg';
memo[53] = '';
path[54] = '0_12620820247400.jpg';
memo[54] = '';
path[55] = '0_12627259188299.jpg';
memo[55] = '';
path[56] = '0_12633240639001.jpg';
memo[56] = '';
path[57] = '0_12633240681768.jpg';
memo[57] = '';
path[58] = '0_12633240739603.jpg';
memo[58] = '';
path[59] = '0_12633240785962.jpg';
memo[59] = '';
path[60] = '0_12633260151811.jpg';
memo[60] = '';
path[61] = '0_12633263098019.jpg';
memo[61] = '';
path[62] = '0_12635776536636.jpg';
memo[62] = '';
path[63] = '0_12641157634868.jpg';
memo[63] = '';
path[64] = '0_12641157649092.jpg';
memo[64] = '';
path[65] = '0_126411576597.jpg';
memo[65] = '';
path[66] = '0_12641164443998.jpg';
memo[66] = '';
path[67] = '0_12646003801741.jpg';
memo[67] = '';
path[68] = '0_12647233338757.jpg';
memo[68] = '';
path[69] = '0_12647694144288.jpg';
memo[69] = '';
path[70] = '0_12650301623934.jpg';
memo[70] = '';
path[71] = '0_12650301634226.jpg';
memo[71] = '';
path[72] = '0_12650696717797.jpg';
memo[72] = '';
path[73] = '0_12652873128971.jpg';
memo[73] = '';
path[74] = '0_12658810863224.jpg';
memo[74] = '';
path[75] = '0_12658810878577.jpg';
memo[75] = '';
path[76] = '0_1265884445583.jpg';
memo[76] = '';
path[77] = '0_12659624236436.jpg';
memo[77] = '';
path[78] = '0_12659631351113.jpg';
memo[78] = '';
path[79] = '0_12659631441619.jpg';
memo[79] = '';
path[80] = '0_12659631489316.jpg';
memo[80] = '';
path[81] = '0_12659631503854.jpg';
memo[81] = '';
path[82] = '0_12677276597558.jpg';
memo[82] = '';
path[83] = '0_12677384818182.jpg';
memo[83] = '';
path[84] = '0_12681589115250.jpg';
memo[84] = '';
path[85] = '0_12683195369359.jpg';
memo[85] = '';
path[86] = '0_1268597584951.jpg';
memo[86] = '';
path[87] = '0_12689558243331.jpg';
memo[87] = '';
path[88] = '0_12692698872220.jpg';
memo[88] = '';
path[89] = '0_12692698889579.jpg';
memo[89] = '';
path[90] = '0_12692698889293.jpg';
memo[90] = '';
path[91] = '0_12695341845256.jpg';
memo[91] = '';
path[92] = '0_12695341858350.jpg';
memo[92] = '';
path[93] = '0_12697707417186.jpg';
memo[93] = '';
path[94] = '0_12700711388600.jpg';
memo[94] = '';
path[95] = '0_12705021859870.jpg';
memo[95] = '';
path[96] = '0_12708016517558.jpg';
memo[96] = '';
path[97] = '0_12710717415880.jpg';
memo[97] = '';
path[98] = '0_1271076722387.jpg';
memo[98] = '';
path[99] = '0_12716066282775.jpg';
memo[99] = '';
path[100] = '0_1271609359843.jpg';
memo[100] = '';
path[101] = '0_12725635035994.jpg';
memo[101] = '';
path[102] = '0_12736943841976.jpg';
memo[102] = '';
path[103] = '0_12736943849149.jpg';
memo[103] = '';
path[104] = '0_12736943856444.jpg';
memo[104] = '';
path[105] = '0_1273694385389.jpg';
memo[105] = '';
path[106] = '0_12743922457773.jpg';
memo[106] = '';
path[107] = '0_1275387654573.jpg';
memo[107] = '';
path[108] = '0_12760785954384.jpg';
memo[108] = '';
path[109] = '0_12760792471256.jpg';
memo[109] = '';
path[110] = '0_12762471505114.jpg';
memo[110] = '';
path[111] = '0_12837938979690.jpg';
memo[111] = '';
path[112] = '0_12838612497838.jpg';
memo[112] = '';
path[113] = '0_12838768033938.jpg';
memo[113] = '';
load_img = new Image();
load_img.src = 'http://www.beatup.cz/images/loader.gif';

img2 = new Image();
img2.src = 'http://www.beatup.cz/images/back.jpg';

img3 = new Image();
img3.src = 'http://www.beatup.cz/images/forward.jpg';

img4 = new Image();
img4.src = 'http://www.beatup.cz/images/close.jpg';

document.write('<div id="gallery"></div>');
document.write('<div id="loading"><a href="javascript:close();"><img src="http://www.beatup.cz/images/loader.gif" alt="loading..." border="0" /></a></div>');
document.write('<div id="shadow"></div>');

var div = document.getElementById('gallery');
var loading = document.getElementById('loading');
var shadow = document.getElementById('shadow');

function gallery(image){

	var ScrollPosition = document.documentElement.scrollTop; 
	shadowHeight = document.body.clientHeight;
	
	if(shadowHeight < document.documentElement.clientHeight){
		shadowHeight = document.documentElement.clientHeight;
	}
	
	shadow.style.height = shadowHeight + "px";
	shadow.style.display = 'block';
  	
	img = new Image();
 	img.src = image;
	
	if(navigator.appName == 'Netscape' || navigator.appName == 'Opera'){
		ScreenHeight_half = Math.round(window.innerHeight/2);
	}
	else if(navigator.appName == 'Microsoft Internet Explorer'){
		ScreenHeight_half = Math.round(document.documentElement.clientHeight/2);
	}
	else{
		ScreenHeight_half = Math.round(window.innerHeight/2);
	}
	
	loading.style.top = ScreenHeight_half + ScrollPosition - 8 + 'px';
	loading.style.display = 'block';
		
	var n=0;
	
	function galleryAlpha(){
		n += 0.1;
		div.style.opacity = n;
		div.style.filter = "alpha(opacity=" + n*100 + ")";
		
		if(n>1){
			
			if(meter != "undefined"){
				clearInterval(meter);
			}

		}
	}
	

	function ShowImage(){
	
		var ImgWidth  = img.width+20;
		var ImgHeight = img.height;
		var ImgBorder = 10;
			
		ImgWidth_half  = Math.round(ImgWidth/2);
		ImgHeight_half = Math.round(ImgHeight/2);
		
		div.style.top = ScreenHeight_half + ScrollPosition - ImgHeight_half - ImgBorder + 'px';
		
		div.style.marginLeft = '-'+ImgWidth_half+'px';
	 
		div.innerHTML = '<a href="javascript:close();"><img class="g_image" src="'+image+'" /></a>';
		
		div.innerHTML += '<a class="gallery_close" href="javascript:close();"><img border="0" src="http://www.beatup.cz/images/close.jpg" alt="close" /></a>';
		
		loading.style.display = 'none';
	
		div.style.display = 'block';
		
		meter = setInterval(galleryAlpha,50);

	}
	
	if(img.complete){
		
		ShowImage();
	
	}
	else{
		
		img.onload = function(){
		
			ShowImage();
		
		}
	}
}

function gallery2(id){

	
	div.style.opacity = 0;
	div.style.filter = "alpha(opacity=0);";

	var ScrollPosition = document.documentElement.scrollTop; 
	shadowHeight = document.body.clientHeight;
	
	if(shadowHeight < document.documentElement.clientHeight){
		shadowHeight = document.documentElement.clientHeight;
	}
	
	shadow.style.height = shadowHeight + "px";
	shadow.style.display = 'block';
  	
	img = new Image();
 	img.src = 'http://www.beatup.cz/g_foto/'+path[id];
	
	image = 'http://www.beatup.cz/g_foto/'+path[id];
	
	if(navigator.appName == 'Netscape' || navigator.appName == 'Opera'){
		ScreenHeight_half = Math.round(window.innerHeight/2);
	}
	else if(navigator.appName == 'Microsoft Internet Explorer'){
		ScreenHeight_half = Math.round(document.documentElement.clientHeight/2);
	}
	else{
		ScreenHeight_half = Math.round(window.innerHeight/2);
	}
	
	loading.style.top = ScreenHeight_half + ScrollPosition - 8 + 'px';
	loading.style.display = 'block';
		
	var n=0;
	
	function galleryAlpha(){
		n += 0.1;
		div.style.opacity = n;
		div.style.filter = "alpha(opacity=" + n*100 + ")";
		
		if(n>1){
			
			if(meter != "undefined"){
				clearInterval(meter);
			}

		}
	}
	
	function ShowImage(){
	
		var ImgWidth  = img.width+20;
		var ImgHeight = img.height;
		var ImgBorder = 10;
			
		ImgWidth_half  = Math.round(ImgWidth/2);
		ImgHeight_half = Math.round(ImgHeight/2);
		
		div.style.top = ScreenHeight_half + ScrollPosition - ImgHeight_half - ImgBorder + 'px';
		
		div.style.marginLeft = '-'+ImgWidth_half+'px';
	 
		div.innerHTML = '<a href="javascript:close();"><img class="g_image" src="'+image+'" />';
		
		div.innerHTML += '<span class="gallery_memo">'+memo[id]+'</span></a>';
		
		if(path[id+1] != undefined){
			
			e = id+1;
			
		div.innerHTML += '<a class="gallery_button2" href="javascript:gallery2('+e+');"><img src="http://www.beatup.cz/images/forward.jpg" alt="back" border="0" /></a>';
		
		}
		
		
		if(path[id-1] != undefined){
			
			j = id-1;
		
		div.innerHTML += '<a class="gallery_button1" href="javascript:gallery2('+j+');"><img src="http://www.beatup.cz/images/back.jpg" alt="forward" border="0" /></a>';
		
		}
		
		div.innerHTML += '<a class="gallery_close" href="javascript:close();"><img border="0" src="http://www.beatup.cz/images/close.jpg" alt="close" /></a>';
		
		loading.style.display = 'none';
	
		div.style.display = 'block';
		
		meter = setInterval(galleryAlpha,50);

	}
	
	if(img.complete){
		
		ShowImage();
	
	}
	else{
		
		img.onload = function(){
		
			ShowImage();
		
		}
	}
}

function close(){

/*	n = 1;
	function galleryAlpha2(){
		n -= 0.1;
		div.style.opacity = n;
		div.style.filter = "alpha(opacity=" + n*100 + ")";
		
		m = n - 0.4;
		
		if(m>=0){
		
			shadow.style.opacity = m;
			shadow.style.filter = "alpha(opacity="+ m*100 + ")";
		
		}
		
		if(n<0){
	
			div.innerHTML = '';
			loading.style.display = 'none';	
			div.style.display = 'none';
			shadow.style.display = 'none';
			div.style.opacity = 0;
			div.style.filter = "alpha(opacity=0)";
			shadow.style.opacity = 0.6;
			shadow.style.filter = "alpha(opacity=60)";
		
		}
		
		if(n<0){
			
			if(interval != "undefined"){
				clearInterval(interval);
			}

		}
	}
	
	interval = setInterval(galleryAlpha2,300);
*/	
	div.innerHTML = '';
	loading.style.display = 'none';	
	div.style.display = 'none';
	shadow.style.display = 'none';
	div.style.opacity = 0;
	div.style.filter = "alpha(opacity=0)";
	shadow.style.opacity = 0.6;
	shadow.style.filter = "alpha(opacity=60)";
	
	var object = document.getElementsByTagName('object');
	for(i=0;i<object.length;i++){
		object[i].style.visibility = 'visible';
	}

}