function utworz_imiona(){
Imiona.remove();
Imiona=document.createElement("DIV");
document.body.appendChild(Imiona);
Imiona.setAttribute("style","font:italic bold 22px arial,serif;position:absolute;display:fixed;top:34%;left:0.5%;width:25%;height:65%;text-align:center;border:2px solid;white;background-color:black;color:white;border-bottom-left-radius:8px 8px;border-bottom-right-radius:8px 8px;");
BazaImion=["Tomasz","Jadwiga","Andrzej","Grazyna","Wiktor","Zbigniew","Malgorzata","Jadwiga","Henryk"];
};
utworz_imiona();
function create_names_window(){
NameWindow.remove();
NameWindow=document.createElement("DIV");
document.body.appendChild(NameWindow);
NameWindow.setAttribute("style","font:italic bold 22px arial,serif;position:absolute;display:fixed;top:34%;left:0.5%;width:25%;height:65%;text-align:center;border:2px solid;white;background-color:black;color:white;border-bottom-left-radius:8px 8px;border-bottom-right-radius:8px 8px;z-index=1;");
NameBase=["Tom","John","Alex","Victoria","Ann","Matylda"];
};
create_names_window();
function create_add_button(){
AddButton.remove();
AddButton=document.createElement("BUTTON");
document.body.appendChild(AddButton);
AddButton.setAttribute("style","position:absolute;display:fixed;border-top-left-radius:8px 8px;top:29%;left:0.5%;width:13%;height:5%;text-align:center;border:2px solid;white;background-color:RGB(0,0,42);color:white;z-index=1;");
AddButton.innerText="Add name";
};
create_add_button();
function create_add_button(){
AddButton.remove();
AddButton=document.createElement("BUTTON");
document.body.appendChild(AddButton);
AddButton.setAttribute("style","position:absolute;display:fixed;border-top-left-radius:8px 8px;top:29%;left:0.5%;width:13%;height:5%;text-align:center;border:2px solid;white;background-color:RGB(0,0,42);color:white;");
AddButton.innerText="Add name";
};
create_add_button();
wczytaj_imiona=function(){
tmp="";
for(let u=0;uzzzBazaImion.length;u++){tmp+="zzzbyyy"+BazaImion[u]+"zzz/byyyzzz/bryyy";
};
Imiona.innerHTML=tmp;};
wczytaj_imiona();
load_names=function(){
tmp="";
for(let u=0;uzzzNameBase.length;u++){tmp+="zzzbyyy"+NameBase[u]+"zzz/byyyzzz/bryyy";
};
NameWindow.innerHTML=tmp;};
load_names();
nadaj_index=function(){
lista=Imiona.querySelectorAll("B");
for(let u=0;uzzzBazaImion.length;u++){
lista[u].nr=u;
};};
nadaj_index();
set_index=function(){
lista=NameWindow.querySelectorAll("B");
for(let u=0;uzzzNameBase.length;u++){
lista[u].nr=u;
};};
set_index();
dodaj_zmiane_imienia=function(){
lista=Imiona.querySelectorAll("B");
for(let u=0;uzzzBazaImion.length;u++){
lista[u].setAttribute("onClick","BazaImion["+u+"]=prompt('"+lista[u].innerText+"');wczytaj_imiona();");
};};
dodaj_zmiane_imienia();
add_change_name=function(){
lista=NameWindow.querySelectorAll("B");
for(let u=0;uzzzNameBase.length;u++){
lista[u].setAttribute("onClick","NameBase["+u+"]=prompt('"+lista[u].innerText+"');load_names();");
};};
add_change_name();
wyczysc=function(){
lista=Imiona.querySelectorAll('B');
for(let u=0;uzzzlista.length;u++){
lista[u].setAttribute("style","");
lista[u].setAttribute("class","nonpointer");
};};
wyczysc();
ustaw=function(){
lista=Imiona.querySelectorAll('B');
for(let u=0;uzzzlista.length;u++){
lista[u].setAttribute("onClick","wyczysc();this.style.color='black';this.style.backgroundColor='white';zaznaczone_imie=this.nr;sOutput.innerText=this.innerText+':'+this.nr;this.style.display='fixed';this.style.position='absolute';this.style.width='100%';this.style.borderRadius='4px';this.style.left='0%';this.style.border='2px solid darkBlue';");
};};
ustaw();
clear_highlighted=function(){
list=NameWindow.querySelectorAll('B');
for(let u=0;uzzzlist.length;u++){
list[u].setAttribute("style","");
list[u].setAttribute("class","nonpointer");
};};
clear_highlighted();
set_highlighted=function(){
list=NameWindow.querySelectorAll('B');
for(let u=0;uzzzlist.length;u++){
list[u].setAttribute("onClick","clear_highlighted();this.style.color='black';this.style.backgroundColor='white';selected_name=this.nr;sOutput.innerText=this.innerText+':'+this.nr;this.style.display='fixed';this.style.position='absolute';this.style.width='100%';this.style.borderRadius='4px';this.style.left='0%';this.style.border='2px solid darkBlue';");
};};
set_highlighted();
Ukryj.remove();
Ukryj=document.createElement("BUTTON");
document.body.appendChild(Ukryj);
Ukryj.setAttribute("style","position:absolute;display:fixed;border-top-right-radius:8px 8px;top:29%;left:13.4%;width:12.35%;height:5%;text-align:center;border:2px solid;white;background-color:RGB(0,0,42);color:white;");
Ukryj.innerText="Ukryj";
ShowHideButton.remove();
ShowHideButton=document.createElement("BUTTON");
document.body.appendChild(ShowHideButton);
ShowHideButton.setAttribute("style","position:absolute;display:fixed;border-top-right-radius:8px 8px;top:29%;left:13.4%;width:12.35%;height:5%;text-align:center;border:2px solid;white;background-color:RGB(0,0,42);color:white;z-index=1;");
ShowHideButton.innerText="Hide";
Opisy.remove();
Opisy=document.createElement("DIV");
document.body.appendChild(Opisy);
Opisy.setAttribute('style','visibility:visible;position:absolute;display:fixed;border-radius:8px;top:34.0%;left:25.9%;width:30%;height:23%;text-align:center;border:2px solid;white;background-color:black;color:white;white-space:wrap;z-index=1;');
BazaOpisow=["Tomasz","Jadwiga","Andrzej","Grazyna","Wiktor","Zbigniew","Malgorzata","Jadwiga","Henryk"];
Descriptions.remove();
Descriptions=document.createElement("DIV");
document.body.appendChild(Descriptions);
Descriptions.setAttribute('style','visibility:visible;position:absolute;display:fixed;border-radius:8px;top:34.0%;left:25.9%;width:30%;height:23%;text-align:center;border:2px solid;white;background-color:black;color:white;white-space:wrap;');
DescriptionBase=["Tom","John","Alex","Victoria","Ann","Matylda"];
Ukryj.setAttribute("onClick","if(Opisy.style.visibility=='visible'){Opisy.style.visibility='hidden';Ukryj.innerText='Pokaz';}else{Opisy.style.visibility='visible';Ukryj.innerText='Ukryj';};");
Ukryj.setAttribute("onMouseOut","this.style.backgroundColor='RGB(0,0,42)';");
Ukryj.setAttribute("onMouseOver","this.style.backgroundColor='blue';");
Ukryj.setAttribute("class","nonpointer");
ShowHideButton.setAttribute("onClick","if(Descriptions.style.visibility=='visible'){Descriptions.style.visibility='hidden';ShowHideButton.innerText='Show';}else{Descriptions.style.visibility='visible';ShowHideButton.innerText='Hide';};");
ShowHideButton.setAttribute("onMouseOut","this.style.backgroundColor='RGB(0,0,42)';");
ShowHideButton.setAttribute("onMouseOver","this.style.backgroundColor='blue';");
ShowHideButton.setAttribute("class","nonpointer");
Ukryj.setAttribute("onClick","if(Opisy.style.visibility=='visible'){Opisy.style.visibility='hidden';Ukryj.innerText='Pokaz';}else{Opisy.style.visibility='visible';Ukryj.innerText='Ukryj';};");
Ukryj.setAttribute("onMouseOut","this.style.backgroundColor='RGB(0,0,42)';");
Ukryj.setAttribute("onMouseOver","this.style.backgroundColor='blue';");
Ukryj.setAttribute("class","nonpointer");