//---------------------------------------------------------------------
function load_img(id, h, w)
{
	var l = (screen.width  - w)/2;
 	var t = (screen.height - h)/2;
	window.open('/img.php?img='+id, '', 'resizable=yes,scrollbars=yes,height='+h+',width='+w+',top='+t+',left='+l);
}
//---------------------------------------------------------------------
show = false;
function SHDiv(id,t)
{
	block = 'none';
	if (t)
		block = 'block';
	else if(show)
		return '';
	show = true;
	document.getElementById("tBBInfo_"+id).style.display = block;
	cmfColorBg(id,'bgtb','bgimg',5,4);
}
function setShow()
{
	show = false;
}
function cmfColorBg(cur,nt,ni,ct,ci)
{
	
	var bgColor = new Array();
	 
		bgColor[0] = "#e4e4e4";
		bgColor[1] = "#ff7800";
	
	var flag = 1;
	
	if(document.getElementById("tBBInfo_"+cur)) { if (document.getElementById("tBBInfo_"+cur).style.display=="none") { flag = 0; } }
	 	
	for(var i=1;i<=ct;i++)
	{
		if(document.getElementById(ni+i+cur)) { // меняем картинки
		  									 
			if(flag==1) document.getElementById(ni+i+cur).src = "/img/blockimg/"+i+"bl.jpg"; 
			if(flag==0) document.getElementById(ni+i+cur).src = "/img/blockimg/"+i+"bln.jpg"; 
		}
		
		if(document.getElementById(nt+i+cur)) { 
			document.getElementById(nt+i+cur).style.background=bgColor[flag];
			if(i==3) { for(var j=1;j<=2;j++) { 
				if(document.getElementById(nt+i+cur+j)) 
					{ 
						if(flag==1) document.getElementById(nt+i+cur+j).style.color ="#ffffff"; 
						if(flag==0) document.getElementById(nt+i+cur+j).style.color ="#ff7800"; 
					} } }
		}
	}
}

//-----------------------------------

