function orange_polosa(name_div)
{	

	var div = document.getElementById(name_div);
	/*div.style.background-image ='url(poloska_orange.jpg)';*/
	
	div.style.background = 'url(http://usadba.by/poloska_orange.jpg)';

}

function green_polosa(name_div)
{	

	var div = document.getElementById(name_div);
	
	div.style.background = 'url(http://usadba.by/poloska_green.jpg)';

}
	


function toggle_div()

	{	
		var div = document.getElementById('all_foto');
		div.style.display = 'block';
		var div = document.getElementById('all_foto_2');
		div.style.display = 'block';
		var div = document.getElementById('all_foto_3');
		div.style.display = 'block';
		var div = document.getElementById('all_foto_4');
		div.style.display = 'block';
		var div = document.getElementById('a_show_foto');
		div.style.display = 'none';
		return false;
	}
	

	
function ShowFormZakaz(id,name)
{
 var w = 350;
 var h = 250;
 var left = Math.round((window.screen.width-w)/2);
 var top = Math.round((window.screen.height-h)/2);
 var opts="HEIGHT="+h+",WIDTH="+w+",COPYHISTORY=0,DIRECTORIES=0,LOCATION=0,MENUBAR=0,RESIZABLE=0,SCROLLBARS=0,STATUS=1,TOOLBAR=0,TOP="+top+",LEFT="+left;
 window.open("zakaz_form.php?id="+id+'&usadba='+name, "name1", opts);
}


function ShowNews(id)
{
 var w = 550;
 var h = 550;
 var left = Math.round((window.screen.width-w)/2);
 var top = Math.round((window.screen.height-h)/2);
 var opts="HEIGHT="+h+",WIDTH="+w+",COPYHISTORY=0,DIRECTORIES=0,LOCATION=0,MENUBAR=0,RESIZABLE=0,SCROLLBARS=1,STATUS=1,TOOLBAR=0,TOP="+top+",LEFT="+left;
 window.open("show_news.php?id="+id, "name1", opts);
}




function showImg(img){
  myImg= new Image();
  myImg.src=(img);
  OpenImg(img);
}
function OpenImg(img){
  if((myImg.width!=0)&&(myImg.height!=0)){
    viewImg(img);
  }
  else{
    func="OpenImg('"+img+"')";
    showTimer=setTimeout(func,20);
  }
}
function viewImg(img){
  miWidth=myImg.width+20;
  miHeight=myImg.height+40;
  paramString="width="+miWidth+",height="+miHeight;
  result=window.open('/showimg.php?imgpath='+img,"",paramString);
}

