function browserVersion() {
	var agt = navigator.userAgent.toLowerCase();

	this.major = parseInt(navigator.appVersion);
	this.minor = parseFloat(navigator.appVersion);

	this.nav    = ((agt.indexOf('mozilla')!=-1) && ((agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1)));
	this.nav4up = this.nav && (this.major == 4);
	this.nav6 	= this.nav && (this.major >= 5);

	this.navonly = (this.nav && (agt.indexOf(";nav") != -1));

	this.ie     = (agt.indexOf("msie") != -1);
	this.ie4up  = this.ie  && (this.major >= 4);
	this.ie5up  = this.ie && (navigator.appVersion.indexOf('compatible; MSIE 5.0') != -1)

	this.opera = (agt.indexOf("opera") != -1);

	this.ver4up = (this.ie4up || this.nav4up );
}
var browserVersion = new browserVersion();


function openNonscrolledWindow(theURL,winName,myWidth, myHeight, isCenter) { 
  if(window.screen)
	if(isCenter)
		if(isCenter=="true")
		{	var myLeft = (screen.width-myWidth)/2;
    			var myTop = (screen.height-myHeight)/2;
		window.open(theURL,winName,'location=0,directories=0,scrollbars=no,toolbar=0,menubar=0,resizable=0,status=0,width='+myWidth+',height='+myHeight+',left=' + myLeft+ ',top=' + myTop)
  }																		  
}

function openscrolledWindow(theURL,winName,myWidth, myHeight, isCenter) { 
  if(window.screen)
	if(isCenter)
		if(isCenter=="true")
		{	var myLeft = (screen.width-myWidth)/2;
    			var myTop = (screen.height-myHeight)/2;
		window.open(theURL,winName,'location=0,directories=0,scrollbars=yes,toolbar=0,menubar=0,resizable=0,status=0,width='+myWidth+',height='+myHeight+',left=' + myLeft+ ',top=' + myTop)
  }																		  
}

function button(id, stan){
	var button_1 = id + '_l';
	var button_c = id + '_c';
	var button_r = id + '_r';
	var obr_kw = id + '_kw';
	var obr_tr = id + '_tr';
	
	document.getElementById(button_1).className=(document.getElementById(button_1).className=='menu_on')?'menu_off' : 'menu_on';  
	document.getElementById(button_c).className=(document.getElementById(button_c).className=='menu_on')?'menu_off' : 'menu_on';  
	document.getElementById(button_r).className=(document.getElementById(button_r).className=='menu_on')?'menu_off' : 'menu_on';  

	document.images[obr_kw].src = (stan == 1)? 'images/kw_over.gif' : 'images/kw_normal.gif';
	document.images[obr_tr].src = (stan == 1)? 'images/tr_over.gif' : 'images/tr_norm.gif';
	
}

function bookmarkit(){
	if (document.all){	
		window.external.addFavorite('http://www.krok.org.pl','KROK.org.pl');
	}

}