
function markButton(sdr, dest_name) {
  if (sdr != null) {
    sdr.src = 'image/'+dest_name;
    return true;
  }
  return false;
}


function test1(sdr1) {
  sdr1.style.border= "1px solid #DCC29F"
}
function test2(sdr1) {

  sdr1.style.border= "1px solid #8B4724"
}

function test1ofspec(sdr1) {
    sdr1.style.backgroundColor = "#CED9EC"
  sdr1.style.cursor = 'hand'    

}
function test2ofspec(sdr1) {
  sdr1.style.backgroundColor = "#FFFFFF" 
  sdr1.style.cursor = 'hand'
}


function test3(src) {
	document.location.href=src;
}

function unable(message) {
  if (message != null && message != '') {
    alert(message);  
  } else {
    alert('Opcja dostępna w pełnej wersji.');
  }
}


function pokazoferte(adr,w,h)
{
    okno = window.open("","okno","toolbar=0,location=0,directories=0,status=1,menubar=0,resizable=1,dependent=1,hotkeys=0,scrollbars=1,titlebar=0,z-lock=1,width="+w+",height="+h+"");
    okno.resizeTo(w, h);
    okno.document.write("<HEAD><TITLE>Wczytuję dane...</TITLE></HEAD>");
    okno.document.write('<font size="2" face="Verdana"><CENTER><BIG><B>Wczytuję dane. Proszę czekać...</B></BIG></CENTER></font>');
    okno.focus();
    okno.location.href=""+adr;
};



function pokazduzezdjecia(adr, w)
{
    okno = window;
    if (w > okno.width)
    {
      okno.resizeTo(w, okno.height);
    };
    okno.document.write("<HEAD><TITLE>Wczytuję dane...</TITLE></HEAD>");
    okno.document.write('<font size="2" face="Verdana"><CENTER><BIG><B>Wczytuję dane. Proszę czekać...</B></BIG></CENTER></font>');
    okno.focus();
    okno.location.href=""+adr;
};

function pokazduzezdjecie(adr, w, h)
{
    if (w == 0)
    {
      w = screen.availWidth * 1 / 2;
    };
    if (h == 0)
    {
      h = screen.availHeight * 3 / 4;
    };
    okno = window.open("","oknoz","toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1,dependent=1,hotkeys=0,scrollbars=1,titlebar=0,z-lock=1,width="+w+",height="+h+"");
    okno.resizeTo(w,h);
    okno.document.write("<HEAD><TITLE>Wczytuję dane...</TITLE></HEAD>");
    okno.document.write('<font size="2" face="Verdana"><CENTER><BIG><B>Wczytuję dane. Proszę czekać...</B></BIG></CENTER></font>');
    okno.focus();
    okno.location.href=""+adr;
};

function RequestInfo(adr, w, h) {    
    if (w == 0) w = screen.availWidth * (2/3);
    if (h == 0) h = screen.availHeight * (1/3);
    okno = window.open("","okno","toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1,dependent=1,hotkeys=0,scrollbars=0,titlebar=0,z-lock=1,width="+w+",height="+h+",left="+(screen.availWidth - w) / 2+",top="+(screen.availHeight - h) / 2);
    okno.resizeTo(w, h + 30);
    okno.document.write("<HEAD><TITLE>Wczytuję serwis...</TITLE></HEAD>");
    okno.document.write('<font size="2" face="Verdana"><CENTER><BIG><B>Wczytuję serwis. Proszę czekać...</B></BIG></CENTER></font>');
    okno.focus();
    okno.location.href=""+adr;
};


function RequestInfoScroll(adr, w, h) {    
    if (w == 0) w = screen.availWidth * (2/3);
    if (h == 0) h = screen.availHeight * (1/3);
    okno = window.open("","okno","toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1,dependent=1,hotkeys=0,scrollbars=1,titlebar=0,z-lock=1,width="+w+",height="+h+",left="+(screen.availWidth - w) / 2+",top="+(screen.availHeight - h) / 2);
    okno.resizeTo(w, h + 30);
    okno.document.write("<HEAD><TITLE>Wczytuję serwis...</TITLE></HEAD>");
    okno.document.write('<font size="2" face="Verdana"><CENTER><BIG><B>Wczytuję serwis. Proszę czekać...</B></BIG></CENTER></font>');
    okno.focus();
    okno.location.href=""+adr;
};

function wyslijZnajomym(nr_oferty) {    
  RequestInfo('/?d=woz&oferta='+nr_oferty,350, 260);
};

function polecZnajomym() {    
  RequestInfo('/?d=polec_nas',350, 260);
};

function kalkulatorOferta(cena) {    
  RequestInfoScroll('/?d=kal&cena='+cena, 580, 560);
};

function kontaktAgent(nr_oferty) {
  RequestInfo('/?d=kontakt_z_agentem&oferta='+nr_oferty, 330, 380);
};

function zachowajOferte(nr_oferty) {    
  RequestInfo('zachowaj_oferte.html?oferta='+nr_oferty, 330, 180);
}

function autopow() {    
  RequestInfoScroll('/?d=autopow', 500, 450);
}

function zglos() {    
  RequestInfoScroll('/?d=zglos', 500, 450);
}

function czytajWiad(nr_oferty) {    
  RequestInfo('czytaj_wiadomosc.html', 420, 400);
}

function system_message(nr_oferty) {    
  RequestInfo('system_message.html', 420, 400);
}

function sent_message(nr_oferty) {    
  RequestInfo('sent_message.html', 420, 400);
}

function got_message(nr_oferty) {    
  RequestInfo('got_message.html', 420, 400);
}
function sp_moje_dokumenty_dodawanie() {    
  RequestInfo('/?d=mdpf', 450, 100);
}
function show_details(src) {    
  //RequestInfoScroll('/?d=v&nrof='+src, 700, 450);
	document.location.href='/?d=v&nrof='+src;  
}


function show_kalk(src) {    
	RequestInfoScroll('/?d=kal&cena='+src, 700, 450);
}


function show_ofspec_details(src,tab,ofspec) {    
  document.location.href='/?d=v&tab='+tab+'&nrof='+src+'&ofspec='+ofspec;  
}

function show_m_details(src,tab) {    
  document.location.href='/?d=v&tab='+tab+'&nrof='+src;  
}

function show_druk(src) {    
  RequestInfoScroll('/?d=d&nrof='+src, 700, 450);
}

function wydrukOferta(src) {
  RequestInfoScroll(src, screen.availWidth, screen.availHeight);
}

function checkPhoto()
{
	if(document.form1.File.value=='')
	{
		return false;
	};
	
};

function or1(lok,nam)
{

    var l=0;
    var t=0;
    var w=screen.availWidth-8;
    var h=screen.availHeight-8;
    var nowe1 = open( lok,nam,"toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1,dependent=1,hotkeys=0,scrollbars=1,titlebar=0,z-lock=0,left="+l+",top="+t+",width="+w+",height="+h);	
    
};

function MChange( dest )
{
		id = document.getElementById ( dest );
		if (id.style.visibility=='visible'){
		  id.style.visibility='hidden';
		} else {
		  id.style.visibility='visible';
		};

};

function MShow( dest )
{
		id = document.getElementById ( dest );
	  	id.style.visibility='visible';
};

function MHide( dest1 )
{
		id1 = document.getElementById ( dest1 );
		id1.style.visibility='hidden';
};