
//window.OnError=null;
var hloaded = 0; 
var images_list = new Array;
var images_count = 8;
var images_path = 'img/';

function HLoadImgs()
{
	if (document.images && (navigator.appVersion.substring(0,1) >= 3))
	{
		for (i=1; i<=20; i++)
		{
			images_list[i] = new Array;

			images_list[i][0] = new Image();
			images_list[i][0].src = images_path + "menu_" + i + "_0.gif"

			images_list[i][1] = new Image();
			images_list[i][1].src = images_path + "menu_" + i + "_1.gif"

		}

		hloaded = 1;   
    }
}



function menu_on(element, index)
{
	if (hloaded == 1)
	{
		element.src = images_list[index][1].src;
	}
}

function menu_off(element, index)
{
	if (hloaded == 1)
	{
		element.src = images_list[index][0].src;
	}
}


function popup(imgname, name, x, y)
{
	handler = window.open("/"+imgname, name, 'scrollbars=1,statusbar=0,resizable=0,width='+(x+20)+',height='+(y-100)+', left=10, top=10');
	handler.document.write('<title>Одесский МЖК </title>');
	handler.document.write('<style>HTML, BODY {padding: 0px; margin: 0px;}</style>');
	handler.document.write('<body bgcolor="white" >');
	handler.document.write('<center><img src="/img/'+imgname+'" onclick="window.close()"></center>');
	handler.focus();
	return false;
}

