addWindowOnload (function()
{
	images = new Array (
						'./html/imgs/menu.png',
						'./html/imgs/menu-a.png',
						'./html/imgs/menu-h.png'
						);
	preloadImages (images);
});

addWindowOnload (function ()
{
	as = $('menu-bar'). getElementsByTagName ('a');
	for (var i = 0; i < as. length; i ++)
	{
		if (as[i]. className. match (/.*menu.*/i))
		{
			as[i]. onmouseover = function ()
			{
				div = getParent (this, 'div');
				div. className = div. className. replace (/(.*)menu(.*)/i, '$1menu h$2');
			}
			as[i]. onmouseout = function ()
			{
				div = getParent (this, 'div');
				div. className = div. className. replace (/(.*)menu(.*)\ h(.*)/i, '$1menu$2$3');
			}
		}
	}
});

addWindowOnload (function()
{
	height = winHeight ();
	cheight = $('menu'). offsetHeight;
	if (height > (cheight + 256))
	{
		height -= 256;
		$('brdr-rght'). style. height = height + 'px';
	}
});

addWindowOnload (function ()
{
	var emails = new Array ('manager', 'marketing');
	var domains = new Array ('zweb.com.ua', 'zweb.com.ua');
	if ($('emails') != null && $('emails') != 'null')
	{
		$('emails'). innerHTML = '';
		for (var i = 0; i < emails. length; i++)
		{
			var em = emails[i] + '@' + domains[i];
			var email = document. createElement ('a');
			email. setAttribute ('href', 'mailto:' + em);
			email. innerHTML = em;
			var li = document. createElement ('li');
			li. appendChild (email);
				$('emails'). appendChild (li);
		}
	}
});

addWindowOnload (function ()
{
	var emails = new Array ('get-domain');
	var domains = new Array ('zhost.com.ua');
	if ($('emails2') != null && $('emails2') != 'null')
	{
		$('emails2'). innerHTML = '';
		for (var i = 0; i < emails. length; i++)
		{
			var em = emails[i] + '@' + domains[i];
			var email = document. createElement ('a');
			email. setAttribute ('href', 'mailto:' + em);
			email. innerHTML = em;
			var li = document. createElement ('li');
			li. appendChild (email);
				$('emails2'). appendChild (li);
		}
	}
});

var request=new Ajax ();
function ajaxReq (form)
{
	ready_form=request.prepareForm(form);
	return request.newRequest(form.getAttribute('action'),ready_form,ajaxResp,'POST');
}

function ajaxResp (response)
{
	$('answer__').innerHTML=response;
}