window.onresize = function ()
{
	resize();
}


$(document).ready(function()
{
	setTimeout("resize()", 100);
	
});


function resize()
{
	$('DIV#h_ruler').css('height', $('BODY').height() / 2 - $('DIV#mbox').height() / 2 - 50);
}

function open_country_menu(country)
{
	$('DIV#mbox DIV.country UL').css('display', 'none');

	$('DIV#mbox DIV.country UL.' + country).css('display', 'block');
}

//########################

function byid(id)
{
	return document.getElementById(id);
}

function officemenu_show()
{
	$('DIV#office_menu').fadeIn("slow");
}

window.officemenu_close_timer = null;

function officemenu_close_init()
{
	window.officemenu_close_timer = setTimeout("officemenu_close()", 1000);
}

function officemenu_close()
{
	$('DIV#office_menu').fadeOut("slow");
}

function officemenu_close_cancel()
{
	clearTimeout(window.officemenu_close_timer);
}

//########################

function gallery_trucks_switch()
{
	var state = $('DIV.photo_extra').css('display');

	if (state == 'none')
	{
		$('DIV.photo_extra').css('display', 'block');
	}
	else
	{
		$('DIV.photo_extra').css('display', 'none');
	}
}