// Open new window
function NewWindow(pname,path,pic)
{
var width = (arguments.length > 3 && arguments[3] > 770) ? arguments[3] + 30 : 770;
var height = (arguments.length > 4 && arguments[4] > 600) ? arguments[4] + 180: 600;
if(version=="n3" && screen.height>600){
	if(height == 600){
		height = 770;
	}else{
		if(screen.height < height){
			height = screen.height - 50;
		}
	}
}
var href =  "/russian/photogallery/pictures.html?" + "path=" + escape(path) + "&pic=" + escape(pic)
var top = (height > 600) ? 4 : 0;
var left = (height > 600) ? 127 : 15;

window.open(href,pname,"channelmode=no,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no,width=" + width + ",height=" + height + ",top=" + top + ",left=" + left,false)

/*if(version=="n3")
  {
   if(screen.height>600)
     {
      window.open(href,pname,"channelmode=no,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no,width=770,height=710,top=4,left=127",false)
     }
   else
     {
      window.open(href,pname,"channelmode=no,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no,width=770,height=600,top=0,left=15",false)
     }
  }
else
  {
   window.open(href,pname,"channelmode=no,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no,width=770,height=600,top=0,left=15",false)
  }*/
 
}
