var image = "pixel.gif";			
var from = escape(document.referrer);	
var query = location.search;
var colorDepth = window.screen.colorDepth;			
var res = window.screen.width + "," + window.screen.height;
var strona = location.href;
document.write("<img src='statystyka/zlicz.php?referer=" + from + "&query=" + query + "&kolory=" + colorDepth + "&rozdzielczosc=" + res + "&img=" + image + "&strona=" + strona +  "' align='middle' style='display:none'>");


function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		przycisk_1_over = newImage("img/przycisk_1_over.gif");
		przycisk_1_przycisk_2_over = newImage("img/przycisk_1_przycisk_2_over.gif");
		przycisk_2_over = newImage("img/przycisk_2_over.gif");
		przycisk_2_przycisk_3_over = newImage("img/przycisk_2_przycisk_3_over.gif");
		przycisk_3_over = newImage("img/przycisk_3_over.gif");
		przycisk_3_przycisk_4_over = newImage("img/przycisk_3_przycisk_4_over.gif");
		przycisk_4_over = newImage("img/przycisk_4_over.gif");
		przycisk_4_przycisk_5_over = newImage("img/przycisk_4_przycisk_5_over.gif");
		przycisk_5_over = newImage("img/przycisk_5_over.gif");
		preloadFlag = true;
	}
}

var okno = null;
function powieksz(width, height, url) {
	borderless=false;
	ScrWidth = 640; ScrHeight = 480;
	if (window.screen) {ScrWidth = window.screen.width; ScrHeight = window.screen.height}
	PosX = Math.round((ScrWidth - width)/2);
	PosY = Math.round((ScrHeight - height)/2);
	if (okno != null && !document.layers) {okno.close();}
	if (borderless && !document.layers) {
		okno = window.open("", "splash", "fullscreen=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0");
		okno.resizeTo(w, s);
		okno.moveTo(PosX, PosY);
	}
	else
		okno = window.open("", "splash", "menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=no,copyhistory=no,width=" + width + ",height=" + height + ",left=" + PosX + ",top=" + PosY);

	okno.document.open();
	okno.document.clear();
	okno.document.write("<html><head><title>Wigo - Producent mieszadeł laboratoryjnych</title><STYLE>body{BACKGROUND-REPEAT:no-repeat}</STYLE></head><body BACKGROUND="+url+"></body></html>");
	okno.document.close();
	okno.focus();	
}