function style2px(hodnota)
// IN> string 220px
// OUT> int 220
{
	if (hodnota) 
		return Number(hodnota.substr(0,hodnota.indexOf("px")));
	else return 0
}
function get_current_height($element)
// OUT> Aktuální výšku prvku na stránce.
// get_current_height( document.getElementById('id','height') );
{
	var ee;
	try
		{
		var $cs=document.defaultView.getComputedStyle($element,'');
		$val=style2px($cs.getPropertyValue("height"));
		}
	catch(ee)
		{
		$val=($element.offsetHeight);
		if($val<0)$val=0;
		}
	return $val;
}
function getInternetExplorerVersion()
{
	var rv = -1;
	if (navigator.appName == 'Microsoft Internet Explorer')
	 {
	 var ua = navigator.userAgent;
	 var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
	 if (re.exec(ua) != null)
		rv = parseFloat( RegExp.$1 );
	 }
	return rv;
}
function init() {
     window.onresize = function() { ResizeIE(); }
}
function ResizeIE() {
	if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && getInternetExplorerVersion() == 6.0 ) {
		if ( get_current_height(document.getElementById('container','height'))  < (winH()-70 ) ) {
	
			document.getElementById('foot').style.position = 'absolute';
			document.getElementById('foot').style.bottom ='0';

		} else {

			if (document.body.scrollTop<70) {

				document.getElementById('foot').style.position = 'absolute';
				document.getElementById('foot').style.bottom = -document.body.scrollTop;

			} else {

				document.getElementById('foot').style.position = 'relative';
				document.getElementById('foot').style.bottom ='0';
				document.getElementById('foot').style.margin ='-70px 0 0 0';

			}
		}

	}
}
function winH() {
   if (window.innerHeight)
      /* NN4 a kompatibilní prohlížeče */
      return window.innerHeight;
   else if
   (document.documentElement &&
   document.documentElement.clientHeight)
      /* MSIE6 v std. režimu - Opera a Mozilla
      již uspěly s window.innerHeight */
      return document.documentElement.clientHeight;
   else if
   (document.body && document.body.clientHeight)
      /* starší MSIE + MSIE6 v quirk režimu */
      return document.body.clientHeight;
   else
      return null;
}
// JavaScript Document

//galerie



function galery (pat, name,w,h){

 var img = '';

 img = name;

 galerys = window.open ('', 'zoom', 'left=100, top=100, width='+w+', height='+h+','+

                        'toolbar=no, location=no, directories=no, status=no,'+

                        'menubar=no, scrollbars=no, resizable=no, copyhystory=no');

 with (galerys.document){

  open ();



   write ('<?xml version="1.0" encoding="iso-8859-2"?>\n');

   write ('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n');

   write ('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cs">\n');

   write ('<head>\n\n');

   write (' <title>galery - '+name+'</title>\n\n');

   write (' <meta http-equiv="content-type"  content="application/xhtml+xml; charset=utf-8" />\n');

   write (' <meta http-equiv="pragma"        content="no-cache" />\n');

   write (' <meta http-equiv="cache-control" content="no-cache" />\n');

   write (' <meta http-equiv="expires"       content="-1" />\n\n');

   write ('<style type="text/css">body{margin:0px;padding:0px;overflow:hidden;}img{border:0px}</style>');

   write ('</head>\n');

   write ('<body>\n');

   write ('<a href="javascript:close();" title="close">');

   write ('<img src="'+pat+''+img+'" alt="'+name+'" name="prvni" />\n');

   write ('</a>\n');

   write ('</body>\n');

   write ('</html>');

  close ();

 }

}

