      function verify_byneed(){
        if (document.needform.child.disabled){
          if ((document.needform.parent.value=='') || (document.needform.parent.value=='0')){
            alert ('You had to choose option from menu');
            document.needform.parent.focus();
            return;
          }
          document.needform.need.value=document.needform.parent.value;
          document.needform.parent.value='';
        } else {
          if ((document.needform.child.value=='') || (document.needform.child.value=='0')){
            alert ('You had to choose option from menu');
            document.needform.child.focus();
            return;
          }
          document.needform.need.value=document.needform.child.value;
          document.needform.parent.value='';
          document.needform.child.value='';
        }
        document.needform.submit(); 
      }
      
      function FillList(s_parent,s_child,tab) {
      	var num=s_parent.selectedIndex;
      	var len = 0;
//        showHideLayer(0,1);
      	s_child.disabled=false;
      	s_child.selectedIndex=0;

        for (opt = s_child.length; opt >= 0; opt--) {
          s_child[opt] = null;
        }
      	s_child.options[0] = new Option('--- choose one ---',0);

      //---- added by TKepski
        if (num == 0) { 
        	s_child.disabled=true;
//          showHideLayer(0,0);
          return;
        } 
        if (tab[num].length==0){
        	s_child.disabled=true;
//          showHideLayer(0,0);
          return;
        }
      //----  

      	len=1;
      	for ( opt=0;opt<tab[num].length;opt++) {
      			len++;
      			s_child.options[opt+1] = new Option(tab[num][opt][1],''+tab[num][opt][0]+'');
      	}
      	s_child.length = len;
      	s_child.focus() ;
      }

      function verify_bytype(){
        if ((document.typeform.state.disabled==false) && (corporate==false)) {
          if (document.typeform.state.value==''){
            alert ('You had to choose state');
            document.typeform.state.focus();
            return;
          }
          document.typeform.type.value='';
        }
        document.typeform.submit(); 
      }
      

