var nazwa; 
var ekran; 
var ekranH; 
var wersja; 
var msie; 
var nn; 
var inna; 
var screenW = 0, screenH = 0; 

if(typeof(window.innerWidth) == 'number') { 
	//Non-IE 
	screenW = window.innerWidth;
	screenH = window.innerHeight; 

}else if( document.documentElement &&
	     (document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { 
	//IE 6+ in 'standards compliant mode'; 
	screenW = document.documentElement.clientWidth; 
	screenH = document.documentElement.clientHeight; 

} else if( document.body &&
          (document.body.clientWidth || document.body.clientHeight ) ) { 
	//IE 4 compatible 
	screenW = document.body.clientWidth; 
	screenH = document.body.clientHeight; 
} 

String.prototype.trim = function() { 
	return this.replace(/^\s+|\s+$/g,''); 
} 

function getInfoBrows(){ 
	nazwa = navigator.appName; 
	ekran = (typeof(screen)=="object") ? screen.width : null; 
	ekranH = (typeof(screen)=="object") ? screen.height : null; 
	wersja = parseFloat(navigator.appVersion); 
	msie = nazwa == "Microsoft Internet Explorer"; 
	nn = nazwa == "Netscape"; 
	inna = !(msie || nn); 
	
	if(msie) { 
		// Jesli to MSIE, to wersja zostala zle rozpoznana. 
		var ws = navigator.appVersion; 
		wersja = parseFloat(ws.substring((ws.indexOf("MSIE") + 5 ),ws.length)); 
	}
} 

function _nazwa() { 
	return nazwa; 
} 

function browsEkran(){ 
	return ekran; 
} 

function browsEkranH(){
	return ekranH; 
} 

function browsWersja(){ 
	return wersja; 
} 

function browsMsie(){ 
	return msie; 
}

function browsNN(){ 
	return nn; 
} 

function opencenterwindow23(url, winname){ 
	var iHMarg = 148; 
	var w = (screen.width /3)*2; 
	var h = (screen.height /3)*2; 
	var left = (screen.width / 2) -(w/2); 
	var top = (screen.height / 2) -(h/2); 
	window.open(url, winname, 'toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=yes,fullscreen=no,channelmode=no,width='+w+',height='+h+',top='+top+',left='+left);
} 

function CheckStrForPolChars(strVal) { 
	source = new Array('','','','','','','','','','','','','','','','','',''); 
	
	for(i=0;i<18;i++){
		if(strVal.indexOf(source[i]) >= 0 ) 
			return false; 
	} 
	
	return true; 
} 

function checkField(tekst){
	if(tekst==null || tekst=='' || tekst.trim()==''){ 
		return false; 
	}else{ 
		return true; 
	} 
} 

//funkcje bannera 

//**************************************** 
var y1=20; 
//wysokosc od gory strony
(document.getElementById) ? dom = true : dom = false; 

function hideIt() { 
	if(dom){
		document.getElementById("layer1").style.visibility='hidden';
	} 
} 

function showIt() { 
	if(dom){
		document.getElementById("layer1").style.visibility='visible';
	} 
} 

function placeIt() { 
	if(dom && !document.all) { 
		document.getElementById("layer1").style.top = window.pageYOffset + (window.innerHeight -(window.innerHeight-y1)) + "px"; 
		document.getElementById("layer1").style.left = (screenW/2 - 210) + "px"; 
	} 
	if(document.all) { 
		document.all["layer1"].style.top = document.documentElement.scrollTop +
			                              (document.documentElement.clientHeight-(document.documentElement.clientHeight-y1)) + "px"; 
		document.all["layer1"].style.left = (screenW/2 - 210) + "px"; 
	} 
	window.setTimeout("placeIt()", 3); 
} 
//****************************************
