//<!--
// Everything you always wanted to know about your JavaScript client
// but were afraid to ask. Creates "is_" variables indicating:
// (1) browser vendor:
//     is_nav, is_ie, is_opera, is_hotjava, is_webtv, is_TVNavigator, is_AOLTV

// convert all characters to lowercase to simplify testing
var agt = navigator.userAgent.toLowerCase();

// Note: Opera and WebTV spoof Navigator. We do strict client detection.
// If you want to allow spoofing, take out the tests for opera and webtv.
var is_nav = ((agt.indexOf('mozilla') != -1) && (agt.indexOf('spoofer') == -1)
		&& (agt.indexOf('compatible') == -1) && (agt.indexOf('opera') == -1)
		&& (agt.indexOf('webtv') == -1) && (agt.indexOf('hotjava') == -1));

// zmiana stylu dla przycisku
function zmien_styl(styl, przycisk) {
	if (is_nav || window.event.srcElement == przycisk) {
		przycisk.className = styl;
	}
}

function doOknaPomocy(sciezka, nazwa, wysokosc, szerokosc, aFeatures,
		openerName) {
	if (wysokosc == "*") {
		wysokosc = (screen.availHeight / 2)
	}
	;
	if (szerokosc == "*") {
		szerokosc = (screen.availWidth / 2)
	}
	;
	var newFeatures = "height=" + wysokosc + ",innerHeight=" + wysokosc;
	newFeatures += ",width=" + szerokosc + ",innerWidth=" + szerokosc;
	if (window.screen) {
		var ah = (screen.availHeight - 30);
		var aw = (screen.availWidth - 10);
		var xc = ((aw - szerokosc) / 2);
		var yc = ((ah - wysokosc) / 2);
		newFeatures += ",left=" + xc + ",screenX=" + xc;
		newFeatures += ",top=" + yc + ",screenY=" + yc;
		newFeatures += "," + aFeatures
	}
	;
	// alert(sciezka);
	var oknoPomocy = otworzOkno(sciezka, nazwa, newFeatures, openerName);
	oknoPomocy.focus();
	return oknoPomocy;
}

function otworzOkno(sciezka, nazwa, features, openerName) {
	var oknoPomocy = window.open(sciezka, nazwa, features);
	if (oknoPomocy.opener == null)
		oknoPomocy.opener = window;
	oknoPomocy.opener.name = openerName;
	return oknoPomocy;
}
//--> end hide JavaScript


