

function cislo(t) {
	if ( t.value >= 0 ) { } else {
		t.value = '';
		alert('Musí být číslo');
	};
}


function smazat(t) {
	var answer = confirm("Opravdu chcete smazat vybranou položku ?")
	if (answer){ return true; } else { return false; }
}

function smazat_eng(t) {
	var answer = confirm("Really delete ?")
	if (answer){ return true; } else { return false; }
}

function smazat_co(co) {
	var answer = confirm("Opravdu chcete trvale odstranit z databáze záznam "+ co +" ?")
	if (answer){ return true; } else { return false; }
}

function smazat_co_eng(co) {
	var answer = confirm("Really delete "+ co +" ?")
	if (answer){ return true; } else { return false; }
}

function img(params,x,y) {
   x = parseInt(x,10) + 30;
   y = parseInt(y,10) + 60;
  w = open("/cgi/sonic.cgi?templ=img" + params, "obrazek", "Scrollbars=1,resizable=1,width=" + escape(x) + ",height=" + escape(y) );
  if (w.opener == null) w.opener = self;
  w.focus();
}

function oknoIMG(IMG,ID) {
  w = open("foto.php?img=" + escape(IMG) + "&id=" + escape(ID), "efrog_foto" , "Scrollbars=1,resizable=1,width=640,height=480");
  if (w.opener == null) w.opener = self;
  w.focus();
}

function img_eshop(params,x,y) {
   x = parseInt(x,10) + 30;
   y = parseInt(y,10) + 60;
  w = open("/eshop/" + params + ".html", "obrazek", "Scrollbars=1,resizable=1,width=" + escape(x) + ",height=" + escape(y) );
  if (w.opener == null) w.opener = self;
  w.focus();
}

function img_grafika(params,x,y) {
   x = parseInt(x,10) + 30;
   y = parseInt(y,10) + 60;
  w = open("/cgi/sonic.cgi?templ=img&free=yes&html=yes&id=/grafika/" + params, "obrazek", "Scrollbars=1,resizable=1,width=" + escape(x) + ",height=" + escape(y) );
  if (w.opener == null) w.opener = self;
  w.focus();
}

function GetWindowsSize(osa) {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
  	  //Non-IE
	   myWidth = window.innerWidth;
	   myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
	 //IE 6+ in 'standards compliant mode'
	 myWidth = document.documentElement.clientWidth;
	 myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
	 //IE 4 compatible
	 myWidth = document.body.clientWidth;
	 myHeight = document.body.clientHeight;
  }

  if (osa == 'x') { return myWidth;   }
  if (osa == 'y') { return myHeight;   }

}

