// JavaScript Document function ShowImg(img) { var url = img var win = window.open( url, "WNSImageWindow", "height=550, width=700, toolbar=no, status=yes, resizable=yes"); if (win) win.focus(); } function PopUp(url,WinWidth,WinHeight) { // pokud nejsou nastavene vlasni rozmery // pouzije vychozi if(!WinWidth){ var WinWidth = 700; } if(!WinHeight){ var WinHeight = 700; } var win = window.open( url, "WNSImageWindow", "height="+WinHeight+", width="+WinWidth+", toolbar=no, status=yes, resizable=yes"); if (win) win.focus(); } /* ************************* */ /* zaskrtnout/odskrtnout vse */ /* ************************* */ function checkedAll (id, checked) { var el = document.getElementById(id); for (var i = 0; i < el.elements.length; i++) { el.elements[i].checked = checked; } }// // function toggleChecked(oElement){ // oForm=oElement.form; // oElement=oForm.elements[oElement.name]; // if(oElement.length){ // bChecked=oElement[0].checked; // for(i=1;i1){ var cislo = poradove_cislo + LastPhotoNum; } else{ var cislo = poradove_cislo + 2; } // fieldset var NarrowFieldset = document.createElement('fieldset'); NarrowFieldset.className = 'NarrowForm'; // legend var FieldsetLegend = document.createElement('legend'); FieldsetLegend.innerHTML = 'fotografie '+cislo; NarrowFieldset.appendChild(FieldsetLegend); /* ********************* */ /* prvni radek formulare */ /* ********************* */ // div jako radek var FirstUpperDiv = document.createElement('div'); FirstUpperDiv.className = 'licha'+' MustFill'; // span var span = document.createElement('span'); span.className = 'MusisVyplnit'; span.innerHTML = ' *'; // label k Select var LabelFile = document.createElement('label'); LabelFile.htmlFor = 'foto_'+cislo; // strong var strong = document.createElement('strong'); strong.innerHTML = 'foto'; // slozeni LabelFile.appendChild(strong); LabelFile.appendChild(span); FirstUpperDiv.appendChild(LabelFile); // Select var Input = document.createElement('input'); Input.type = 'file'; Input.name = 'foto_' + cislo; Input.id = 'foto_' + cislo; // slozeni FirstUpperDiv.appendChild(Input); /* ********************* */ /* druhy radek formulare */ /* ********************* */ // div jako radek var SecondUpperDiv = document.createElement('div'); SecondUpperDiv.className = 'suda'; // label k Select var LabelFile = document.createElement('label'); LabelFile.htmlFor = 'nazev_'+cislo; // strong var strong = document.createElement('strong'); strong.innerHTML = 'název'; // slozeni LabelFile.appendChild(strong); SecondUpperDiv.appendChild(LabelFile); // Select var Input = document.createElement('input'); Input.name = 'nazev_'+cislo; Input.id = 'nazev_'+cislo; // slozeni SecondUpperDiv.appendChild(Input); /* ********************* */ /* treti radek formulare */ /* ********************* */ // div jako radek var ThirdUpperDiv = document.createElement('div'); ThirdUpperDiv.className = 'licha'; // label k Select var LabelFile = document.createElement('label'); LabelFile.htmlFor = 'poznamky_'+cislo; // strong var strong = document.createElement('strong'); strong.innerHTML = 'poznámky'; // slozeni LabelFile.appendChild(strong); ThirdUpperDiv.appendChild(LabelFile); // textarea var TextAr = document.createElement('Textarea'); TextAr.name = 'poznamky_'+cislo; TextAr.id = 'poznamky_'+cislo; TextAr.className = 'StoPro'; TextAr.cols = '50'; TextAr.rows = '7'; // slozeni ThirdUpperDiv.appendChild(TextAr); // br var br = document.createElement('br'); ThirdUpperDiv.appendChild(br); /* ********************* */ /* ctvrty radek formulare */ /* ********************* */ // div jako radek var FourthUpperDiv = document.createElement('div'); FourthUpperDiv.className = 'suda'; // vnitrni parapety // label Select var LabelFile = document.createElement('label'); LabelFile.htmlFor = 'zobrazovat_'+cislo; // strong var strong = document.createElement('strong'); strong.innerHTML = 'zobrazovat'; // slozeni LabelFile.appendChild(strong); FourthUpperDiv.appendChild(LabelFile); // input var Input = document.createElement('input'); Input.type = 'checkbox'; Input.name = 'zobrazovat_'+cislo; Input.id = 'zobrazovat_'+cislo; Input.checked = 'checked'; // slozeni FourthUpperDiv.appendChild(Input); /* ********************* */ /* paty radek formulare */ /* ********************* */ // div jako radek var FifthUpperDiv = document.createElement('div'); FifthUpperDiv.className = 'licha'; // vnitrni parapety // label Select var LabelFile = document.createElement('label'); LabelFile.htmlFor = 'poradi_'+cislo; // strong var strong = document.createElement('strong'); strong.innerHTML = 'pořadí'; // slozeni LabelFile.appendChild(strong); FifthUpperDiv.appendChild(LabelFile); // input var Input = document.createElement('input'); Input.type = 'text'; Input.name = 'poradi_'+cislo; Input.id = 'poradi_'+cislo; // slozeni FifthUpperDiv.appendChild(Input); /* ********************************* */ /* slozeni vytvorenych casti do sebe */ /* ********************************* */ // slozi radky za sebe NarrowFieldset.appendChild(FirstUpperDiv); NarrowFieldset.appendChild(SecondUpperDiv); NarrowFieldset.appendChild(ThirdUpperDiv); NarrowFieldset.appendChild(FourthUpperDiv); NarrowFieldset.appendChild(FifthUpperDiv); elem.appendChild(NarrowFieldset); // prilozeni k hlavnimu poli this.inputArr.push(NarrowFieldset); } // konec funkce add // odstraneni posledniho inputu z elementu () this.remove = function(){ var elem = document.getElementById(this.linkId); var last = this.inputArr.pop(); if(last)elem.removeChild(last); } // konec funkce remove // naplni pole inputu jiz existujicimi inputy this.fill = function() { var elem = document.getElementById(this.linkId); if(elem) for(var i=0;i1){ var cislo = poradove_cislo + LastDocNum + 1; } else{ var cislo = poradove_cislo + 2; } // fieldset var NarrowFieldset = document.createElement('fieldset'); NarrowFieldset.className = 'NarrowForm'; // legend var FieldsetLegend = document.createElement('legend'); FieldsetLegend.innerHTML = DocName+' '+cislo+'.'; NarrowFieldset.appendChild(FieldsetLegend); /* ********************* */ /* prvni radek formulare */ /* ********************* */ // div jako radek var FirstUpperDiv = document.createElement('div'); FirstUpperDiv.className = 'licha MustFill'; // span var span = document.createElement('span'); span.className = 'MusisVyplnit'; span.innerHTML = ' *'; // label k Select var LabelFile = document.createElement('label'); LabelFile.htmlFor = 'doc_'+cislo; // strong var strong = document.createElement('strong'); strong.innerHTML = DocName; // slozeni LabelFile.appendChild(strong); LabelFile.appendChild(span); FirstUpperDiv.appendChild(LabelFile); // Select var Input = document.createElement('input'); Input.type = 'file'; Input.name = 'file_' + cislo; Input.id = 'file_' + cislo; Input.className = 'MustFill'; // slozeni FirstUpperDiv.appendChild(Input); /* ********************* */ /* druhy radek formulare */ /* ********************* */ // div jako radek var SecondUpperDiv = document.createElement('div'); SecondUpperDiv.className = 'suda MustFill'; // label k Select var LabelFile = document.createElement('label'); LabelFile.htmlFor = 'nazev_'+cislo; // strong var strong = document.createElement('strong'); strong.innerHTML = 'název'; // span var span = document.createElement('span'); span.className = 'MusisVyplnit'; span.innerHTML = ' *'; // slozeni LabelFile.appendChild(strong); LabelFile.appendChild(span); SecondUpperDiv.appendChild(LabelFile); // Select var Input = document.createElement('input'); Input.name = 'nazev_'+cislo; Input.id = 'nazev_'+cislo; Input.className = 'MustFill'; // slozeni SecondUpperDiv.appendChild(Input); /* ********************* */ /* treti radek formulare */ /* ********************* */ if(Preview){ // div jako radek var ThirdUpperDiv = document.createElement('div'); ThirdUpperDiv.className = 'licha'; // label k Select var LabelFile = document.createElement('label'); LabelFile.htmlFor = 'doc_'+cislo; // strong var strong = document.createElement('strong'); strong.innerHTML = 'náhled'; // slozeni LabelFile.appendChild(strong); ThirdUpperDiv.appendChild(LabelFile); // Select var Input = document.createElement('input'); Input.type = 'file'; Input.name = 'preview_' + cislo; Input.id = 'preview_' + cislo; // slozeni ThirdUpperDiv.appendChild(Input); } /* ********************* */ /* ctvrty radek formulare */ /* ********************* */ // div jako radek var FourthUpperDiv = document.createElement('div'); FourthUpperDiv.className = 'suda'; // vnitrni parapety // label Select var LabelFile = document.createElement('label'); LabelFile.htmlFor = 'zobrazovat_'+cislo; // strong var strong = document.createElement('strong'); strong.innerHTML = 'zobrazovat'; // slozeni LabelFile.appendChild(strong); FourthUpperDiv.appendChild(LabelFile); // input var Input = document.createElement('input'); Input.type = 'checkbox'; Input.name = 'zobrazovat_'+cislo; Input.id = 'zobrazovat_'+cislo; Input.checked = 'checked'; // slozeni FourthUpperDiv.appendChild(Input); /* ********************************* */ /* slozeni vytvorenych casti do sebe */ /* ********************************* */ // slozi radky za sebe NarrowFieldset.appendChild(FirstUpperDiv); NarrowFieldset.appendChild(SecondUpperDiv); if(Preview){NarrowFieldset.appendChild(ThirdUpperDiv);} NarrowFieldset.appendChild(FourthUpperDiv); elem.appendChild(NarrowFieldset); // prilozeni k hlavnimu poli this.inputArr.push(NarrowFieldset); } // konec funkce add // odstraneni posledniho inputu z elementu () this.remove = function(){ var elem = document.getElementById(this.linkId); var last = this.inputArr.pop(); if(last)elem.removeChild(last); } // konec funkce remove // naplni pole inputu jiz existujicimi inputy this.fill = function() { var elem = document.getElementById(this.linkId); if(elem) for(var i=0;i