function pics(img,ref)
{
	document.images[img].src = ref;
}

function openwin(img,w,h,title)
{
 var hWnd;
 if(hWnd!=null) hWnd.close();
 hWnd=window.open(img,"","toolbar=no,location=no,directories=no,resizable=no,left=100,top=100,width="+w+",height="+h);
 hWnd.document.open();
 hWnd.document.write("<html><head><title>"+title+"</title></head><body topmargin=0 leftmargin=0 marginwidth=0 marginheight=0>");
 hWnd.document.write("<img src=\""+img+"\" width="+w+" height="+h+">");
 hWnd.document.write("</body></html>");
 hWnd.document.close();
}

function openproduct(img,w,h,title,info)
{
 var hWnd;
 if(hWnd!=null) hWnd.close();
 if(info!='') h2 = h + 16*(info.length/70)+30; else h2 = h;
 hWnd=window.open(img,"","toolbar=no,location=no,directories=no,resizable=no,scrollbars=yes,left=100,top=100,width="+w+",height="+h2);
 hWnd.document.open();
 hWnd.document.write("<html><head><title>"+title+"</title></head><body topmargin=0 leftmargin=0 marginwidth=0 marginheight=0>");
 hWnd.document.write("<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=windows-1251\">");
 hWnd.document.write("<LINK href=\"/inc/cssw.css\" type=text/css rel=stylesheet>");
 hWnd.document.write("<img src='/i/emp.gif' STYLE='BACKGROUND:url("+img+");' WIDTH="+w+" HEIGHT="+h+">");
 if(info!='') hWnd.document.write("<DIV STYLE='PADDING:7px;'>"+info+"</DIV>");
 hWnd.document.write("</body></html>");
 hWnd.document.close();
}


function setColor(element_id, cc)
{
	document.getElementById( element_id ).style.backgroundColor = cc;
}

function showObject(obj)
{    
	obj.className = "visible"
}

function hideObject(obj)
{   
	obj.className = "hidden"
}

function show_div(id)
{
	var div;
	div = document.getElementById(id);
	if ( div.style.display == "none" ) div.style.display = "block";
		else div.style.display = "none";
}

function show_div_in_tree(div_id, picture_id)
{
	var div_id;
	var picture_id;
	div = document.getElementById(div_id);
	if ( div.style.display == "none" )
	{
		div.style.display = "block";
		pics(picture_id,"/i/tree_minus.gif");
	}
	else
	{
		div.style.display = "none";
		pics(picture_id,"/i/tree_plus.gif");
	}
}