function AboutAuthors()
{
  var width = 370;
  var height = 400;
  var x = screen.width / 2 - width / 2;
  var y = screen.height / 2 - height / 2;

  window.open("index.php?TLC=Main.AboutAuthors", "AboutAuthors","resizable=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,width="+width+",height="+height+",left="+x+",top="+y);
}

function PopupImage(ImgWidth, ImgHeight, ImgID, ImgPath, ImgComment)
{
  var AdditionalWidth = 120;
  var AdditionalHeight = 140;

  if (ImgWidth == '')
    var ImgWidth = 300;

  if (ImgHeight == '')
    var ImgHeight = 300;

  var width = (ImgWidth * 1) + AdditionalWidth;
  var height = (ImgHeight * 1) + AdditionalHeight;
  var x = screen.width / 2 - width / 2;
  var y = screen.height / 2 - height / 2;

  if (ImgID != '')
    var params = '&media_id=' + ImgID;
  else
    var params = '&image_path=' + ImgPath + '&image_comment=' + ImgComment;

  MyWindow = window.open("image.php?type=image" + params, "image" ,"resizable=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,width="+width+",height="+height+",left="+x+",top="+y); 
  MyWindow.resizeTo(width, height);
  MyWindow.moveTo(x, y);
  MyWindow.focus();
}

function odpri(section, url) 
{
	switch (section)
	{
		case 'print': 
	  	MyWindow = window.open(url,"natisni","toolbar=yes,location=no,menubar=yes,resizable=yes,status=yes,scrollbars=yes,width=800,height=600");
	  	break;
		case 'mail':
			MyWindow = window.open(url,"poslji","toolbar=no,location=no,menubar=no,resizable=no,status=no,scrollbars=no,fullscreen=no,width=555,height=550");  
			break;
		case 'tractors':
			var width = 750;
			var height = 300;
			var x = screen.width / 2 - width / 2;
			var y = screen.height / 2 - height / 2;
			MyWindow = window.open(url,"tractors","toolbar=no,location=no,menubar=no,resizable=no,status=no,scrollbars=yes,fullscreen=no,width="+width+",height="+height+",left="+x+",top="+y);  
			break;
		default:
			alert('error');
			return;
	}
	
	MyWindow.focus();
}

function tiskaj() { //v3.0
  window.print();
}

function SetFocus()
{
  window.focus();
}
