function BrowserCheck() {
	var b = navigator.appName
	if (document.getElementById) this.dom = true
	else this.dom=false;
	if (b=="Netscape" || b=="Sylaba") this.b = "ns"
	else if (b=="Microsoft Internet Explorer") this.b = "ie"
	else this.b = b
	this.version = navigator.appVersion
	this.v = parseInt(this.version)
	this.ns = (this.b=="ns" && this.v>=4)
	this.ns4 = (this.b=="ns" && this.v==4)
	this.ns6 = (this.b=="ns" && this.v==5)
	this.ie = (this.b=="ie" && this.v>=4)
	this.ie4 = (this.version.indexOf('MSIE 4')>0)
	this.ie5 = (this.version.indexOf('MSIE 5')>0)
	this.min = (this.ns||this.ie)
}
is = new BrowserCheck()
function OpenWin(Adres,Nazwa,Atrybuty){ 
  Nazwa+="";
  if (!Nazwa) {Nazwa = 'Notowania';}
  if (!Atrybuty) {Atrybuty = 'width=500,height=300';}
  w=window.open(Adres,Nazwa,Atrybuty);
  w.focus();
}
function up(obj, state) {
  obj.style.backgroundColor = "#eeeeee";
}
function down(obj, state) {
  obj.style.backgroundColor = "#ffffff";
}

function up01(obj, state) {
  obj.style.backgroundColor = "#1c479d";
}
function down01(obj, state) {
  obj.style.backgroundColor = "#073266";
}

function click01(obj, state) {
  obj.style.backgroundColor = "orange";
}

function up02(obj, state) {
  obj.style.backgroundColor = "#999999";
}
function down02(obj, state) {
  obj.style.backgroundColor = "#bababa";
}
function sitesearch(f,autosubmit) {
  if(f.co.value == '1') {
    f.action='/narzedzia/znajdz/index.html' ;
  } else if(f.co.value == '3') {
    f.action='/wiadomosci/wyszukiwarka/index.html' ;
  }
  if(autosubmit) {
     f.submit() ;
  }
  return 1 ;
}
function mk_hit(site,gid) {
  var data=new Date();
  var d=document;
  var addr = '&ts=' + data.getTime() ;
  if(!site) site='n' ;
  if(d.URL) addr+='&href='+escape((d.URL).substring(0,299));
  if (d.referrer) addr+='&ref='+escape((d.referrer).substring(0,299));
  if (window.screen) {
    var s=window.screen;
    if (s.width) addr+='&screen='+s.width+'x'+s.height;
    if (s.colorDepth) addr+='&col='+s.colorDepth;
  }
  if (d.all || d.layers) addr+='&java='+navigator.javaEnabled();
  var code ;
  if(gid) {
    code = '&gid=' + gid ;
  }
  addr = 'http://hit.bankier.pl/px.gif?site=' + site + code + addr ;
  var fimg = new Image(1,1);
  fimg.src = addr ;
  return ;
}

function emcode (user,domain,str,st,subject) {
  var re = /\//g ;
  user = user.replace(re,'.') ;
  domain = domain.replace(re,'.') ;
  if(str.length < 1) {
    str = user + '&#64;' + domain ;
  }
  document.write('<a ') ;
  if(st.length > 0) {
    document.write(st + ' ') ;
  }

  if(typeof varName == 'undefined')
	subject='';	
  if(subject.length > 0) {
    subject = '?subject=' + subject ;
  }
	
  if(typeof message_body == 'undefined' )
	message_body='';
  if(message_body) {
    body = '&body=' + message_body;
  } else {
    body = '';
  }

  document.write('href="ma' + 'ilto:' + user + '&#64;' + domain + subject + body + '">' + str + '</a>') ;
}
function getURLparameter(urlparameter) {
  if(urlparameter) {
    var params = window.location.search ;
    if(params) {
      params = params.substring(1) ;
      var tablica = params.split('&') ;
      for(var i=0; i<tablica.length; i++) {
        var parametr = tablica[i].split('=') ;
        if(parametr[0] == urlparameter) {
          return parametr[1] ;
        }
      }
    }
  }
  return '' ;
}
