var Win;
function displayWindow(url, width, height, center)
{
  //alert(width);
  l = (screen.Width/2) - (width/2);
  t = (screen.Height/2) - (height/2);
  
  Win = window.open(url,'displayWindow','width=' + width + ',height=' + height + ',left=10,top=10,scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no,left='+ l +',top='+ t );
  Win.focus();
}


function ShowPath(Path)
{
	if(Path)
	{
		theDiv = "Dir"+Path;
		document.all[theDiv].style.visibility = 'visible';
	}
}

function HidePath(Path)
{
	if(Path)
	{
		theDiv = "Dir"+Path;
		document.all[theDiv].style.visibility = 'hidden';
	}
}

function jump(selInd, selShow, jmpAddr,con)
{
  /*
  alert(selShow);
  str ="";
  for(a in selShow)
    str += a + " ";
  alert(str);  
  */
  if(selInd > -1)
  {
     //alert(jmpAddr)
     jmpAddr += con+"show="+selShow+"&id="+selInd;
     location.replace(jmpAddr);
  }
}

function clear(inpName)
{
   alert(inpName);
   //document.forms[0]
}

function search(lang)
{
  strAlert = "Input keyword";
  if(lang == "pol")
  {
     strAlert = "Wpisz frazę do wyszukania !";
  }
  
  if(document.forms["srcForm"].elements["keyword"].value == "Szukaj..." || document.forms["srcForm"].elements["keyword"].value == "Search..." || document.forms["srcForm"].elements["keyword"].value == "")
    alert(strAlert);
  else  
    document.forms["srcForm"].submit();
}

function removeFile(fid)
{
   if(confirm("Chcesz skasować ten obrazek ?"))
   {
      window.location.replace("admin.php?show=prem&act=del&pid="+fid);
      return true;
   }
   else
      return true;
}
