/*function Z(o,i){
	if (i==1) {o.style.borderBottomColor="#DF001D";} else {o.style.borderBottomColor="";};
}
*/
function Z(o){
	var el=o.getElementsByTagName("div");
	el[0].style.visibility="visible";
}
function O(o){
	var el=o.getElementsByTagName("div");
	el[0].style.visibility="hidden";

}
function GO(url){
	document.location.href=url;
}

function Browser() {
  var ua,s,i;
  this.isIE=false; this.isOP=false; this.isNS=false;
  this.version=null;
  ua = navigator.userAgent;
  s="Opera";		if ((i = ua.indexOf(s)) >= 0) {this.isOP = true;this.version=parseFloat(ua.substr(i + s.length));return;}
  s="Netscape6/";	if ((i = ua.indexOf(s)) >= 0) {this.isNS = true;this.version = parseFloat(ua.substr(i + s.length));return;}
  s="Gecko";		if ((i = ua.indexOf(s)) >= 0) {this.isNS = true;this.version = 6.1;return;}
  s="MSIE";			if ((i = ua.indexOf(s))) {this.isIE = true;this.version = parseFloat(ua.substr(i + s.length));return;}
}

var a=0;

function step2(){
	var b = new Browser;
	a+=1;
	if (a>9) {a=1;}
	var grafika=document.getElementById("grafika");
	grafika.src="img/foto"+String(a)+".jpg";
}
function skrol(){
	var kol=document.getElementById("kol");
	if (kol) {
		if (document.body.scrollTop>40) {kol.style.marginTop=document.body.scrollTop-40;} else {
			kol.style.marginTop=0;
		}
	}
}
var dfggty=window.setInterval("skrol()",100);

function start() {
}

function GO(){
	var b = new Browser;
	
	var intro=document.getElementById("naglowek_foto");
	var grafika=document.getElementById("grafika");
	if (b.isIE) {
		intro.filters[0].apply();
		intro.style.backgroundImage="url("+grafika.src+")";
		intro.filters[0].play();
	} else {
		intro.style.backgroundImage="url("+grafika.src+")";
	}

}
function S(o){
	if (o=="tab1"){return "1"};
	if (o=="tab2"){return "2"};
}
function Tb(o){
	var tabs=document.getElementById("tabs");
	tabs.style.backgroundImage="url(img/"+o.id+".gif)";
	document.getElementById("tabid").value=S(o.id);
}
function SE(t){
	var d=document.getElementById("szablon_"+t);
	var c=d.getElementsByTagName("input");
	var x;
	for(i=0;i<c.length;i++) {
		if (i==0){if (c[i].checked){x=false} else {x=true};}
		c[i].checked=x;
	}
}

function ulubione(){
	if (document.all){
		window.external.addFavorite('http://www.bakun.nieruchomosci.pl','www.bakun.nieruchomosci.pl');
	}else{
		alert('Wymagany_ie');
	}
}

function MapKlik(o,t){
	var dz=document.getElementById("ctl00_CntStrona_hidDzielnie");	
	if (o.style.color=="") {
		o.style.color="#5B7A12";
		dz.value+=","+t
	} else {
		o.style.color="";
		var b=dz.value;
		b=b.replace(","+t,"");
		dz.value=b;
		
	};	
	
}

function MapDKlik(o,t){
	var dz=document.getElementById("ctl00_CntStrona_hidDzielnie");
	dz.value=t;
	__doPostBack('ctl00$CntStrona$lbSzukaj','')
	
}


function ZaznaczChk(i,t){
	var l=document.getElementById(t);
	var c=l.getElementsByTagName("input");
	var x;
	if (i==0){x=false} else {x=true};
	for(var s=0;s<c.length;s++) {
		c[s].checked=x;
	}
}

function ZKB(o,i){
    if (i==1) {
        o.style.backgroundColor="#ECEADB";
    } else {
        o.style.backgroundColor="";
    }
}
function GoOf(i){
    document.location.href="oferta.aspx?id="+String(i);
}
