  function openWin2(url,name,width,height){

	height = (height > screen.height ? screen.height - 64 : height);
	if(width > screen.width)
		width = screen.width - 12;
	else
		width = width;

	topp = (height < screen.height-64 ? screen.height/2 - height/2 : 4);

	left=(screen.width/2 - width/2 - 5)


    wasOpen  = false;
    win = window.open(url,name,"width="+width+",height="+height+",top="+topp+",left="+left)
    return (typeof(win)=='object')?true:false;
  }


function openWin4(url,name,width,height){
//	height = (height > screen.height ? screen.height - 64 : height);
	if(width > screen.width)
		width = screen.width - 12;
	else
		width = width;

	topp = (height < screen.height-64 ? screen.height/2 - height/2 : 4);

	left=(screen.width/2 - width/2 - 5)


    wasOpen  = false;
    win = window.open(url,name,"width="+width+",height="+height+",top="+topp+",left="+left+",scrollbars=1,resizable=1")
    return (typeof(win)=='object')?true:false;
  }

  
    function openWin(url,name,width,height){

	height = (height > screen.height ? screen.height - 64 : height);
	if(width > screen.width)
		width = screen.width - 12;
	else
		width = width;

	topp = (height < screen.height-64 ? screen.height/2 - height/2 : 4);

	left=(screen.width/2 - width/2 - 5)


    wasOpen  = false;
    window.open(url,name,"width="+width+",height="+height+",top="+topp+",left="+left)
  }
  
function openWin3(url,name,width,height){

	height = (height > screen.height ? screen.height - 64 : height);
	if(width > screen.width)
		width = screen.width - 12;
	else
		width = width;

	topp = (height < screen.height-64 ? screen.height/2 - height/2 : 4);

	left=(screen.width/2 - width/2 - 5)


    wasOpen  = false;
    win = window.open(url,name,"scrollbars=1,width="+width+",height="+height+",top="+topp+",left="+left)
	return (typeof(win)=='object')?true:false;
  }
  
  function objGet(x) {
   if (typeof x != 'string') return x;
   else if (Boolean(document.getElementById))
      return document.getElementById(x);
   else if (Boolean(document.all))
      return eval('document.all.'+x);
   else if (Boolean(document.ids))
      return eval('document.ids.'+x);
   else
      return null;
}
  
  function validate(){
    if(objGet('prijmeni').value != "" && 
	   objGet('pocet_mist').value != "" && 
	   (objGet('mobil').value != "" || objGet('telefon').value != ""))
	{
	  return true;
	}
	else{
	  alert("je nutné vyplnit všechny údaje označené znakem *");
	  return false;
	}
  }