﻿// JScript File
            function refresh(name, value){
                document.form1.HD1.value = name;
                document.form1.HD2.value = value;
                document.form1.submit();
              }
                
            function zmen(co,co2,poradi){
//                s = document.images(co).src;
//                if (s.search("vpravo")!= -1) {
//                    document.images(co).src="files/tdolu.png";
//                    document.getElementById(co2).style.display="table";
//                    form1.HD3.value = form1.HD3.value.substr(0,poradi-1) + "1" + form1.HD3.value.substr(poradi);
//                }
//                else {
//                    document.images(co).src="files/tvpravo.png";
//                    document.getElementById(co2).style.display="none";
//                    form1.HD3.value = form1.HD3.value.substr(0,poradi-1) + "0" + form1.HD3.value.substr(poradi);
//                    if (co=="o1") {
//                        document.images("o2").src="files/tvpravo.png";
//                        document.getElementById("T2").style.display="none";
//                        form1.HD3.value = form1.HD3.value.substr(0,poradi-1) + "0" + form1.HD3.value.substr(poradi);
//                    }
//                }
            }

            function nastav() {
                var x="";              
                Nifty("div#rdtop1","top");
                Nifty("div#rdbottom1","bottom");
                Nifty("div#Div_aktualizace");
               
                
//                for (i=0;i<=5;i++){
//                    x = form1.HD3.value.substr(i,1)       
//                    if (x == "1") {
//                        rozbal(i+1);
//                    }
//                    else {
//                        zabal(i+1);
//                    }
//                }
//            }
//            function rozbal(k){
//                document.images("o" + k).src = "files/tdolu.png";
//                var x="T" + k;
//                document.getElementById(x).style.dipslay="table";                
//            }

//            function zabal(k){
//                document.images("o" + k).src = "files/tvpravo.png";
//                var x="T" + k;
//                document.getElementById(x).style.display="none";
            }

        function pagingDLup(){
            var i = 0;
            i = parseInt(form1.HD4.value,10) + parseInt("1",10);
            document.form1.HD4.value = i.toString();
            alert(form1.HD4.value)
            __doPostBack('UpdatePanel1', '');
        }

        function pagingDLdown(){
            var i = 0;
            i = parseInt(form1.HD4.value,10) - parseInt("1",10);
            form1.HD4.value = i.toString();
            alert(form1.HD4.value)
            __doPostBack('UpdatePanel1', '');
        }

        function GVRowClick(id){ 
        
            document.form1.TB1.value = document.getElementById("GridView1").rows(parseInt(id,10) + 1).cells(0).innerText;
            document.form1.TB2.value = document.getElementById("GridView1").rows(parseInt(id,10) + 1).cells(1).innerText;
            document.form1.TB3.value = document.getElementById("GridView1").rows(parseInt(id,10) + 1).cells(2).innerText;
            document.form1.TB4.value = document.getElementById("GridView1").rows(parseInt(id,10) + 1).cells(3).innerText;
            document.form1.TB5.value = document.getElementById("GridView1").rows(parseInt(id,10) + 1).cells(4).innerText;
            document.form1.TB6.value = document.getElementById("GridView1").rows(parseInt(id,10) + 1).cells(5).innerText;
            document.form1.TB7.value = document.getElementById("GridView1").rows(parseInt(id,10) + 1).cells(6).innerText;    

//            DisableAllTXTBOX();
//            var inputElements = involker.getElementsByTagName('input');
//            
//            for (var i = 0 ; i < inputElements.length ; i++) {
//                var myElement = inputElements[i];
//                // Filter through the input types looking for checkboxes
//                if (myElement.type === "text") {
//                   
//                   // Use the involker (our calling element) as the reference 
//                   //  for our checkbox status
//                    myElement.disabled = false;
//                    
//                }
//            }            
        }   
        
        function TBChange(){ 
               
            document.getElementById("Button1").style.backgroundcolor= "red";
        }
        
