function okno(url,w,h) {
  zhora=(screen.height/2)-(h/2)-20;
  sprava=(screen.width/2)-(w/2);
  if (zhora<=0) {
  	zhora=10;
  }
  if (sprava<=0) {
  	sprava=10;
  }

  features='scrollbars=no,menubar=0,width='+w+',height='+h+',top='+zhora+',left='+sprava;
  
  text = "";
  for (i = 0; i < url.length; i++)
  {
    pismeno = url.charAt(i);
    if (pismeno == "#") text+="%20";
    else text += pismeno;
  }
  url = text;
  
  msgWindow=window.open("","displayWindow",features)   
  msgWindow.document.write("<html><head><title>gallery</title><style>body {margin: 0px;background-color:white;}</style></head>") 
  msgWindow.document.write("<body><a href=javascript:window.close();><img src="+url+" alt=\"Zatvor okno\" width="+w+" height="+h+" border=0></a>")
  msgWindow.document.write("</body></html>") 
}

String.prototype.trim = function() {
 return this.replace(/^\s*|\s*$/g, "");
}

function validace(formular){
 if (formular.meno.value.trim()==''){
  alert("Prosím, podpíšte sa pod svoj príspevok");
  formular.meno.focus();
  return false;
 }
 if (formular.sprava.value.trim()==''){
  alert("Snažíte sa odoslať prázdny príspevok");
  formular.sprava.focus();
  return false;
 }
}

function pridajClanokBtn(){
 if(document.getElementById('zobrazPridanieBtn').value=='Pridaj príspevok')
 {
 	document.getElementById('boarddiv').style.display='block';
	document.getElementById('zobrazPridanieBtn').value='Zrušiť';
 } 
 else
 {
	document.getElementById('boarddiv').style.display='none';
	document.getElementById('zobrazPridanieBtn').value='Pridaj príspevok';
 }
}

function skkToEur(valueInSkk){
	return Math.round((valueInSkk/30.126)*100)/100;
}

function eurToSkk(valueInEur){
	return Math.round(valueInEur*30.126*100)/100;
}
