function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

        function pop(theURL,winName,w,h)
        {	
			okraje_top_bottom = 115;
			okraje_left_right = 125;

			wtop = Math.round((screen.height - h - okraje_top_bottom) / 2);
			wleft = Math.round((screen.width - w - okraje_left_right) / 2);

	        img =  window.open(theURL,winName,'width=' + (w + okraje_left_right) + ', height=' + (h + okraje_top_bottom) + ',status=0,scrollbars=no,resizable=yes,top=' + wtop + ',left=' + wleft);
    	    img.focus();
        }
        function centred_window_scroll(theURL,w,h) {
			meta_h = 40;

			wtop = Math.round((screen.height - h - meta_h) / 2) - meta_h;
			wleft = Math.round((screen.width - w) / 2);
			
			info = window.open(theURL, '', 'width=' + (w + 20) + ', height=' + (h + meta_h + 10) + ',resizable=yes,scrollbars=1,status=0,top=' + wtop + ',left=' + wleft);
		}

        function centred_window_noscroll(theURL,w,h) {
			meta_h = 40;

			wtop = Math.round((screen.height - h - meta_h) / 2) - meta_h;
			wleft = Math.round((screen.width - w) / 2);
			
			info = window.open(theURL, '', 'width=' + (w + 20) + ', height=' + (h + meta_h + 10) + ',resizable=yes,scrollbars=0,status=0,top=' + wtop + ',left=' + wleft);
		}

		function jenCisla() {
			with (event)
			if (keyCode<48 || keyCode>57) returnValue=false;
		}

function pop2(theURL,w,h) {
    img =  window.open(theURL, '', 'width= ' + w + ', height= ' + h + ', toolbar=yes,resizable=no,scrollbars=0,status=0,top=0,left=0');
    img.focus();
}

function recommend(lng) {
	wtop = Math.round((screen.height - 400) / 2);
	wleft = Math.round((screen.width - 450) / 2);

    img =  window.open('http://www.theworld.cz/recommend.php?lang=' + lng, '', 'width= 400, height=450, toolbar=no,resizable=no,scrollbars=0,status=0,top=' + wtop + ',left=' + wleft);
    img.focus();
}

		function large_picture(nam, file, w, h) {

			meta_h = 50;

			wtop = Math.round((screen.height - h - meta_h) / 2) - meta_h;
			wleft = Math.round((screen.width - w) / 2);
	
			pic = window.open('', '', 'width=' + (w + 100) + ', height=' + (h + meta_h + 80) + ',resizable=yes,top=' + wtop + ',left=' + wleft);
			pic.document.open();
			pic.document.writeln('\
		<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\
			"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\
		\
		<html>\
		<head>\
		<title>' + nam + '</title />\
		<style type="text/css">\
		BODY { margin: 0px; background: black; }\
		</style>\
		</head>\
		<body>\
		<center>\
		<table align="center">\
		<tr style="height: 46px">\
			<td></td>\
		</tr>\
		</table>\
		<a href="javascript:window.close();" title="Kliknutím na obrázek okno zavřete"><img src="' + file + '" width="' + w + '" height="' + h + '" style="border: 0px;" alt="Kliknutím na obrázek okno zavřete" border="1"/></a>\
		</center>\
		<br>\
		<table align="center" width="100%">\
		<tr>\
			<td style="text-align: center; vertical-align: middle; font-family: Tahoma; font-size: 11px;color: white;"><strong>' + nam +'</strong></td>\
		</tr>\
		</table>\
		</body>\
		</html>\
		');
			pic.document.close();
		}

function enlarge_photo(lang, pic, url, ord, w, h, group) {
	if (lang == 'eng')
		photo = 'photos';
	else
		photo = 'fotky';

	theURL='http://www.theworld.cz/' + photo + '/' + url + '-' + pic + '/?lang=' + lang + '&ord=' + ord + '&group=' + group + '&w=' + w + '&h=' + h;

    img =  window.open(theURL,'','fullscreen,toolbar=no,resizable=yes,status=no,scrollbars=yes,top=0,left=0');
    img.focus();
}
