function hirView(u, w, h, t)
{
	if (!t) t = "Ingatlancentrum Szentendre";
	var x = (screen.availWidth-w)/2;
	var y = (screen.availHeight-h)/2;
	picwin = window.open("","picwin","width="+w+",height="+h+",left="+x+",top="+y);
	picwin.document.open();
	picwin.document.writeln('<html><title>'+t+'</title><body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">');
	picwin.document.writeln('<table width="100%" height="100%"cellpadding="0" cellspacing="0" border="0">');
	picwin.document.writeln('	<tr>');
	picwin.document.writeln('		<td background="'+u+'">');
	picwin.document.writeln('			&nbsp;');
	picwin.document.writeln('		</td>');
	picwin.document.writeln('	</tr>');
	picwin.document.writeln('</table>');
	picwin.document.writeln('</body></html>');
	picwin.document.close();
	picwin.focus();
}
function picView(id)
{
	t = "Ingatlancentrum Szentendre";
	var x = (screen.availWidth-760)/2;
	var y = (screen.availHeight-490)/2;
	picwin = window.open("kepnezo.php?id="+id,"picwin","width=760,height=490,left="+x+",top="+y);
	picwin.focus();
}

function partnerView(id)
{
	var w = 360;
	var h = 320;
	t = "Ingatlancentrum Szentendre";
	var x = (screen.availWidth-w)/2;
	var y = (screen.availHeight-h)/2;
	partnerwin = window.open("partner_nezo.php?id="+id,"picwin","width="+w+",height="+h+",left="+x+",top="+y);
	partnerwin.focus();
}

function listarol_levesz(id, sajat_listan)
{
	var expire = new Date();
	expire.setTime(expire.getTime()- 1);
	document.cookie = "ingatlancentrum_sajat_lista[" + id + "]=false; expires=" + expire.toGMTString();
	if (typeof(document.getElementById) != 'undefined')
	{
		if (sajat_listan)
		{
			var ingatlan = document.getElementById('ingatlan' + id);
			ingatlan.style.display = 'none';
		}
		else
		{
			var o = document.getElementById('levesz' + id);
			o.style.display = 'none';
			o = document.getElementById('felvesz' + id);
			o.style.display = 'block';
		}
	}
	szamlalo_beallitas();
}

function listara_felvesz(id, val)
{
	var ev = new Date().getFullYear();
	var expire = new Date(ev + 1, '12', '31').toGMTString();
	document.cookie = "ingatlancentrum_sajat_lista[" + id + "]='" + val + "'; expires=" + expire;
	if (typeof(document.getElementById) != 'undefined')
	{
		var o = document.getElementById('felvesz' + id);
		o.style.display = 'none';
		o = document.getElementById('levesz' + id);
		o.style.display = 'block';
	}
	szamlalo_beallitas();
}

function szamlalo_beallitas()
{
	if (typeof(document.getElementById) != 'undefined')
	{
		var re = /ingatlancentrum_sajat_lista\[\d+\]/gi;
		var res = document.cookie.match(re);
		var szamlalo = document.getElementById('szamlalo');
		szamlalo.innerHTML = (res) ? res.length : 0;
	}
}

