function openFavorite()
{
	$('#main-bottom').css('top', '754px');
	$('#placeholder').css('height', '906px');	
}

$(document).ready(function() {
	$('#otpluszegyerv').dialog({
		bgiframe: true,
		modal: true,
		draggable: false,
		resizable: false,
		width: 594,
		height: 486,
	});
	$('.ui-dialog').css('position','absolute');
	$('div.ui-dialog').css('top', '80px').removeClass('ui-corner-all');
	$('div.ui-dialog-titlebar').removeClass('ui-corner-all');
	$('.ui-icon-closethick').replaceWith('<img src="/images/spacer.gif" height="60" width="60" alt=""/>');
	$('#otpluszegyerv').css('overflow','hidden');
});
var bridge = null;
var image = null;
function flatList_mouseOver(obj, rownum, idNode, number)
{
	obj.style.backgroundPosition = '0 -23px';
	if (null == bridge)
	{
		bridge = document.getElementById('bridge');
		image = document.getElementById('flat-preview-image');
	}
	if (0 == rownum)
	{
		bridge.style.backgroundPosition = '0 0';
	}
	else
	{
		bridge.style.backgroundPosition = '0 -'+(rownum*23)+'px';
	}
	image.src = '/upload/flat/image-thumbnail/'+number+'.jpg';
	bridge.style.top = (417+rownum*25)+'px';
	bridge.style.display = 'block';
	image.style.display = 'inline';
}
function flatList_mouseOut(obj, reserved)
{
	/*if (null != reserved)
	{
		obj.style.backgroundColor = '#e7782f';
		obj.style.backgroundPosition = '0 -46px';
	}*/
/*	else
	{*/
		obj.style.backgroundPosition = '0 0';
	/*}*/
	if (null == bridge)
	{
		bridge = document.getElementById('bridge');
		image = document.getElementById('flat-preview-image');
	}
	bridge.style.display = 'none';
	image.style.display = 'none';
}
function flatList_mouseClick(obj, idNode)
{
	OpenPage('/flat/infosheet/'+idNode, 'infosheet_'+idNode, 611, 600, true, true, false);
}


function flatList_printPopup(obj, idNode)
{
	/*link = '/flat/infosheet/'+idNode;
	var pw = window.open(link, 'infosheet_'+idNode);*/
	var pw = OpenPage('/flat/infosheet/'+idNode, 'print', 611, 600, true, true, false);
	/*pw.document.open();
	pw.document.close();*/
}// uj popup ablak nyitasa
function OpenPage(url, wndname, width, height, center, scrollbars, resize)
{ 
	var left = 25; 
	var top = 25; 

	if(center == true) 
	{ 
		left = (screen.width - width)/2; 
		top = (screen.height - height)/2; 
	} 

	scrollbars = ( (scrollbars == undefined) || (scrollbars == false) ) ? 0 : 1;
	resize = ( (resize == undefined) || (resize == false) ) ? 0 : 1;

	var winStats='toolbar=no,location=no,directories=no,menubar=0,'; 
	winStats+='scrollbars='+scrollbars+',resizable='+resize+',width='+width+',height='+height; 
	if (navigator.appName.indexOf("Microsoft")>=0) 
	{ 
		winStats+=',left='+left+',top='+top; 
	} 
	else 
	{ 
		winStats+=',screenX='+left+',screenY='+top; 
	} 

	var apopup=window.open(url,wndname,winStats); return apopup;/*
	apopup.window.focus(apopup);
	return apopup;*/
}
