function rv_Foto(image,tit,pozadie){
  nazov = tit;
  img = image;
  bkgs = pozadie;
  foto1= new Image();
  foto1.src=(img);
  Kontrola(img);
}
function Kontrola(img){
  if((foto1.width!=0)&&(foto1.height!=0)){
    view_rvFoto(img,nazov,bkgs);
  }
  else{
    funkcia="Kontrola('"+img+"')";
    interval=setTimeout(funkcia,20);
  }
}
function view_rvFoto(img,nazov,bkgs){
  s_o=foto1.width;
  v_o=foto1.height;
  if ((s_o >= screen.width) && (v_o < screen.height))
	  { sirka_o= (screen.width/s_o)*s_o;
		vyska_o= (screen.width/s_o)*v_o;
	  }
  else if ((s_o < screen.width) && (v_o >= screen.height))
	  { vyska_o= (screen.height/v_o)*v_o;
		sirka_o= (screen.height/v_o)*s_o;
	  }
  else if ((s_o >= screen.width) && (v_o >= screen.height))
	  { if ( s_o > v_o)
			  {sirka_o= (screen.width/s_o)*s_o;
			   vyska_o= (screen.width/s_o)*v_o;
			  }
		else ( v_o > s_o)
			  {vyska_o= (screen.height/v_o)*v_o;
			   sirka_o= (screen.height/v_o)*s_o;
			  }
	  }
  else {sirka_o=foto1.width+10;vyska_o=foto1.height+10;}
  l_rv=(screen.width/2) - (sirka_o/2);
  t_rv=(screen.height/2) -(vyska_o/2);
  stringa="width="+sirka_o+",height="+vyska_o;
finale=window.open("","",stringa);
finale.moveTo(l_rv,t_rv)
finale.document.write( "<HTML><title>"+nazov+"</title>")
finale.document.write( "<body bgcolor=#"+bkgs+" leftmargin=0 marginheight=0 marginwidth=0 topmargin=5>\n<p align='center'>")
finale.document.write( "<IMG name=foto src="+img+" onClick=window.close() alt=' Kliknite pre KONIEC'>\n</BODY></HTML>");    
}
function rv_win(pozadie,naz,fp,s_txt){
	f_pisma = fp;
	sprava = s_txt;
	bkg_rv = pozadie;
	win_rv = naz;
	v_rv=(screen.width/2.3);
    s_rv=(screen.height/2.3);
	left_rv = (screen.width/2) - (v_rv/2);
	top_rv  = (screen.height/2) - (s_rv/2);
	udaje_rv = "width="+v_rv+",height="+s_rv+",top="+top_rv+",left="+left_rv;
ok=window.open("","",udaje_rv);
ok.document.write( "<HTML><title>Téma: "+win_rv+"</title>")
ok.document.write( "<body leftmargin=0 marginheight=0 marginwidth=0 topmargin=10 style='BACKGROUND-IMAGE: url("+bkg_rv+");FONT-FAMILY: Verdana,Tahoma,Arial CE, Arial, sans-serif;FONT-SIZE: 12px;FONT-WEIGHT: bold;COLOR:"+f_pisma+"'><table width=100% height=100% onClick=window.close()><td align=center valign=center>"+sprava+"</td></table></BODY></HTML>")
}

function pocasie_SK(url, name, height, width) {
  var str = "height=" + height + ",innerHeight=" + height;
  str += ",width=" + width + ",innerWidth=" + width;
  if (window.screen) {
    var ah = screen.availHeight - 30;
    var aw = screen.availWidth - 10;

    var xc = (aw - width) / 2;
    var yc = (ah - height) / 2;

    str += ",left=" + xc + ",screenX=" + xc;
    str += ",top=" + yc + ",screenY=" + yc;
  }
  window.open(url, name, str + ",scrollbars=no, status=no, resizable=no");
}
function kurz_EUR(url, name, height, width) {
  var str = "height=" + height + ",innerHeight=" + height;
  str += ",width=" + width + ",innerWidth=" + width;
  if (window.screen) {
    var ah = screen.availHeight - 30;
    var aw = screen.availWidth - 10;

    var xc = (aw - width) / 2;
    var yc = (ah - height) / 2;

    str += ",left=" + xc + ",screenX=" + xc;
    str += ",top=" + yc + ",screenY=" + yc;
  }
  window.open(url, name, str + ",scrollbars=no, status=no, resizable=no");
}

function view_pocasie(meno,zdroj,mesto,vs,zs,lat,lon,lok){
	var datum = new Date();
	rvbkg = "#ffffff";
	rvwin = meno;
	v_rv=620;
    s_rv=450;
	left_rv = (screen.width/2) - 310;
	top_rv  = (screen.height/2) - 230;
	rvudaje = "width="+v_rv+",height="+s_rv+",top="+top_rv+",left="+left_rv+",status=no";
ok=window.open("","",rvudaje);
ok.document.write( "<HTML><title>"+rvwin+"</title>")
ok.document.write( "<body leftmargin=0 marginheight=0 marginwidth=0 topmargin=10 style='BACKGROUND-COLOR:"+rvbkg+"'><script>window.defaultStatus='ALBum system (zdroj: SHMU)'</script><table width=100% height=100% onClick=window.close() title=' click to CLOSE' style='cursor:pointer'><td><div style='z-index:-2;width=612;height=445;padding-top:3px;padding-left:5px;padding-right:5px;POSITION: relative;left:2px;top:-10px; FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR:#cc0000; FONT-FAMILY: Arial CE, Verdana, Helvetica CE, Arial, Helvetica, sans-serif;BACKGROUND-IMAGE: url(http://www.shmu.sk/obrazok.php?co=map_eu)'><div style='width=100;height=50; FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR:#cc0000; FONT-FAMILY: Arial CE, Verdana, Helvetica CE, Arial, Helvetica, sans-serif;POSITION: relative;left:-5px;top:-3px;BACKGROUND-COLOR:#ffffff' align=center><img src=\"http://www.alb.sk/mini_Pic/albi_color.gif\"><br>www.alb.sk</div></td></table></BODY></HTML>")
}

function view_kurzsk(backg,naz){
	rvbkg = backg;
	rvw = naz;
	v_rv=130;
    s_rv=195;
	left_rv = (screen.width/2) - 130;
	top_rv  = (screen.height/2) - 195;
	rvudaje = "width="+v_rv+",height="+s_rv+",top="+top_rv+",left="+left_rv+",status=no";
ok=window.open("","",rvudaje);
ok.document.write( "<HTML><title>"+rvw+"</title>")
ok.document.write( "<body leftmargin=0 marginheight=0 marginwidth=0 topmargin=0 style='cursor:pointer;BACKGROUND-COLOR:#ffffff'><script>window.defaultStatus='ALBum system'</script><table width=100% height=100% onClick=window.close() title=' Kliknite pre KONIEC'><tr><td align=center><iframe src=http://www.freewebcontent.eu/exchange-rates/kurzovy-listok-sk.php?show=1&lg=sk&gd=&gk=YWRjZGFiYWFjYWFiYWJi width=150 height=200 scrolling=no frameborder=0></iframe></td></tr></table></BODY></HTML>")
}
