var tmp = navigator.userAgent;
var dom = document.getElementById ? true : false;
var opera = tmp.indexOf('Opera') != -1 ? true : false;
var ie = ((tmp.indexOf('MSIE') != -1) && (!opera)) ? true : false;
var ie4 = ((tmp.indexOf('MSIE 4.0') != -1) && (!opera)) ? true : false;
var ie5 = ((tmp.indexOf('MSIE 5.0') != -1) && (!opera)) ? true : false;
var dhtml = dom ? true : ie ? true : opera ? true : false;

function corners(){
  var tmp1 = '<div style="position: absolute';
  var tmp2 = '.png" width="65" height="65" border="0"></div>';
  var tmp3 = '.png" width="38" height="48" border="0"></div>';
  if((!ie4) || (!ie5)){		//v ie4 a v ie5 nefunguje bottom
    with(document){
      write('<div style="position: relative; top: -8px"><img src="images/vlnka.png" width="32" height="13" border="0"></div>');
      write(tmp1 + '; top: -16px; left: -15px"><img src="images/roh1' + tmp2);
      if(!opera) write(tmp1 + '; top: -16px; right: -16px"><img src="images/roh2' + tmp2); else write(tmp1 + '; top: -16px; right: -15px"><img src="images/roh2' + tmp2);
      if(!opera) write(tmp1 + '; bottom: -13px; left: -9px"><img src="images/roh3' + tmp3); else write(tmp1 + '; bottom: -12px; left: -9px"><img src="images/roh3' + tmp3);
      if(!opera) write(tmp1 + '; bottom: -13px; right: -10px"><img src="images/roh4' + tmp3); else write(tmp1 + '; bottom: -12px; right: -9px"><img src="images/roh4' + tmp3);
      write('<div style="position: absolute; bottom: 0px; right: 25px"><p class="nonA" style="font-size: 10px">&copy; <a href="http://www.faraweb.net" style="font-size: 10px" title="Created by FaraWEB.net">FaraWEB</a></p>');
    }
  }
  else alert('Váš prohlížeč plně nepodporuje moderní technologie, proto nemůže být vykreslen ozdobný rámeček');
}

function wopen(foto,popis){
myWidth=(window.screen.width/2)-(350+10)
fotka=window.open('','fotka','width=700,height=570,top=4,left='+myWidth+',scrollbars=yes,resizable=yes');fotka.focus();
okno(foto,popis);
}

function okno(foto,popis){
with(fotka.document){
	open();
	writeln('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\n<html>\n<head>');
	writeln('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">');
	writeln('<meta http-equiv="Content-Language" content="cs">');
	writeln('<meta http-equiv="imagetoolbar" content="no" />');
	writeln('<title>'+popis+'</title>\n</head>');
	writeln('<body style="background-color: #fff; margin:0px; padding:0px">');
	writeln('<table style="width: 100%; height: 100%; cursor: hand; cursor: pointer" cellspacing="0" cellpadding="0" onClick="window.close()">');
	write('<tr><td align="center" valign="middle">');
	write('<img src="'+foto+'" border="0" title="'+popis+'"></td>');
	writeln('</tr>\n</table>');
	writeln('</body>\n</html>');
	close();
}}

if(!dhtml) alert('Tyto stránky jsou optimalizované pro modernější prohlížeče než právě používáte,\nproto se nemusí vše zobrazit správně.');