function goURL(url)
{
	location.href = url;
	return false;
}

function preload(picture)
{
	var img = new Image();
	img.src = picture;
}

function newWindow(url, width, height, windowName, scrollBars, menuBar)
{
	if (!menuBar) menuBar = 0;
	var myPos = (screen) ? ',left=' + parseInt((screen.width-width)/2) + ',top=' + parseInt((screen.height-height)/2) : '';
	var myWin = window.open(url, (windowName) ? windowName : 'popWin', 'width=' + width + ',height=' + height + ',menubar=' + menuBar + ',location=0,resizable=1,scrollbars=' + ((scrollBars) ? scrollBars : '0') + ',toolbar=0' + myPos);
	try {
		myWin.focus();
	} catch(e) {
		// Иногда фокус не срабатывает и вываливается ошибка - игнорируем ее.
	}
	return myWin;
}

function photogallery(url, width, height)
{
	try {
		wnd = window.open(url, "", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width="+width+",height="+height);
		wnd.focus();
	} 
	catch (e) {
	}
}

function showPropertyPicture(image)
{
	document.images['propertyLargePhoto'].src = image;
	return false;
}

