function pokaz_opcje(id)
{$(document).find('.ukryty').each(function(){$(this).hide()});$('#wybierz_opcje_powierzchnia').removeClass('opcja_on');$('#wybierz_opcje_typ').removeClass('opcja_on');$('#wybierz_opcje_cena').removeClass('opcja_on');$('#wybierz_opcje_wojewodztwo').removeClass('opcja_on');$("#opcje_"+id).slideDown(function(){$("#zamknij").val('1');});};function wstaw_wartosc(wartosc,wartosc1,id)
{$('#wybierz_opcje_'+id).addClass('opcja_on');$("#wybierz_opcje_"+id).removeClass('pole_rejestracja_wybierz_error');$("#error_opcje_wstaw").remove();$("#opcje_value_"+id).val(wartosc);$("#wybierz_opcje_"+id).html(wartosc);$("#opcje_"+id).hide();$("#hidden_"+id).val(wartosc1);};function hover_opcje(id)
{$('#'+id).addClass('opcja_on');}
function remove_hover_opcje(id)
{$('#'+id).removeClass('opcja_on');}
function zamknij(id)
{$(document).find('.ukryty').each(function(){$(this).hide()});}
function wyszukaj(limit)
{zmien_dane('',300,0,0);$.ajax({type:"POST",url:'include/szukaj_oferta.php',data:'link='+new Date().getTime()+'&akcja='+$("#akcja").val()+'&akcja1='+$("#akcja1").val()+'&miasto='+$("#miasto").val()+'&wojewodztwo='+$("#hidden_wojewodztwo").val()+'&typ='+$('#hidden_typ').val()+'&powierzchnia='+$('#hidden_powierzchnia').val()+'&cena='+$('#hidden_cena').val()+'&rynek='+$('input[name="rynek"]:checked').val()+'&limit='+limit,success:wybrano});function wybrano(responseText,statusText)
{response=responseText;$("#wynik").html(response)
$('#panel').remove();}}
function stat()
{$.ajax({type:"POST",url:'include/stat.php',success:wybrano});function wybrano(responseText,statusText)
{response=responseText;$("#wynik").html(response)
$('#panel').remove();}}
function wyszukaj1(limit)
{zmien_dane('',300,0,0);$.ajax({type:"POST",url:'include/szukaj_oferta_przetargi.php',data:'link='+new Date().getTime()+'&akcja='+$("#akcja").val()+'&akcja1='+$("#akcja1").val()+'&miasto='+$("#miasto").val()+'&wojewodztwo='+$("#hidden_wojewodztwo").val()+'&typ='+$('#hidden_typ').val()+'&powierzchnia='+$('#hidden_powierzchnia').val()+'&cena='+$('#hidden_cena').val()+'&rynek='+$('input[name="rynek"]:checked').val()+'&limit='+limit,success:wybrano});function wybrano(responseText,statusText)
{response=responseText;$("#wynik").html(response)
$('#panel').remove();}}
function wyszukaj_goraca(limit,akcja)
{zmien_dane('',300,0,0);$.ajax({type:"POST",url:'include/szukaj_oferta_goraca.php',data:'link='+new Date().getTime()+'&akcja='+akcja+'&miasto='+$("#miasto").val()+'&wojewodztwo='+$("#hidden_wojewodztwo").val()+'&typ='+$('#hidden_typ').val()+'&powierzchnia='+$('#hidden_powierzchnia').val()+'&cena='+$('#hidden_cena').val()+'&rynek='+$('input[name="rynek"]:checked').val()+'&limit='+limit,success:wybrano});function wybrano(responseText,statusText)
{response=responseText;$("#wynik").html(response)
$('#panel').remove();}}
function zobacz_pelny(id,limit,akcja)
{zmien_dane('',300,0,0);$.ajax({type:"POST",url:'include/zobacz_pelny.php',data:'link='+new Date().getTime()+'&id='+id+'&limit='+limit+'&akcja='+akcja,success:wybrano1});function wybrano1(responseText,statusText)
{response=responseText;$("#wynik").html(response)
$('#panel').remove();}}
function zobacz_pelny1(id,limit,akcja)
{zmien_dane('',300,0,0);$.ajax({type:"POST",url:'include/zobacz_pelny_przetarg.php',data:'link='+new Date().getTime()+'&id='+id+'&limit='+limit+'&akcja='+akcja,success:wybrano1});function wybrano1(responseText,statusText)
{response=responseText;$("#wynik").html(response)
$('#panel').remove();}}
function zobacz_pelny_goraca(id,limit,akcja)
{zmien_dane('',300,0,0);$.ajax({type:"POST",url:'include/zobacz_pelny_goraca.php',data:'link='+new Date().getTime()+'&id='+id+'&akcja='+akcja+'&limit='+limit,success:wybrano1});function wybrano1(responseText,statusText)
{response=responseText;$("#wynik").html(response)
$('#panel').remove();}}
function zobacz_pelny_przetarg_goraca(id,limit,akcja)
{zmien_dane('',300,0,0);$.ajax({type:"POST",url:'include/zobacz_pelny_przetarg_goraca.php',data:'link='+new Date().getTime()+'&id='+id+'&akcja='+akcja+'&limit='+limit,success:wybrano1});function wybrano1(responseText,statusText)
{response=responseText;$("#wynik").html(response)
$('#panel').remove();}}
function zmien_dane(plik,szerokosc,wysokosc,pole,id)
{slow=400;$('#container').after('  <div id="panel" style="display:none"></div>');$('#panel').show();var element='<div id="c1" class="admin" style="height:'+sprawdz_wysokosc(wysokosc,'0')+'px;" ></div><div id="c11"  class="overlay" style="height:'+(sprawdz_wysokosc(wysokosc,'0')-100)+'px; " > </div> ';$('#panel').html(element);$('#c1').show();$('#c1').fadeTo(0,0.5);$('#c11').show();};function sprawdz_wysokosc(y,zmienna)
{var xScroll,yScroll;if(window.innerHeight&&window.scrollMaxY){xScroll=window.innerWidth+window.scrollMaxX;yScroll=window.innerHeight+window.scrollMaxY;}else if(document.body.scrollHeight>document.body.offsetHeight){xScroll=document.body.scrollWidth;yScroll=document.body.scrollHeight;}else{xScroll=document.body.offsetWidth;yScroll=document.body.offsetHeight;}
var windowWidth,windowHeight;if(self.innerHeight){if(document.documentElement.clientWidth){windowWidth=document.documentElement.clientWidth;}else{windowWidth=self.innerWidth;}
windowHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight;}else if(document.body){windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight;}
if(yScroll<windowHeight){pageHeight=windowHeight;}else{pageHeight=yScroll;}
if(xScroll<windowWidth){pageWidth=xScroll;}else{pageWidth=windowWidth;}
h=pageHeight;w=pageWidth;var left=(w-y)/2;var top=(document.documentElement.scrollTop+100);newArray=new Array(h,w,left,top);if(zmienna==0)
{return newArray[0];}
else if(zmienna==1)
{return newArray[1];}
else if(zmienna==2)
{return newArray[2];}
else
{return newArray[3];}};function zobacz_obrazek(id,szerokosc,wysokosc)
{$('#duzy').html('<div style="width:'+szerokosc+'px;  height:'+wysokosc+'px; border:0px solid black; ">&nbsp;</div>');$.ajax({type:"POST",url:'include/zobacz_obrazek.php',data:'link='+new Date().getTime()+'&id='+id,success:wybrano1});function wybrano1(responseText,statusText)
{response=responseText;$("#wstawiony_obrazek").html(response);$("#moj_obrazek").fadeIn('slow')}}
function wyszukaj_goraca_przetarg(limit,akcja)
{zmien_dane('',300,0,0);$.ajax({type:"POST",url:'include/szukaj_oferta_goraca_przetargi.php',data:'link='+new Date().getTime()+'&akcja='+akcja+'&miasto='+$("#miasto").val()+'&wojewodztwo='+$("#hidden_wojewodztwo").val()+'&typ='+$('#hidden_typ').val()+'&powierzchnia='+$('#hidden_powierzchnia').val()+'&cena='+$('#hidden_cena').val()+'&rynek='+$('input[name="rynek"]:checked').val()+'&limit='+limit,success:wybrano});function wybrano(responseText,statusText)
{response=responseText;$("#wynik").html(response)
$('#panel').remove();}}
