document.write('<meta http-equiv="Page-Enter" content="blendTrans(Duration=1.0)">')
document.write('<meta http-equiv="Page-Exit" content="blendTrans(Duration=1.0)">')
function okno(film){
gora=screen.height/2-280;
lewy=screen.width/2-280;
oknoFilm=window.open(film,'oknoFilm','menubar=no,location=no,toolbar=no,scrollbars=no,status=no,resizable=yes,width=600,height=600,left='+lewy +',top='+gora +'');
oknoFilm.focus();
}
function potwierdz(msg)
{
if(confirm(msg)){
  return true;
}else{
  return false;
	}

  
}
function Edytuj(nazwa,opis,dzial,data_dodania,nazwa_pliku,id,czas){
  //nazwa 
  pole=document.createElement("input");
  pole.type="text";
  pole.size="20";
  pole.value=""+nazwa;
  pole.id="nazwa"+id;
  pole.name="nazwa"+id;
  pole.className="guzik1";
  document.getElementById("nazwa"+id).replaceChild(pole,document.getElementById("nazwa"+id).childNodes[0]);
  
  //opis filmu
  pole=document.createElement("input");
  pole.type="text";
  pole.size="40";
  pole.value=""+opis;
  pole.id="opis"+id;
  pole.name="opis"+id;
  pole.className="guzik1";
  document.getElementById("opis"+id).replaceChild(pole,document.getElementById("opis"+id).childNodes[0]);
  
  //opis filmu
  pole=document.createElement("input");
  pole.type="text";
  pole.size="20";
  pole.value=""+czas;
  pole.id="czas"+id;
  pole.name="czas"+id;
  pole.className="guzik1";
  document.getElementById("czas"+id).replaceChild(pole,document.getElementById("czas"+id).childNodes[0]);
  
  
   //dzial
var  pole=document.createElement("select");
  pole.id="dzial"+id;
  pole.name="dzial"+id;
  pole.className="guzik1";
  
var  opt=document.createElement("option");
 var tekst=document.createTextNode("debiut");
opt.appendChild(tekst);
opt.setAttribute("value","debiut");
if(opt.value==(""+dzial)){
		opt.setAttribute("selected","true");
		}
pole.appendChild(opt);

var  opt=document.createElement("option");
 var tekst=document.createTextNode("gra srodkowa");
opt.appendChild(tekst);
opt.setAttribute("value","gra srodkowa");
if(opt.value==(""+dzial)){
		opt.setAttribute("selected","true");
		}
pole.appendChild(opt);

var  opt=document.createElement("option");
 var tekst=document.createTextNode("końcówka");
opt.appendChild(tekst);
opt.setAttribute("value","końcówka");
if(opt.value==dzial){
		opt.setAttribute("selected","true");
		}
pole.appendChild(opt);

var  opt=document.createElement("option");
 var tekst=document.createTextNode("pułapka");
opt.appendChild(tekst);
opt.setAttribute("value","pułapka");
if(opt.value==(""+dzial)){
		opt.setAttribute("selected","true");
		}
pole.appendChild(opt);

var  opt=document.createElement("option");
 var tekst=document.createTextNode("strategia");
opt.appendChild(tekst);
opt.setAttribute("value","strategia");
if(opt.value==(""+dzial)){
		opt.setAttribute("selected","true");
		}
pole.appendChild(opt);

var  opt=document.createElement("option");
 var tekst=document.createTextNode("taktyka");
opt.appendChild(tekst);
opt.setAttribute("value","taktyka");
if(opt.value==(""+dzial)){
		opt.setAttribute("selected","true");
		}
pole.appendChild(opt);

var  opt=document.createElement("option");
 var tekst=document.createTextNode("analiza");
opt.appendChild(tekst);
opt.setAttribute("value","analiza");
if(opt.value==(""+dzial)){
		opt.setAttribute("selected","true");
		}
pole.appendChild(opt);
document.getElementById("dzial"+id).replaceChild(pole,document.getElementById("dzial"+id).childNodes[0]);	 
//data_dodania
  pole=document.createElement("input");
  pole.type="text";
  pole.size="15";
  pole.value=""+data_dodania;
  pole.id="datadod"+id;
  pole.name="datadod"+id;
  pole.className="guzik1";
  document.getElementById("datadod"+id).replaceChild(pole,document.getElementById("datadod"+id).childNodes[0]);
  
//nazwa_pliku

 pole=document.createElement("input");
  pole.type="text";
 pole.size="15";
  pole.value=""+nazwa_pliku;
  pole.id="nazwa_pliku"+id;
  pole.name="nazwa_pliku"+id;
  pole.className="guzik1";
 document.getElementById("nazwa_pliku"+id).replaceChild(pole,document.getElementById("nazwa_pliku"+id).childNodes[0]);
  
  var kontener=document.getElementById("z"+id);
  var usun1=document.getElementById("e"+id);
  var kontener2=document.getElementById("zz"+id);
  var usun2=document.getElementById("u"+id);
  kontener.removeChild(usun1);
  kontener2.removeChild(usun2); 
  pole2=document.createElement("input");
  pole2.type="submit";
  pole2.value="Zapisz";
  pole2.id="zapisz"+id;
  pole2.name="zapisz"+id;
  pole2.className="guzik1";
  kontener2.appendChild(pole2);
  
   }
   
  function Edytuj2(user_id,login,email,odkiedy,dokiedy,zaplacono,ilemiesiecy){
  //login
  pole=document.createElement("input");
  pole.type="text";
  pole.size="20";
  pole.value=""+login;
  pole.id="login"+user_id;
  pole.name="login"+user_id;
  pole.className="guzik1";
  document.getElementById("login"+user_id).replaceChild(pole,document.getElementById("login"+user_id).childNodes[0]);
  
  //email
  pole=document.createElement("input");
  pole.type="text";
  pole.size="30";
  pole.value=""+email;
  pole.id="email"+user_id;
  pole.name="email"+user_id;
  pole.className="guzik1";
  document.getElementById("email"+user_id).replaceChild(pole,document.getElementById("email"+user_id).childNodes[0]);
  //odkiedy
  pole=document.createElement("input");
  pole.type="text";
  pole.size="20";
  pole.value=""+odkiedy;
  pole.id="odkiedy"+user_id;
  pole.name="odkiedy"+user_id;
  pole.className="guzik1";
  document.getElementById("odkiedy"+user_id).replaceChild(pole,document.getElementById("odkiedy"+user_id).childNodes[0]);
  
  
//dokiedy
  pole=document.createElement("input");
  pole.type="text";
  pole.size="20";
  pole.value=""+dokiedy;
  pole.id="dokiedy"+user_id;
  pole.name="dokiedy"+user_id;
  pole.className="guzik1";
  document.getElementById("dokiedy"+user_id).replaceChild(pole,document.getElementById("dokiedy"+user_id).childNodes[0]);
//ilemiesiecy

  pole=document.createElement("input");
  pole.type="text";
  pole.size="5";
  pole.value=""+ilemiesiecy;
  pole.id="ilemies"+user_id;
  pole.name="ilemies"+user_id;
  pole.className="guzik1";
  document.getElementById("ilemies"+user_id).replaceChild(pole,document.getElementById("ilemies"+user_id).childNodes[0]);
  
// zaplacono
var  pole=document.createElement("select");
  pole.id="zaplacono"+user_id;
  pole.name="zaplacono"+user_id;
  pole.className="guzik1";
  
var  opt=document.createElement("option");
 var tekst=document.createTextNode("tak");
opt.appendChild(tekst);
opt.setAttribute("value","tak");
if(opt.value==(""+zaplacono)){
		opt.setAttribute("selected","true");
		}
pole.appendChild(opt);

var  opt=document.createElement("option");
 var tekst=document.createTextNode("nie");
opt.appendChild(tekst);
opt.setAttribute("value","nie");
if(opt.value==(""+zaplacono)){
		opt.setAttribute("selected","true");
		}
pole.appendChild(opt);
document.getElementById("zaplacono"+user_id).replaceChild(pole,document.getElementById("zaplacono"+user_id).childNodes[0]);

var kontener1=document.getElementById("akt"+user_id);
  var usun1=document.getElementById("aktywuj"+user_id);
  var kontener2=document.getElementById("usun"+user_id);
  var usun2=document.getElementById("uusun"+user_id);
  var kontener3=document.getElementById("edytuj"+user_id);
  var usun3=document.getElementById("eedytuj"+user_id);
  
 kontener1.removeChild(usun1);
  kontener2.removeChild(usun2); 
  kontener3.removeChild(usun3); 
  pole2=document.createElement("input");
  pole2.type="submit";
  pole2.value="Zapisz";
  pole2.id="zapiszusera"+user_id;
  pole2.name="zapiszusera"+user_id;
  pole2.className="guzik1";
  kontener2.appendChild(pole2); 
}
   
