

function SubmitForm()
{
	document.entryform.submit();
}


function WinOpen(file)
{
     look='';
     sbars = 0;
     resize = 1;
         
	  look = 'scrollbars='+sbars+', resizable='+resize+', width=350, height=550';
     newWin = window.open(file,'newWinodow','toolbar=0,location=0,'+look);
	 
}


function ImgWinOpen(file,title,w,h)
{
     look='';
     sbars = 0;
     resize = 0;
     if(w > screen.availWidth)
     {
     		w = screen.availWidth-30;
     		sbars = 1;
     		resize = 1;
     }
     if(h > screen.availHeight)
     {
     		h = screen.availHeight-60;
     		sbars = 1;
     		resize = 1;
     }
     
	  look = 'scrollbars='+sbars+', resizable='+resize+', width='+w+',height='+h+'';
     newWin = window.open(file,'newWinodow','toolbar=0,location=0,'+look);
	  newWin.document.write("<html><head><title>"+title+"</title></head>");
	  newWin.document.write("<body leftmargin=0 rightmargin=0 topmargin=0 bottommargin=0 marginwidth=0 marginheight=0 margin=0><img src=" +file+ " />");
	  newWin.document.write("</body></html>");
}

function GiveDeleteProductWarning(id,pname)
{
  if(confirm('Czy napewno trwale usun±æ produkt: '  + pname ))
     	  window.location.search="?action=delete&id="+id;
}
	 
function GiveDeletePortfolioWarning(id,pname)
{
  if(confirm('Czy napewno trwale usun±æ : '  + pname ))
     	  window.location.search="?action=delete&id="+id;
}

function GiveDeletePictureWarning(id,page)
{
  if(confirm('Czy napewno trwale usun±æ to zdjêcie ??'))
     	  window.location.search="?action=delete&id="+id+"&page="+page;
}	 

function GiveDeleteEmployeeWarning(id, name)
{
  if(confirm('Czy napewno trwale usun±æ z bazy danych pracownika: ' + name + ' ?'))
     	  window.location.search="?action=delete&id="+id;
}

function GiveDeleteNewWarning(id, name)
{
  if(confirm('Czy napewno trwale usun±æ z bazy informacjê: ' + name + ' ?'))
     	  window.location.search="?action=delete&id="+id;
}

function GiveDeleteCategoryWarning(id, name)
{
  alert("UWAGA: usuniêcie kategorii: '" + name + "' spowoduje usuniêcie wszystkich produktów tej kategorii.");
  if(confirm('Czy napewno trwale usun±æ z bazy kategoriê: \"' + name + '\" i wszystkie produkty nale¿±ce do tej kategorii ?'))
     	  window.location.search="?action=delete&id="+id;
}
		 