// images js
var scrOfX = 0, scrOfY = 0, x = 0;
var zdjecia = new Array();

function getScrollXY() {
  if( typeof( window.pageYOffset ) == 'number' ) {
    //Netscape compliant
    scrOfY = window.pageYOffset;
    scrOfX = window.pageXOffset;
  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
    //DOM compliant
    scrOfY = document.body.scrollTop;
    scrOfX = document.body.scrollLeft;
  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
    //IE6 standards compliant mode
    scrOfY = document.documentElement.scrollTop;
    scrOfX = document.documentElement.scrollLeft;
  }
}

function showimages(image) {
	getScrollXY();
	window.scroll(0,0);
	if (navigator.appVersion.search("MSIE 7.0") != "-1") {
		document.getElementsByTagName("body")[0].style.overflowY = "hidden";
	} else {
		document.getElementById('body').className = "hideoverflow";
	}
	document.getElementById('imagebg').className = "visible";
	document.getElementById('image').className = "visible";
	document.getElementById('imagesrc').src = image;
}

function hideimages() {
	if (navigator.appVersion.search("MSIE 7.0") != "-1") {
		document.getElementsByTagName("body")[0].style.overflowY = "scroll";
	} else {
		document.getElementById('body').className = "showoverflow";
	}
	document.getElementById('imagebg').className = "nonvisible";
	document.getElementById('image').className = "nonvisible";
	document.getElementById('imagesrc').src = "";
	window.scroll(scrOfX,scrOfY);
}

// zmien wojewodztwo
function zmien_woj() {
	var id = document.getElementById('wojewodztwo').value;
	if (id > 0) {
		window.location.href = "6,"+id+",osrodki-szkoleniowe.html";
	} else {
		window.location.href = "6,osrodki-szkoleniowe.html";
	}
}

// rotacja zdjec
function pokaz_obraz() {	
	zdjecia[0] = 'foto1.jpg';
	zdjecia[1] = 'foto2.jpg';
	zdjecia[2] = 'foto3.jpg';
	zdjecia[3] = 'foto4.jpg';
	if (x == 4) x = 0;
	document.getElementById("intpicture").src = "files/150x150/" + zdjecia[x];
	x++;
}
