function Start()
{
//Функция выполняющая действия сразу после загрузки страницы

    //Определяем тип броузера

    isDOM=document.getElementById //DOM1 browser (MSIE 5+, Netscape 6, Opera 5+)
    isMSIE=document.all && document.all.item //Microsoft Internet Explorer 4+
    isMSIE5=isDOM && isMSIE //MSIE 5+
    isOpera=isOpera5=window.opera && isDOM //Opera 5+
    isOpera6=isOpera && window.print //Opera 6+
    isOpera7=isOpera && navigator.userAgent.indexOf("Opera 7") > 0 || navigator.userAgent.indexOf("Opera/7") >= 0 //Opera 7
    isNetscape4=document.layers //Netscape 4.*
    isMozilla=isNetscape6=isDOM && (navigator.appName=="Netscape") //Mozilla или Netscape 6.*
    isMozilla5=true && (navigator.appName=="Netscape") && (navigator.appVersion=="5.0 (Windows; ru)") //Mozilla 5


//Формируем префикс и суффикс строки доступа к контейнерам в зависимости от объектной модели броузера

    if(document.all)
    {
        TypeObject = 'document.all["';
        EndObject = '"]';
        StyleObject = '"].style';
    }
    if(document.layers)
    {
        TypeObject = 'document.layers["';
        EndObject = '"]';
        StyleObject = '"]';
    }
    if(document.getElementById)
    {
        TypeObject = 'document.getElementById("';
        EndObject = '")';
        StyleObject = '").style';
    }

	//Включаем отслеживание ресайзинга окна
	resize_pos();
	window.onresize=resize_pos;


    imgPath='img/';
    top_otstup = 145;
	reportError = "";

    m_selected = new Array();
    m_selected["mMenu"] = new Array("", "mMenu_select", "");
    m_selected["fMenu"] = new Array("", "fMenu_select", "");
    m_selected["rMenu"] = new Array("", "rMenu_select", "");
    m_selected["mContent_year"] = new Array("", "mContent_year_select", "");
	m_selected["mContent_n_page"] = new Array("", "mContent_n_page_select", "");
	m_selected["mContent_p_list"] = new Array("", "mContent_year_select", "");

    //Вызываем функцию исполнения для конкретной страницы
    Init();

}


function openIdImg(id)
{
//Раскрытие\скрытие объекта + изменение картинки
    var id, str;

    str=TypeObject + id + '_cont' + StyleObject + '.display';
    if ( eval(str) == "none")
    {
        eval(str+'=""');
        eval('document.images["'+id+'"].src="'+imgPath+'diropen.gif"')
    }
    else
    {
        eval(str+'="none"');
        eval('document.images["'+id+'"].src="'+imgPath+'dirhide.gif"')
    }
}


function openId(id)
{
//Раскрытие\скрытие объекта на странице
    var id, str, mstr;

    if (id.indexOf("_cont") == -1)
    { id = id + "_cont"; }

    str=TypeObject + id + StyleObject + '.display';
    if (eval(str) == "none")
    { eval(str+'=""');}
    else
    { eval(str+'="none"'); }
}


function openDiv(id)
{
//Раскрытие контейнера div на странице
    var id;
    if (id.indexOf("_cont") == -1)
    { id = id + "_cont"; }
	eval(TypeObject + id + StyleObject + '.display=""');
}

function closeDiv(id)
{
//Скрытие контейнера div на странице
    var id;
    if (id.indexOf("_cont") == -1)
    { id = id + "_cont"; }
	eval(TypeObject + id + StyleObject + '.display="none"');
}


function CloseId(id)
{
//Раскрытие
    var id, str, mstr;

    if (id.indexOf("_cont") == -1)
    { id = id + "_cont"; }

	//alert(mousex+" "+mousey);
	y1 = eval(TypeObject + id + EndObject + '.offsetTop');
	y2 = eval(TypeObject + id + StyleObject + '.height');
	y2 = y2.substring(0, y2.indexOf("px"))*1+y1*1;
	//alert(y1+" - "+y2);

	x1 = eval(TypeObject + id + EndObject + '.offsetLeft');
	x2 = eval(TypeObject + id + StyleObject + '.width');
	x2 = x2.substring(0, x2.indexOf("px"))*1+x1*1;
	//alert(x1+" - "+x2);


	//alert(mousex+" "+x2+" "+x1+" : "+mousey+" "+y2+" "+y1);
	if(mousex > x2 || mousex < x1 || mousey > y2 || mousey < y1)
	{
	    str=TypeObject + id + StyleObject + '.display = "none"';
		eval(str);
	}
}

function opera_otstup()
{
	if ( isOpera || isOpera5 || isOpera6 || isOpera7 )
	{
		//alert( isOpera + isOpera5 + isOpera6 + isOpera7 );
		eval('m_obj=' + TypeObject + 'opera_otstup' + EndObject);
		m_obj.innerHTML = '<img src="/img/zero.gif" width="100%" height="175">';
	}
}