function LadujLayer(id, url) {
	if (document.layers) {
		var l = layobj(id);
		l.load(url,lyr.clip.width)
	}
	else if (document.all) {
		parent.bufferFrame.document.location = url
	}
}

function loadSourceFinish(id) {
	if (ie4) document.all[id].innerHTML = parent.bufferFrame.document.body.innerHTML
}


var imtem, immain, foto_counter, fototab;

function fotoinit() {
    imtemp = new Image();
	imtemp.src = "../../images/foto_czekaj.gif"; 
	foto_counter = 0;
	fototab = new Array();
	foto_load();
}

function getfotosrc() {
  if (foto_counter<0) foto_counter=fototab.length-1;
  if (foto_counter>=fototab.length) foto_counter=0;
  return fototab[foto_counter]; 
}

function fotozmien(kt) {
  foto_counter += kt;
  fotoshow();
}

function fotoshow() {
  var imsrc = getfotosrc();
  if (imsrc==null) return;
  
  if (przeg.dom) document.getElementById("zdjecieglowne").src=imtemp.src; 
  else 
  if (document.all) document.zdjeciegl.src = imtemp.src;
	else
  if (document.layers) document.layers["zdjecia"].document.zdjeciegl.src = imtemp.src;
  
  immain = new Image();
  immain.onload = onFotoLoad;
  immain.src = imsrc;
}

function fotoskok(i) {
  foto_counter = i;
  fotoshow();
}

function onFotoLoad() {  
	if (przeg.dom) {
	   document.getElementById("zdjecieglowne").src=immain.src; 
	}
    if (document.all) document.zdjeciegl.src=immain.src;
	else
	if (document.layers) document.layers["zdjecia"].document.zdjeciegl.src = immain.src;
}

