function select_item(ele){
	ele.className = 'project_item_selected';
}

function normal_item(ele){
	ele.className = 'project_item';
}

function show_genplan (_id, _count){
	
	var i = 1;
	
	for(; i <= _count; i++){
		if(i == _id) {
			document.getElementById("genplan_" + i).style.display = 'block';
			document.getElementById("genplan_href_" + i).className = "genplan_href_selected";
		}
		else{
			document.getElementById("genplan_" + i).style.display = 'none';
			document.getElementById("genplan_href_" + i).className = "genplan_href";

		}
	}
	
}


function show_plan_img(_img){
	/*var div = document.getElementById("window_image");
	
	div.style.height = document.body.offsetHeight;
	
	var html = '<table width="100%" height="100%">'+
					'<tr>'+
						'<td valign="middle" align="center">'+
							'<a href="" onclick="hide_window(); return false;"><img src="/f/loading.gif" alt="Закрыть окно"  title="Закрыть окно" id="image_into_window" /></a>'+
						'</td>'+
					'</tr>'+
				'</table>';
	
	div.innerHTML = html;
	div.style.display = 'block';
	div.style.top = window.pageYOffset + 'px;';
	
	var img = document.getElementById("image_into_window");
	
	var image = new Image();
	image.src = _img;
	
	img.src = image.src;*/
}

function wopen (url, name, w, h)
{
	my_window = window.open(url,name,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width='+(w + 5)+',height='+(h + 5)+',top=70,left=70');
	my_window.document.body.style.padding = '0px;';
	my_window.document.body.style.margin = '0px;';
	//my_window.document.body.align = 'center';
}

function hide_window(){
	var div = document.getElementById("window_image");
	div.style.display = 'none';
}
