function get_id_num(a,b) {
	k_a = a.length;
	k_b = b.length;
	m = a.substr((k_b),(k_a-1));
	return m;
}

function move_to(a) {
	document.location.href=a;
}

function preload_images()
{
	var a = preload_images.arguments;
	var j = a.length;
	var img_new = new Array;
	for(i=0;i<j;i++)
	{
		img_new[i] = new Image;
		img_new[i].src = a[i];
	}
}

function op_win(addr,w,h)
{
	var sc_h = screen.availHeight;
	var sc_w = screen.availWidth;
	
	sc_h = parseInt((sc_h - h)/2);
	sc_w = parseInt((sc_w - w)/2);
	
	if ((navigator.userAgent.indexOf('Opera') != -1)&&(navigator.userAgent.indexOf('MSIE') != -1))
	{
		sc_h = sc_h - ((screen.availHeight - document.body.clientHeight) - 29);
	}
	
	var margins="left="+sc_w+",top="+sc_h;

	window.open(addr,"","toolbars=0,scrollbars=0,directories=0,resizable=1,status=0,width=" + w + ",height=" + h + "," + margins);
}

function label_imit(a)
{
	b = document.getElementById(a);
	if(b.checked == true)
	{
		b.checked = false;
	}
	else
	{
		b.checked = true;
	}
}

/*alert(document.getElementById('left_nav_one_point_div1').offsetHeight);*/


// Выравниваем высоту левых и правых столбцов

i = 1;
j = 0;

while(document.getElementById('left_nav_one_point_div'+i))
{
	left_div = document.getElementById('left_nav_one_point_div'+i);
	right_div = document.getElementById('right_nav_one_point_div'+i);
	
	right_div.style.height = left_div.offsetHeight - 2;
	
	if(left_div.className!="left_nav_one_point_div left_nav_active_div")
	{
		if(left_div.className=="left_nav_one_point_div")
		{
				left_div.onmouseover = function()
				{
					j = get_id_num(this.id,'left_nav_one_point_div');
					this.style.backgroundColor = "#D20000";
					document.getElementById('right_nav_one_point_div'+j).style.backgroundColor = "#D20000";
				};
				left_div.onmouseout = function()
				{
					j = get_id_num(this.id,'left_nav_one_point_div');
					this.style.backgroundColor = "#3F3F3F";
					document.getElementById('right_nav_one_point_div'+j).style.backgroundColor = "#3F3F3F";
				};
		}
		else
		{
				left_div.onmouseover = function()
				{
					j = get_id_num(this.id,'left_nav_one_point_div');
					this.style.backgroundColor = "#D20000";
					document.getElementById('right_nav_one_point_div'+j).style.backgroundColor = "#D20000";
				};
				left_div.onmouseout = function()
				{
					j = get_id_num(this.id,'left_nav_one_point_div');
					this.style.backgroundColor = "#7A7A7A";
					document.getElementById('right_nav_one_point_div'+j).style.backgroundColor = "#7A7A7A";
				};
		}
		
	}
	
	
	
	i++;
}




/*
	document.getElementById('left_nav_area' + i).onmouseover = function()
	{
		j = get_id_num(this.id,'left_nav_area');
		document.getElementById('left_nav_top_single_point_img' + j).src = "images/left_nav_corner_a.gif";
		document.getElementById('left_nav_top_single_point_td' + j).style.backgroundColor = "#336699";
	};
	document.getElementById('left_nav_area' + i).onmouseout = function()
	{
		j = get_id_num(this.id,'left_nav_area');
		document.getElementById('left_nav_top_single_point_img' + j).src = "images/left_nav_corner.gif";
		document.getElementById('left_nav_top_single_point_td' + j).style.backgroundColor = "#6699CC";
	};

*/

// JavaScript Document

startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
  }
  node.onmouseout=function() {
  this.className=this.className.replace(" over", "");
   }
   }
  }
 }
}
window.onload=startList;