<!-- 
/* javascript - WEBCUMULUS */

ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false

function preload(imgObj,imgSrc){
    eval(imgObj+' = new Image()')
    eval(imgObj+'.src = "'+imgSrc+'"')}

// DRUKUJ
function drukuj(){
if (!window.print){
alert("Musisz mieæ NS4.x lub IE5,\naby u¿yæ przycisku drukowania!")
return
}
window.print()
window.close()
//history.go(-1)
}

// OKNO
function okno(url) {
var autoclose = true
var title =  "HOTEL-SPA**** Dom Zdrojowy - Jastarnia"
winW = (ns4)? window.innerWidth-16 : document.body.offsetWidth-20
winH = (ns4)? window.innerHeight : document.body.offsetHeight
var windowW=800
var windowH=620
var windowX = (winW-windowW)/2
var windowY = (winH-windowH)/2

    NFW = window.open( url, 'Okno', 'width=800,height=600,toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=1,resizable=0');
//    NFW.blur()
//    window.focus()       
    NFW.resizeTo(windowW,windowH)
    NFW.moveTo(windowX,windowY)
    
}

//  PODMIANA WARSTW

 function toggle_div(nr,ilosc)  { 
  for (i=1; i<ilosc+1; i++){ eval ("document.getElementById('d" + i + "').style.display = 'none'"); }
	eval("document.getElementById('d" + nr + "').style.display = ''");
	eval("document.getElementById('d" + nr + "').style.position.top = '100'");	
	}
	//document.getElementById('d1').style.display = 'none'

// MAIL

function msg() {
document.mailer.action = "mailto:" 
mailtoandsubject = ((document.mailer.mailtoperson.options[document.mailer.mailtoperson.selectedIndex].value) + '?subject=' + document.mailer.subject.value);
}

// STYLE MENU
function getObj(id){
  if (document.all) obj = eval ('document.all.' + id);
  else obj = document.getElementById(id);
  return obj;
	}

function setStyle(item,style){
  obj = getObj(item + '_A');  obj.className = style;
  obj = getObj(item + '_TD'); obj.className = style;
	}

// LOSOWA PODMIAN ZDJEC W NAGLOWKU

/* javascript - WEBCUMULUS */
var time = 10000;
function Podmiana() {
  var nr = Math.floor(Math.random() * images) + 1;
	document.photo.src = eval("photo0"+nr+".src");
	window.setTimeout('Podmiana()',time);}

// AUTOMATYCZNA PREZENTACJA ZDJEC

function openImage(name,width,height,zamknij,text){
var autoclose = true
var title =  "HOTEL-SPA**** Dom Zdrojowy - Jastarnia"
winW = (ns4)? window.innerWidth-16 : document.body.offsetWidth-20
winH = (ns4)? window.innerHeight : document.body.offsetHeight
var windowW=width+150
var windowH=height+120
var windowX = (winW-windowW)/2
var windowY = (winH-windowH)/2

//    NFW = window.open("","popFrameless","fullscreen,width="+windowW+",height="+windowH)
    NFW = window.open("","popFrameless","width="+windowW+",height="+windowH)     
    NFW.blur()
    window.focus()       
    NFW.resizeTo(windowW,windowH)
    NFW.moveTo(windowX,windowY)
    var frameString=""+
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\"><html><head><title>"+title+"</title>"+
"<meta http-equiv=Content-Type content=\"text/html; charset=iso-8859-2\">"+
"<link rel=stylesheet type=text/css href=/s.css>"+
"</head><body topmargin=0 leftmargin=0 marginheight=0 marginwidth=0 class=galeria><table width=100% cellpadding=2 cellspacing=0 border=0 align=center><tr><td align=center><br><br>"+
"<img src=/photo/"+name+".jpg width="+width+" height="+height+" border=1 lowsrc=../i/lowsrc.jpg></td></tr><tr><td valign=top><div class=galeria_opis>"+
text+"<div class=navigation>&laquo;&nbsp;<a href=\"javascript:window.close()\" class=none>"+zamknij+"</a></div></div></td></tr></table></body></html>"
    NFW.document.open();
    NFW.document.write(frameString)
    NFW.document.close()
  
  NFW.focus()   
  if (autoclose){
    window.onunload = function(){NFW.close()}
  }
}
