// podpora IE4 a NS odstranena
var isDyn=isDOM=(document.getElementById);
// T_gobj = getRef 
function T_gobj(id){return document.getElementById(id);}

/* nospam */
function nospamf(box, domain) {
 if(typeof(domain)=="undefined") domain="topinfo.cz";
 var proto=String.fromCharCode(109,97,105,108,116,111,58)
 w=window.open(proto+box+String.fromCharCode(64)+domain);
 if (w!=null) w.close(); //FF
}
function nospam(box, domain, title, attr) {
 if(typeof(domain)=="undefined") domain="topinfo.cz";
 if(typeof(attr)=="undefined") attr="";
 if(typeof(title)=="undefined") title=box+String.fromCharCode(64)+domain;
 document.write("<a href=\"javascript:nospamf('"+box+"', '"+domain+"')\""+(attr.length>0?" ":"")+attr+">"+title+"</a>");
}
function zavinac() {
 document.write(String.fromCharCode(64));
}
/* /nospam */

function checkEmail(email) {
 var re = /^[_\w\.\-]+@\w+((\-|\.)\w+)*\.[a-zA-Z]{2,4}$/;
 if (re.test(email)) return 1; else return 0;
}
 
// predelat na objekt, doplnit vlastnosti css, body class, close obrazkem dynamicky nahore, a tlacitka predchozi dalsi ?pole obrazku/AJAX
function oWin(pFileName, i_width, i_height, pTitle, pClose) {
  var swidth=screen.width, sheight=screen.height;
  //doplnit testovani (0, None ?) spravne nacteni jinak nastavit swidth=590 a sheight=410 (pro 800x600)
  var min_x=100, min_y=100, max_x=swidth-50, max_y=sheight-190;
  var owidth=i_width>max_x?max_x:i_width<min_x?min_x:i_width, oheight=i_height>max_y?max_y:i_height<min_y?min_y:i_height;
  if ((owidth!=i_width) || (oheight!=i_height))
    photoWin = window.open("", "", "width="+(owidth+50)+",height="+(oheight)+",menubar=0,scrollbars,resizable,screenX=20,screenY=40,left=20,top=40");
  else
    photoWin = window.open("", "", "width="+(owidth+50)+",height="+(oheight+86)+",screenX=20,screenY=40,left=20,top=40");
  photoWin.document.writeln('<html><head>');
  photoWin.document.writeln('<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">');
  photoWin.document.writeln('<link rel="stylesheet" href="project.css" type="text/css" media="all">');
  photoWin.document.writeln('<title>' + pTitle + '</title>');
  photoWin.document.writeln('</head>');
  photoWin.document.writeln('<body class="owin">');
  photoWin.document.writeln('<div align="center"><b>' + pTitle + '</b><br />');
  photoWin.document.writeln('<a class="window" href="javascript:self.close()">');
  photoWin.document.writeln('<img src="' + pFileName + '" width="' + i_width + '" height="' + i_height + '" border="1" alt="' + pClose + '" /><br />');
  photoWin.document.writeln('<small>' + pClose + '</small></a><br /></div>');
  photoWin.document.writeln('</body></html>');
  photoWin.document.close();
  photoWin.focus();
  return false;
}
 