<div class="container ">
  <div class="row">
    <div class="col-md-12 " style="padding-left: 0px!important;padding-right: 0px!important;position: relative;" >
          <style>
    /*#link_bar li:hover a { color: red }*/
    /*#link_bar li:hover  a p b { color: #a03d49; }*/
    #link_bar li:hover  a p b { color: #a03d49; }
    /*#link_bar li:hover  { border-top:2px solid #a03d49; }*/

     /*#link_bar li { border-top:2px solid transparent;cursor: pointer; }*/
     #link_bar li { border-top:2px solid transparent; }
    #link_bar li:hover  { border-top:2px solid #a03d49; }


    #link_bar .selected  { border-top:2px solid #a03d49; }
    #link_bar .selected  a p b { color: #a03d49; }
</style>
          <ul class="horizontal " id="link_bar" style="list-style-type: none;
            margin: 0;
            padding: 0;">
              <div style="width: 23%;height: 117px;text-align: center;display: inline-block;vertical-align:top;"  >
                <img src="./img/nchmclogo.png" >
                <!-- <a href="javascript:void(0)"> <img src="./img/nchmclogo.png" ></a> -->
              </div>
                <?php do {?> 
                   <li style="margin-left: 1%;width: 6%;height: 114px;display: inline-block;text-align: center;vertical-align:top;padding-top:38px" class="<?php if($section == $row_menu['link']){ echo 'selected';}?>" >
<!--                    <a href="index.php" style="text-decoration: none;display: inline-block;
    width: 100%;height: 100%;"> -->
                    <?php

                    //for disable link
                      
                     
                      

                    ?>

                    <a href="<?php 
      

                      if(isset($alignedCat[$row_menu['link']])){
                        if($global_lang == "en"){
                          $outPutAlign = "en-".$alignedCat[$row_menu['link']];
                        }else{
                          $outPutAlign = $alignedCat[$row_menu['link']];
                        }
                          
                        echo  $outPutAlign;
                        
                      }
                      elseif($row_menu['link']=="Back"){
                        echo 'index.php';
                      }
                     
                      else{
                        
                        echo  '?section='.$row_menu['link'];
                      }
                      
                      
                      ?>" class="menu_item "  style="text-decoration: none;display: inline-block;
    width: 100%;height: 100%;">

                      <?php
                      //for disable link
                    
                      ?>

                      <?php
                        //get section name
                        if($section == $row_menu['link']){
                            $selectedSection_name=$row_menu[$section_name];
                        } //if($section == $row_menu['link']){  
                        //end get section name
                      ?>
                <p style="color: #979797;"><b><?php echo $row_menu[$section_name];?></b></p>
                 <?php

                        //for disable link
                     
                     
                      

                    ?>
                 </a>
                 <?php
                            //for disable link
                   
                        // echo $row_menu['link'];
                     

                          ?>
                        
              </li>
               <?php } while ($row_menu = mysql_fetch_assoc($sql_menu));?>


         <!--       <li style="margin-left: 3%;width: 8%;height: 114px;display: inline-block;text-align: center;vertical-align:top;padding-top:38px"  >
                 
                <p style="color: #979797;"><b>網站首頁</b></p>
                 
              </li>
             
               <li style="width: 8%;height: 114px;display: inline-block;margin-top: 0px;text-align: center;padding-top:38px;" >
                <p style="color: #979797;"><b>疫苗</b></p>
              </li>
 -->
              <!-- <li style="width: 8%;height: 114px;display: inline-block;text-align: center;padding-top:38px;" > -->
                <!-- <a href="nchmc.php" style="text-decoration: none">  -->
                  <!-- <p style="color: #979797;"><b>診症</b></p> -->
                  <!-- </a> -->
            <!--   </li>
              <li style="width: 8%;height: 114px;display: inline-block;text-align: center;padding-top:38px;" >
                  <p style="color: #979797;"><b>兒科知識</b></p>
              </li>
              <li style="width: 8%;height: 114px;display: inline-block;text-align: center;padding-top:38px;" >
                  <p style="color: #979797;"><b>醫療團隊</b></p>
              </li>
              <li style="width: 8%;height: 114px;display: inline-block;text-align: center;padding-top:38px;" >
                  <p style="color: #979797;"><b>查詢預約</b></p>
              </li>
              <li style="width: 8%;height: 114px;display: inline-block;text-align: center;padding-top:38px;" >
                  <p style="color: #979797;"><b>診所環境</b></p>
              </li>
              <li style="width: 8%;height: 114px;display: inline-block;text-align: center;padding-top:38px;" >
                <a href="index.php" style="text-decoration: none;display: inline-block;
    width: 100%;height: 100%;">
                  <p style="color: #979797;"><b>返回主頁</b></p>
                </a>
              </li> -->
              
             <a href="<?php 
          function remove_querystring_var($url, $key) { 
          $url = preg_replace('/(.*)(?|&)' . $key . '=[^&]+?(&)(.*)/i', '$1$2$4', $url . '&'); 
          $url = substr($url, 0, -1); 
          return $url; 
        }   

          if(isset($outPutAlignGobalSwitch))
            echo $outPutAlignGobalSwitch;
          else{
            // echo '/'.$current_path."3".$lang_switch.$other_lang;
            // echo '/'.$_SERVER['REQUEST_URI'].$current_path.$lang_switch.$other_lang;
            // echo 'http://' . $_SERVER['HTTP_HOST'] .$_SERVER['REQUEST_URI'].$lang_switch.$other_lang;
            // echo $current_path."&lang=tc";
            //  $uri_parts = explode('?', $_SERVER['REQUEST_URI'], 2);
            // $request_uri = $uri_parts[0];
            // $countPart=0;
            // foreach($uri_parts as $uri_data){
            //     if($countPart==0){
            //       echo "?";
            //     }
            //     else{
            //        echo "&";
            //     }
            //     if (!strpos($uri_data,'&lang=') !== false) {
            //       echo $uri_data;
            //     }
            //     $countPart=$countPart+1;
            // }
            $url1=remove_querystring_var( $_SERVER['REQUEST_URI'],"lang");
            echo $url1."&lang=tc";
          }  
            // echo $_SERVER['REQUEST_URI']."&lang=tc";
            // if(isset($_GET['hcat_id'])){
            //     echo "&hcat_id=".$_GET['hcat_id'];
            // }
            // if(isset($_GET['hcat_id'])){
            //     echo "&hcat_id=".$_GET['hcat_id'];
            // }
      
      ?>" class="menu_item" <?php 
          // if($global_lang == 'en'){ echo 'style="font-size:17px;"';} else {
        // echo 'style="padding: 0 20px"';
      // }
          echo 'style="text-decoration:none;"';
      ?>
      >
             <div style="width: 1.8%;height: 114px;display: inline-block;text-align: center;padding-top:38px;margin-left: 1.3%" >
                <p style="color: #979797;">  
                <b>
                <?php
                        echo "繁";
                ?>
                <!-- <?php echo TXT_OTHER_LANG."2";?> -->
                </b>
                </p>
              </div>
            </a>
              <a href="<?php 
          if(isset($outPutAlignGobalSwitch))
            echo $outPutAlignGobalSwitch;
          else{


            // echo '/'.$current_path."3".$lang_switch.$other_lang;
            // echo '/'.$_SERVER['REQUEST_URI'].$current_path.$lang_switch.$other_lang;
            // echo 'http://' . $_SERVER['HTTP_HOST'] .$_SERVER['REQUEST_URI'].$lang_switch.$other_lang;
            // echo $current_path."&lang=sc";
            $url1=remove_querystring_var( $_SERVER['REQUEST_URI'],"lang");
            echo $url1."&lang=sc";
          }
      
      ?>" class="menu_item" <?php 
          // if($global_lang == 'en'){ echo 'style="font-size:17px;"';} else {
        // echo 'style="padding: 0 20px"';
      // }
          echo 'style="text-decoration:none;"';
      ?>>
             <div style="width: 1.8%;height: 114px;display: inline-block;text-align: center;padding-top:38px;margin-left: 0.5%" >
                <p style="color: #979797;">  
                <b>
                <?php
                        echo "簡";
                ?>
                <!-- <?php echo TXT_OTHER_LANG."2";?> -->
                </b>
                </p>
              </div>
            </a>

              <!-- <div style="width: 1.8%;height: 114px;display: inline-block;text-align: center;padding-top:38px;margin-left: 1.3%" >
                  <p style="color: #979797;"><b>繁</b></p>
              </div>
              <div style="width: 1.8%;height: 114px;display: inline-block;text-align: center;padding-top:38px;margin-left: 0.5%" >
                  <p style="color: #979797;"><b>簡</b></p>
              </div> -->
          </ul>

         

     </div>
  </div>
</div>  