licz=0;
function drukuj(nazwa,szer,wys) {
config='left=100,top=100,width='+szer+',height='+wys+',innerheight='+wys+',innerwidth='+szer+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no';
kitekSC='okno' + licz;
stadion=window.open(nazwa,kitekSC,config)
stadion.focus();
licz+=1;
};

function otworz(nazwa,szer,wys) {
config='left=100,top=100,width='+szer+',height='+wys+',innerheight='+wys+',innerwidth='+szer+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no';
kitekSC='okno' + licz;
stadion=window.open('',kitekSC,config)
stadion.document.write('<HTML><HEAD>');
stadion.document.write('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">');
stadion.document.write('<TITLE>Nieruchomosc.net</title>');
stadion.document.write('<script language="javascript">');
stadion.document.write('setTimeout(');
stadion.document.write('"self.close()');
stadion.document.write(';",70000)');stadion.document.write('</');
stadion.document.write('script>');
stadion.document.write('</HEAD>');
stadion.document.write('<body style="overflow: hidden;" leftmargin=0 topmargin=0 marginheight=0 marginwidth=0>');
stadion.document.write('<DIV align=center><a href=# onclick="javascript:self.close();"><img src='+nazwa+' border=0></A></DIV>');
stadion.document.write('</body></html>');
stadion.focus();
licz+=1;
}

//-->


//"Accept terms" form submission- By Dynamic Drive
//For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
//This credit MUST stay intact for use

var checkobj

function agreesubmit(el){
checkobj=el
if (document.all||document.getElementById){
for (i=0;i<checkobj.form.length;i++){  //hunt down submit button
var tempobj=checkobj.form.elements[i]
if(tempobj.type.toLowerCase()=="submit")
tempobj.disabled=!checkobj.checked
}
}
}

function defaultagree(el){
if (!document.all&&!document.getElementById){
if (window.checkobj&&checkobj.checked)
return true
else{
alert("Dodanie ogłoszenia wymaga akceptacji regulaminu")
return false
}
}
}

/***********************************************
* Email Validation script- C Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for legal use.
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

var emailfilter=/^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i

function checkmail(e){
var returnval=emailfilter.test(e.value)
if (returnval==false){
alert("Wprowadź poprawny adres email")
e.select()
}
return returnval
}
function checkPass(){
pass1 = document.getElementById( "pass1" ).value;
pass2 = document.getElementById( "pass2" ).value; 

if( pass1 != pass2 ){
alert( "Wprowadzone hasła nie zgadzają się!" );
return false;
}
return true;
}

function hide(idname) {
    var x = document.getElementById(idname);
    
    x.style.display = "none";
}

function show(idname) {
    var x = document.getElementById(idname);
    
    x.style.display = "block";
}

function showinline(idname) {
    var x = document.getElementById(idname);
    
    x.style.display = "inline";
}

function toggle(idname) {
    var x = document.getElementById(idname);
    
    if (x.style.display == "block")
	x.style.display = "none";
    else if (x.style.display == "none")
	x.style.display = "block";
}

function hideDivs(classname) {
    var Nodes = document.getElementsByTagName('div');
    var max = Nodes.length;
    
    for (var i = 0; i < max; i++) {
	var node = Nodes.item(i);
	if (node.className.indexOf(classname) != -1)
	    node.style.display = "none";
    }
}

function showDivs(classname) {
    var Nodes = document.getElementsByTagName('div');
    var max = Nodes.length;
    
    for (var i = 0; i < max; i++) {
	var node = Nodes.item(i);
	if (node.className.indexOf(classname) != -1)
	    node.style.display = "block";
    }
}

