<script src="https://kirkedal.de/wp-content/themes/kallyas-child/babylonjs/babylon.js"></script>
<script src="https://kirkedal.de/wp-content/themes/kallyas-child/babylonjs/babylonjs_new.loaders.min.js"></script>
<script src="https://kirkedal.de/wp-content/themes/kallyas-child/babylonjs/pep.js"></script>







<script src="https://kirkedal.de/wp-content/themes/kallyas-child/babylonjs/5.0.0-rc.4/babylon.js"></script>
<script src="https://kirkedal.de/wp-content/themes/kallyas-child/babylonjs/dat.gui.min.js"></script>
<script src="https://kirkedal.de/wp-content/themes/kallyas-child/babylonjs/ammo.js"></script>
<script src="https://kirkedal.de/wp-content/themes/kallyas-child/babylonjs/cannon.js"></script>
<script src="https://kirkedal.de/wp-content/themes/kallyas-child/babylonjs/Oimo.js"></script>
<script src="https://kirkedal.de/wp-content/themes/kallyas-child/babylonjs/earcut.min.js"></script>

<script src="https://kirkedal.de/wp-content/themes/kallyas-child/babylonjs/babylonjs.materials.min.js"></script>
<script src="https://kirkedal.de/wp-content/themes/kallyas-child/babylonjs/babylonjs.proceduralTextures.min.js"></script>
<script src="https://kirkedal.de/wp-content/themes/kallyas-child/babylonjs/babylonjs.postProcess.min.js"></script>
<script src="https://kirkedal.de/wp-content/themes/kallyas-child/babylonjs/babylonjs.loaders.js"></script>
<script src="https://kirkedal.de/wp-content/themes/kallyas-child/babylonjs/babylonjs.serializers.min.js"></script>
<script src="https://kirkedal.de/wp-content/themes/kallyas-child/babylonjs/babylon.gui.min.js"></script>
<script src="https://kirkedal.de/wp-content/themes/kallyas-child/babylonjs/babylon.inspector.bundle.js"></script>
<!--<script src="https://cdn.babylonjs.com/babylon.js"></script>
        <script src="https://cdn.babylonjs.com/loaders/babylonjs.loaders.min.js"></script>
        <script src="https://code.jquery.com/pep/0.4.3/pep.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/dat-gui/0.6.2/dat.gui.min.js"></script>
        <script src="https://preview.babylonjs.com/ammo.js"></script>
        <script src="https://preview.babylonjs.com/cannon.js"></script>
        <script src="https://preview.babylonjs.com/Oimo.js"></script>
        <script src="https://preview.babylonjs.com/earcut.min.js"></script>
        <script src="https://preview.babylonjs.com/babylon.js"></script>
        <script src="https://preview.babylonjs.com/materialsLibrary/babylonjs.materials.min.js"></script>
        <script src="https://preview.babylonjs.com/proceduralTexturesLibrary/babylonjs.proceduralTextures.min.js"></script>
        <script src="https://preview.babylonjs.com/postProcessesLibrary/babylonjs.postProcess.min.js"></script>
        <script src="https://preview.babylonjs.com/loaders/babylonjs.loaders.js"></script>
        <script src="https://preview.babylonjs.com/serializers/babylonjs.serializers.min.js"></script>
        <script src="https://preview.babylonjs.com/gui/babylon.gui.min.js"></script>
        <script src="https://preview.babylonjs.com/inspector/babylon.inspector.bundle.js"></script>-->
<style>
  .calculator-box.calculator-3 .ccb-text-box img,
  .calculator-box.calculator-4 .ccb-text-box img,
  .calculator-box.calculator-5 .ccb-text-box img,
  .calculator-box.calculator-6 .ccb-text-box img,
  .calculator-box.calculator-7 .ccb-text-box img {
    height: 200px;
    object-fit: contain;
  }

  .terrassebræts.product_item p {
    min-height: 50px;
  }

  html {
    overflow: scroll;
    overflow-x: hidden;
  }

  ::-webkit-scrollbar {
    width: 0;/ Remove scrollbar space / background: transparent;/ Optional: just make scrollbar invisible /
  }

  / Optional: show position indicator in red /::-webkit-scrollbar-thumb {
    background: #FF0000;
  }

  #embed-host {
    display: none;
  }

  #gift-wrap-option1 {
    position: fixed;
    top: 50% !important;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 500px;
  }

  .custom_radio_button {
    display: flex;
    width: 25%;
    float: none;
    margin: auto;
  }

  .custom_glb_type {
    width: 25%;
    margin-top: 5px !important;
    margin-bottom: 0;
  }

  .custom_height {
    width: 25%;
    /* padding: 15px !important;*/
    margin: 0;
  }

  .custom_radio_button input {
    margin-left: 5px;
  }

  .custom_radio_button label {
    margin-left: 5px;
  }

  #popupBoxCloseengraving {
    background: #367b11;
    border: none;
    font-weight: 700;
    font-size: 22px;
  }

  .custom_ok_button {
    background-color: rgb(54 123 17) !important;
    width: 12% !important;
    padding: 8px;
    color: #fff;
    font-size: 17px;
    border: none;
  }

  .gift-wrap-option {
    background: #ffffff none repeat scroll 0 0;
    border-radius: 12px;
    box-shadow: 0 0 19px #474747;
    display: none;
    font: 400 14px/24px Helvetica, sans-serif;
    /*left: 15.5%;*/
    left: 24%;
    margin: 0;
    min-height: 235px;

    padding: 0;
    position: fixed;

    /* top: 0px !important;*/
    top: 25% !important;
    /*width: 69%;*/
    width: 52%;
    z-index: 999999999;
    display: flex;
    flex-wrap: wrap;
  }

  .shield-engraving {
    background: none repeat scroll 0 0 #333333;
    height: 100%;
    left: 0;
    top: 0;
    width: 100%;
    z-index: 1000;
  }

  .close-popup {
    color: #000 !important;
    float: right !important;
    font-size: 21px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    opacity: 0.2 !important;
    text-shadow: 0 1px 0 #fff;
    cursor: pointer !important;
    padding: 1px 9px !important;
    margin: 0px !important;
    box-sizing: border-box !important;
    font: 400 14px/24px Helvetica, sans-serif !important;
  }

  #ModalTitle,
  .ModalTitle {
    font: 400 14px/24px Helvetica, sans-serif;
    min-height: 40px;
    width: 100%;

    background: #367b11;
    border-bottom: 1px solid #fff;
    border-radius: 7px 7px 0 0;
    color: #fff;

    padding: 1%;
    text-align: left;

    height: 20px;
  }

  div#ModalButtonRow1 {
    width: 100%;
    margin: 5px auto;
    text-align: center;
  }

  #ModalButtonRow,
  .ModalButtonRow {
    background: #fff none repeat scroll 0 0;
    border-radius: 0 0 7px 7px;
    border-top: 1px solid #e5e5e5;
    min-height: 12.43px;
    padding: 1%;
    text-align: right;
    width: 98%;
    position: absolute;
    bottom: 0;
  }

  #ModalButtonRow .Button {
    background: #57ad68 none repeat scroll 0 0;
    border: 1px solid #439f55;
    border-radius: 2px;
    box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2) inset;
    color: #fff !important;
    cursor: pointer;
    display: inline-block;
    font-size: 14px;
    line-height: 24px !important;
    margin: 0 5px 0 0;
    opacity: 1 !important;
    padding: 4px 12px !important;
    position: relative;
    text-align: center;
    text-decoration: none;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    text-transform: lowercase;
    white-space: nowrap;
    width: 70px;
  }

  .cleardiv {
    clear: both;
  }

  .renderCanvas {
    height: 800px;
  }

  .calculator-box.calculator-7 .product_item {
    border: 1px solid rgb(244, 244, 244);
  }

  @media screen and (max-width:767px) {
    .renderCanvas {
      height: 350px;
    }

    .mouse_gest {
      display: none;
    }
  }

  .d3d-width {
    width: 100%;
  }
</style>
<style type="text/css">
  @media screen and (max-width: 1400px) {
    .calculator-8 .col-4 {
      /* min-width: 588px;*/
    }
  }

  @media screen and (max-width: 1800px) {
    .calculator-8 .col-4 {
      /*  min-width: 588px;*/
    }
  }

  .cursorpointer {
    cursor: pointer;
  }

  .btn_next {
    float: right;
    border: 1px solid #f2f2f2 !important;
    border-radius: 0;
    background: #f2f2f2;
    margin: 6px 5px;
    height: 38px;
    font-weight: bold;
  }

  body {
    outline: none;
    padding: 0px;
    margin: 0px;
    font-family: Roboto;
  }

  :focus {
    outline: none;
  }

  button:focus {
    outline: none;
  }

  select:focus {
    outline: none;
  }

  a:focus {
    outline: none;
  }

  img {
    border: none;
  }

  * {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
  }

  :after,
  :before {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box
  }

  img {
    max-width: 100%;
    display: block;
  }

  a {
    text-decoration: none;
  }

  a:hover {
    text-decoration: none;
  }

  img {
    margin: 0px;
    display: block;
  }

  ul,
  ol {
    margin: 0px;
    padding: 0px;
    list-style: none;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    margin: 0px;
    font-weight: normal;
  }

  a:focus {
    text-decoration: none;
  }

  p {
    padding: 0;
    margin: 0;
  }

  .calculator-contact-box {
    width: 100%;
    float: left;
    display: flex;
  }

  .col-8 {
    width: 65%;
    float: left;
    display: flex;
  }

  .col-4 {
    width: 35%;
    float: left;
    display: flex;
  }

  .ccb-text {
    background-color: #f4f4f4;
    width: 100%;
    padding-bottom: 80px;
  }

  .ccb-list {
    background-color: #fafafa;
    width: 100%;
  }

  .ccb-text-box {
    margin: auto;
    width: 80%;
    display: table;
  }

  .ccb-list-box {
    margin: auto;
    width: 90%;
    display: table;
  }

  .ccb-list .ccb-list-box ul {

    margin-top: 15px;
    margin-bottom: 15px;
  }

  .ccb-text-box h2 {
    /*font-size:36px;*/
    font-size: 26px;
    font-weight: 500;
    color: #000;
    margin: 21px 0 2px;
    text-transform: uppercase;
    margin-bottom: 30px;
  }

  .ccb-list-box h2 {
    font-size: 36px;
    font-weight: 500;
    color: #000;
    margin: 50px 0;
    width: 100%;
    float: left;
    text-align: center;
    text-transform: uppercase;
  }

  .vaelg-form {
    width: 100%;
    /*float:left;*/
    margin: auto;
    display: table;
  }

  .vaelg-form ul {
    margin: auto;
    display: table;
    width: 70%;
  }

  .vaelg-form ul li {
    width: 49%;
    padding: 15px;
    float: left;
    border: 1px solid #ddd;
    margin: 2px;
  }

  .vaelg-form ul li:hover {
    /*border: 3px solid #000;*/
    box-shadow: 0px 1px 1px 1px #5a5a5a8f;
  }

  .vaelg-form ul li img {
    cursor: pointer;
    mix-blend-mode: darken;
    object-fit: contain;
  }

  .ccb-list-box ul {
    float: left;
    width: 100%;
  }

  .ccb-list-box ul li span {
    margin: auto 0 auto 20px;
    float: left;
    width: 80%;
    font-size: 16px;
    font-weight: 600;
  }

  .ccb-list-box ul li {
    height: 64px;
    width: 100%;
    background-color: #fff;
    display: flex;
    box-shadow: 0 6px 5px #DFDFDF;
    margin: 0 0 10px;
    opacity: 0.6;
    cursor: no-drop;
  }

  .ccb-list-box ul li.active-list {
    opacity: 1;
    cursor: pointer;
  }

  .ccb-list-box ul li img {
    float: right;
    display: none;
  }

  .ccb-list-box ul li.active-list img {
    display: block;
  }

  .id-box-50 {
    width: 33.33%;
    float: left;
    display: table;
    margin-bottom: 50px;
  }

  .df-row .w-50 {
    width: 50%;
    float: left;
    padding: 20px;
  }

  .dimensioner-form {
    width: 100%;
    float: left;
  }

  .indsaet-dimensioner {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .ccb-text .ccb-text-box .indsaet-dimensioner {
    /*padding: 100px 0px 0px 0px;*/
  }

  .indsaet-dimensioner_image_wrap {
    border: 1px solid #e1e1e1;
    margin: auto 10px;
  }

  .indsaet-dimensioner_input_wrap {
    margin: auto 10px;
  }

  .df-row label {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .df-row .form-control {
    height: 35px;
    border-radius: 0;
    border: 1px solid #d7d7d7;
    background: #fff;
    float: left;
    margin: 0px;
    width: 75%;
  }

  .df-row span {
    height: 35px;
    border-radius: 0;
    float: left;
    border: 1px solid #d7d7d7;
    text-align: center;
    line-height: 35px;
    width: 25%;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
    background: #f4f4f4;
  }

  .df-row {
    width: 65%;
    float: left;
    padding: 0 40px;
  }

  textarea:focus,
  input[type="text"]:focus,
  input[type="password"]:focus,
  input[type="datetime"]:focus,
  input[type="datetime-local"]:focus,
  input[type="date"]:focus,
  input[type="month"]:focus,
  input[type="time"]:focus,
  input[type="week"]:focus,
  input[type="number"]:focus,
  input[type="email"]:focus,
  input[type="url"]:focus,
  input[type="search"]:focus,
  input[type="tel"]:focus,
  input[type="color"]:focus,
  .uneditable-input:focus {
    box-shadow: 0 0 0;
    border-color: #777;
  }

  .id-box-50 img {
    /*margin:40px auto;*/
    margin: 0px auto;
    margin-bottom: 4px;
    mix-blend-mode: darken;
    object-fit: contain;
  }

  @keyframes hover-color {
    from {
      border-color: #c0c0c0;
    }

    to {
      border-color: #3e97eb;
    }
  }

  .magic-radio,
  .magic-checkbox {
    position: absolute;
    display: none;
  }

  .magic-radio[disabled],
  .magic-checkbox[disabled] {
    cursor: not-allowed;
  }

  .magic-radio+label,
  .magic-checkbox+label {
    position: relative;
    display: block;
    padding-left: 30px;
    cursor: pointer;
    vertical-align: middle;
    font-size: 16px;
    color: #000;
  }

  .magic-radio+label:hover:before,
  .magic-checkbox+label:hover:before {
    animation-duration: 0.4s;
    animation-fill-mode: both;
    animation-name: hover-color;
  }

  .magic-radio+label:before,
  .magic-checkbox+label:before {
    position: absolute;
    top: 0;
    left: 0;
    display: inline-block;
    width: 20px;
    height: 20px;
    content: '';
    border: 1px solid #c0c0c0;
  }

  .magic-radio+label:after,
  .magic-checkbox+label:after {
    position: absolute;
    display: none;
    content: '';
  }

  .magic-radio[disabled]+label,
  .magic-checkbox[disabled]+label {
    cursor: not-allowed;
    color: #e4e4e4;
  }

  .magic-radio[disabled]+label:hover,
  .magic-radio[disabled]+label:before,
  .magic-radio[disabled]+label:after,
  .magic-checkbox[disabled]+label:hover,
  .magic-checkbox[disabled]+label:before,
  .magic-checkbox[disabled]+label:after {
    cursor: not-allowed;
  }

  .magic-radio[disabled]+label:hover:before,
  .magic-checkbox[disabled]+label:hover:before {
    border: 1px solid #000;
    animation-name: none;
  }

  .magic-radio[disabled]+label:before,
  .magic-checkbox[disabled]+label:before {
    border-color: #e4e4e4;
  }

  .magic-radio:checked+label:before,
  .magic-checkbox:checked+label:before {
    animation-name: none;
  }

  .magic-radio:checked+label:after,
  .magic-checkbox:checked+label:after {
    display: block;
  }

  .magic-radio+label:before {
    border-radius: 50%;
  }

  .magic-radio+label:after {
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #000;
  }

  .magic-radio:checked+label:before {
    border: 1px solid #3e97eb;
  }

  .magic-radio:checked[disabled]+label:before {
    border: 1px solid #000;
  }

  .magic-radio:checked[disabled]+label:after {
    background: #c9e2f9;
  }

  .magic-checkbox+label:before {
    border-radius: 3px;
  }

  .magic-checkbox+label:after {
    top: 2px;
    left: 7px;
    box-sizing: border-box;
    width: 6px;
    height: 12px;
    transform: rotate(45deg);
    border-width: 2px;
    border-style: solid;
    border-color: #fff;
    border-top: 0;
    border-left: 0;
  }

  .magic-checkbox:checked+label:before {
    border: #3e97eb;
    background: #3e97eb;
  }

  .magic-checkbox:checked[disabled]+label:before {
    border: #c9e2f9;
    background: #c9e2f9;
  }

  .vaelg-tilbehor-1 {
    /*width:100%;*/
    padding: 0 15px;
    float: left;
    /*margin:50px 0;*/
  }

  .vaelg-tilbehor-1-img {
    width: 33.333%;
    float: left;
    text-align: center;
  }

  .vaelg-tilbehor-1-img img {
    margin: 15px auto;
  }

  .vaelg-tilbehor-1-img p {
    font-size: 16px;
    color: #000;
  }

  .vaelg-tilbehor-2 {
    float: left;
    width: 100%;
    border: 1px solid #000;
    border-right: none;
    display: flex;
    padding: 0 0 0 20px;
  }

  .vaelg-tilbehor-2 span {
    font-size: 16px;
    line-height: 50px;
    width: 20%;
    color: #000;
  }

  .vaelg-tilbehor-gup {
    width: 20%;
    float: left;
    border-right: 1px solid #000;
    padding: 15px 10px 0;
  }

  .vaelg-tilbehor-gup small {
    font-size: 10px;
  }

  .vaelg-tilbehor-3 {
    float: left;
    width: 100%;
    text-align: center;
    margin: 50px 0;
  }

  .vaelg-tilbehor-3 p {
    width: 100%;
    float: left;
    padding: 0 0 50px;
    font-size: 16px;
    color: #000;
  }

  .vaelg-tilbehor-3 button {
    background: #e8e828;
    border: none;
    padding: 15px 50px;
    text-transform: uppercase;
    font-size: 20px;
  }

  .total-row {
    width: 90%;
    margin: auto;
    display: table;
    padding: 30px 0;
  }

  .te-price {
    width: 100%;
    float: left;
    text-align: center;
    font-size: 19px;
    text-transform: uppercase;
    font-weight: 600;
    color: #000;
  }

  .te-price span {
    font-size: 36px;
    line-height: normal;
    padding: 0 15px;
    color: #367b11;
    font-weight: 400;
  }

  .button-row {
    width: 100%;
    float: left;
    margin-top: 40px;
  }

  .button-row button {
    width: 44%;
    float: left;
    margin: 0 3%;
    background: #e8e828;
    border: none;
    padding: 15px 0;
    font-size: 16px;
  }

  .show-3d {
    width: 100%;
    float: left;
  }

  .show-3d h3 {
    width: 100%;
    float: left;
    text-align: center;
    font-size: 66px;
    margin: 20px 0;
    line-height: initial;
  }

  .show-3d .show-3d-box {
    margin: auto;
    display: table;
    width: 100%;
  }

  .show-3d .show-3d-box img {
    margin: auto;
  }

  .tbl_custom_data {
    width: 100%;
    /*float:none;
  margin:auto;
  padding:70px 0;
  display:table;*/
  }

  .tbl_custom_data th,
  .tbl_custom_data td {
    border-bottom: 1px solid #999;
    text-align: left;
    padding: 8px;
    font-size: 14px;
  }

  .tbl_custom_data p {
    font-size: 18px;
    padding: 20px 0;
    line-height: 30px;
  }

  .tbl_custom_data span {
    padding: 0 50px;
    font-size: 14px;
  }

  .serie-alu-hegn {
    float: left;
    width: 100%;
    background-color: #fff;
    box-shadow: 4px 6px 16px #DFDFDF;
    margin: 7px 0 10px;
    padding: 30px 40px;
    min-height: 440px;
  }

  .serie-alu-hegn .serie-img {
    float: left;
    width: 46%;
    margin: 2%;
  }

  .serie-alu-hegn .serie-img img {
    width: 100%;
  }

  .site-content .container {
    width: 100%;
    padding: 0px;
  }

  .modal-vo {
    display: none !important;
  }

  /*.col_AFSTAND{	float: left;height: 150px;width: 150px;padding: 3px;border: 1px solid #817e7e;margin: 7px;}*/
  .col_AFSTAND {
    /*border: 1px solid #ddd;padding: 5px;margin: 3px 3px 3px 3px;width: 48%;background-color: #fff;*/
  }

  /*.col_AFSTAND img{    height: 87%;
    width: 100%;}*/
  .col_AFSTAND img {
    /*height: 150px;
    width: auto;
    /* max-width: unset; */
    margin: 0 auto;
    */
  }

  .col_AFSTAND label {
    font-size: 23px;
  }

  .product_opselect {
    border: 1px solid #ddd;
    padding: 15px;
    margin: 2px 2px 2px 2px;
    width: 49% !important;
  }

  .Tilbehør label {
    font-size: 14px;
    text-align: center;
  }

  .terrassebræts {
    /* border: 1px solid #ddd;*/
    padding: 5px;
    margin: 3px 3px 3px 3px;
    width: 32.333333%;
    min-height: 194px;
  }

  .labelter {
    font-size: 23px !important;
    margin-bottom: 0px;
    height: 40px;
  }

  .wqs_size1 {
    cursor: pointer;
    max-height: 85%;
    /*height: 186.9px; */
    width: 100%;
    max-width: 194px;
    /*  margin: 40px auto;*/
    margin: 0px auto;
    margin-bottom: 4px;

    mix-blend-mode: darken;
    /*max-height:94px;*/
    object-fit: contain;

  }

  @media screen and (max-width: 1400px) {
    .df-row {
      padding: 0 6px;
    }
  }

  @media screen and (max-width:1800px) {
    .Tilbehør {
      width: 29%;
    }

    .col_AFSTAND label {
      font-size: 16px;
      text-align: center;
    }

    .terrassebræts label {
      font-size: 17px;
    }

    .df-row label {
      font-size: 14px;
      margin-bottom: 2px;
    }

    .df-row {
      width: 65%;
      float: left;
      padding: 0 9px;
    }

    .button-row button {
      font-size: 13px;
    }

    .ccb-text-box h2 {
      font-size: 26px;
    }

    .ccb-list-box h2 {
      font-size: 28px;
    }

    .show-3d h3 {
      font-size: 46px;
    }

    .terrassebræts {
      /*border: 1px solid #ddd;*/
      padding: 5px;
      margin: 3px 3px 3px 3px;
      width: 31.33%;
    }

    .labelter {
      font-size: 13px !important;
    }

    .labelter span {
      display: none;
    }


  }

  @media screen and (max-width:1200px) {
    .terrassebræts {
      /*border: 1px solid #ddd;*/
      padding: 5px;
      margin: 3px 3px 3px 3px;
      width: 46.33%;
      display: inline-grid;
    }

    .labelter {
      font-size: 13px !important;
    }

    .labelter span {
      display: none;
    }

    .col-8 {
      width: 58%;
    }

    .vaelg-form ul li {
      width: 32.23%;
    }

    .col-4 {
      width: 44%;
    }

    .col_AFSTAND {
      width: 47.333333%;
      height: 290px;
    }

    .indsaet-dimensioner {
      display: inline-block;
    }

    .button.btn.btn_nexttrigger {
      width: 90px !important
    }

    .vaelg-tilbehor-2 {
      display: inline-block;
      text-align: left;
      border: 1px solid #000 !important;
    }

    .vaelg-tilbehor-gup {
      width: 100%;
      float: left;
      border-right: none;
    }
  }

  @media screen and (max-width:1100px) {
    .col_AFSTAND {
      width: 47.333333%;
      display: inline-grid;
    }

    .vaelg-tilbehor-2 {
      float: left;
      width: 100%;
      border: 1px solid #000;
      border-right: none;
      display: inline-block;
      padding: 20px 60px;
      text-align: left;
    }
  }

  @media only screen and (max-width: 1024px) {
    .Tilbehør label {
      font-size: 11px;
    }

    .Tilbehør {
      width: 31%;
    }

    .col_AFSTAND {

      height: 259px;
    }

    .vaelg-form ul li {
      width: 47.23%;
    }
  }

  @media screen and (max-width:900px) {

    .col_AFSTAND {
      width: 47.333333%;
      display: inline-grid;
      height: 200px;
    }

    .id-box-50 {
      width: 100%;
    }

    .Tilbehør {
      height: auto !important;
      width: 45%;
      display: inline-grid;
    }

    .product_opselect {
      width: 48% !important;
      display: inline-grid;
    }
  }

  @media screen and (max-width:768px) {
    .te-price span {
      font-size: 37px !important;
      line-height: normal;

    }

    .button-row button {
      width: 96%;
    }
  }

  @media screen and (max-width:767px) {
    .col_AFSTAND {
      height: auto;
    }

    .Tilbehør {
      background-color: #fff;
    }

    .fenceAccessories {
      width: 65% !important;
      margin: 0 auto;
    }

    .col-4 {
      width: 100%;
      /* display: none;*/
    }

    .col-8 {
      width: 100%;
    }

    .row,
    .thumbnails {
      margin-left: 0;
      margin: 0;
    }

    .site-content {
      position: relative;
      margin: 0 0 20px;
    }

    .vaelg-tilbehor-1-img {
      width: 100%;
      float: left;
      text-align: center;
    }

    .modal-vo {
      display: block !important;
    }

    .desktop-vo {
      display: none !important;
    }

    .modal-vo .col-4 {
      width: 100%;
      display: block;
    }

    .calculator-contact-box {
      display: inline-block
    }

    .button-row button {
      width: 100%;
    }

    .vaelg-form ul li {
      width: 98%;
    }

    .calculator-box.calculator-2 .id-box-50 img {
      /*width: 60%;*/
      object-fit: contain;
    }

    .calculator-box.calculator-3 .id-box-50 {
      width: 50%;
    }

    .vaelg-tilbehor-1-img {
      width: 45%;
      float: left;
      text-align: center;
    }

    .ccb-list-box {
      width: 90%;
    }

    .te-price span {
      font-size: 0;
      padding: 0;
    }

    .button-row button {
      width: 100%;
      margin: 0;
    }

    .df-row .w-50 {
      width: 50%;
      padding: 0 4px;
    }

    .ccb-text-box h2 {
      font-size: 20px;
    }

    .calculator-box.calculator-4 .id-box-50 {
      width: 50%;
    }

    .vaelg-tilbehor-1 {
      padding: 0 0;
    }

    .vaelg-tilbehor-1-img p {
      font-size: 14px;
    }

    .tbl_custom_data p {
      font-size: 14px;
    }

    .col-md-3.product_item.product_opselect {
      border: 1px solid #ddd;
      padding-left: 6px;
      padding-right: 6px;
      margin: 2px 2px 2px 2px;
      width: 47% !important;
      float: left;
    }

    .terrassebræts {
      width: 46.33%;
      float: left;
    }

    .col-md-12 {
      width: 100%;
      float: left;
    }

    .col-md-4.product_item {
      width: 45% !important;
      margin: 6px 2% !important;
    }

    .Tilbehør {
      height: 240px;
      width: 47%;
      float: left;
    }

    .col-md-3.Tilbehør .acc22 {
      /*display: inline;*/
      font-size: 13px;
    }

    .col-md-3.Tilbehør .Tilbehørcheckbox {
      width: auto !important;
      height: 27px !important;
    }

    .ccb-text-box h2 {
      font-size: 16px;
    }

    .terrassebræts {
      /*border: 1px solid #ddd;*/
      padding: 5px;
      margin: 3px 3px 3px 3px;
      width: 31.33%;
    }

    .labelter {
      font-size: 10px !important;
    }
  }

  @media screen and (max-width:600px) {
    .tbl_custom_data table {
      border: 0;
    }

    .tbl_custom_data table thead {
      display: none;
    }

    .tbl_custom_data table tr {
      margin-bottom: 10px;
      display: block;
      border-bottom: 2px solid #ddd;
    }

    .tbl_custom_data table td {
      display: block;
      text-align: right;
      font-size: 13px;
      border-bottom: 1px dotted #ccc;
    }

    .tbl_custom_data table td:last-child {
      border-bottom: 0;
    }

    .tbl_custom_data table td:before {
      content: attr(data-label);
      float: left;
      text-transform: uppercase;
      font-weight: bold;
    }

    .ccb-text-box {
      width: 90%;
    }

    .tbl_custom_data th,
    .tbl_custom_data td {
      border-bottom: 1px solid #999;
      text-align: left;
      padding: 11px 0;
      font-size: 0;
      width: 100%;
    }
  }

  @media screen and (max-width:425px) {
    .fenceAccessories {
      width: 96% !important;
      margin: 0 auto;
    }

    .col_AFSTAND label {
      font-size: 15px;
    }
  }

  .bootstrap-dialog.type-primary .modal-header {
    background-color: #abab04;
  }

  .bootstrap-dialog .bootstrap-dialog-close-button {
    font-size: 20px;
    float: right;
    opacity: .9;
    filter: alpha(opacity=90);
  }

  .bootstrap-dialog .bootstrap-dialog-title {
    color: #fff;
    display: inline-block;
    font-size: 16px;
  }

  .modal-body {
    padding-top: 0px;
  }


  /*	@media screen and (max-width:1400px)
        {
        .terrassebræts{    border: 1px solid #ddd;padding: 5px;margin: 3px 3px 3px 3px;width: 31.33%;}
          .labelter{    font-size: 9px !important; }
          .labelter span{display: none;}	
        }
               @media screen and (max-width:1200px)
          .terrassebræts{    border: 1px solid #ddd;padding: 5px;margin: 3px 3px 3px 3px;width: 31.33%;}
          .labelter{    font-size: 9px !important; }
          .labelter span{display: none;}
        }
               @media only screen and (max-width: 1024px) {
          .terrassebræts{    border: 1px solid #ddd;padding: 5px;margin: 3px 3px 3px 3px;width: 31.33%;}
          .labelter{    font-size: 9px !important; }
          .labelter span{display: none;}
        }
        @media screen and (max-width:1000px)
        {
           .terrassebræts{    border: 1px solid #ddd;padding: 5px;margin: 3px 3px 3px 3px;    width: 29.33%;
    display: inline-grid;}
          .labelter{    font-size: 9px  !important;}
          .labelter span{display: none;}
        }*/
  /*@media only screen and (max-width: 1000px) {
          .terrassebræts{    border: 1px solid #ddd;padding: 5px;margin: 3px 3px 3px 3px;width: 31.33%;}
          .labelter{    font-size: 8px;}
        }*/


  .imggg {
    height: 337px;
    object-fit: contain;
    background: #fff;
  }


  @media screen and (max-width:1800px) {
    .imggg {
      height: 282px;
      object-fit: contain;
      background: #fff;
    }
  }

  @media screen and (max-width:1200px) {
    .imggg {
      height: 156px;
      object-fit: contain;
      background: #fff;
    }
  }

  @media screen and (max-width:1100px) {
    .imggg {
      height: 130px;
      object-fit: contain;
      background: #fff;
    }
  }

  @media screen and (max-width:900px) {
    .imggg {
      height: 168px;
      object-fit: contain;
      background: #fff;
    }

  }

  .calculator-2 .id-box-50 img {
    /*   width: 80%;*/
    object-fit: contain;
  }

  .df-row.activee .w-50 {
    margin-bottom: 11px;
  }

  .indsaet-dimensioner_input_wrap .df-row .w-50 {
    width: 100%;
    padding: 0;
  }

  @media screen and (max-width: 1400px) {
    .df-row .w-50 label {
      font-size: 11px;
    }
  }

  .dimention {
    width: 21%;
    font-size: 10px;
    margin: 0;
  }

  .row.vaelg-profil {
    margin: auto;
    display: table;
    width: 70%;
  }

  .col-md-3.product_opselect {
    width: 50%;
    padding: 15px;
    float: left;
    border: 1px solid #ddd;
    margin: 2px;
  }

  .col-md-6.product_item.product_opselect:hover {
    box-shadow: 0px 1px 1px 1px #5a5a5a8f;
  }

  .vaelg-profil {
    /*width: 100%;*/
    /* float: left; */
    /* margin: auto;*/
    display: table;
  }

  .col-md-4.product_item.col_AFSTAND:hover {
    box-shadow: 0px 1px 1px 1px #5a5a5a8f;
  }

  @media screen and (max-width: 1400px) {
    .calculator-7 .calculator-contact-box .ccb-text-box {
      /*margin: 22px 5px 14px 170px;*/
    }
  }

  @media screen and (max-width: 1800px) {
    .calculator-7 .calculator-contact-box .ccb-text-box {
      /* margin: 22px 5px 14px 200px;*/
    }
  }

  .calculator-7 .calculator-contact-box .ccb-text-box {
    /* margin: 0px 0px 10px 140px;*/
  }

  .button-row #printpdf {
    width: 43%;
    float: left;
    margin: 0px 1%;
    background: #FFF;
    border: none;
    padding: 15px 0;
    font-size: 16px;
    box-shadow: 0 6px 5px #dfdfdf;
  }

  .button-row #testdemo {
    width: 43%;
    float: left;
    margin: 20px 1%;
    background: #FFF;
    border: none;
    padding: 15px 0;
    font-size: 16px;
    box-shadow: 0 6px 5px #dfdfdf;
  }

  .button-row #testroter {
    width: 43%;
    float: left;
    margin: 20px 1%;
    background: #FFF;
    border: none;
    padding: 15px 0;
    font-size: 16px;
    box-shadow: 0 6px 5px #dfdfdf;
  }

  .button-row #fuldskaerm {
    width: 31%;
    float: left;
    margin: 0px 1%;
    background: #FFF;
    border: none;
    padding: 15px 0;
    font-size: 16px;
    box-shadow: 0 6px 5px #dfdfdf;
  }

  .button-row #nulstil {
    width: 20%;
    float: left;
    margin: 0px 1%;
    background: #FFF;
    border: none;
    padding: 15px 0;
    font-size: 16px;
    box-shadow: 0 6px 5px #dfdfdf;
  }

  @media screen and (max-width: 900px) {
    .calculator-7 .calculator-contact-box .ccb-text-box {
      margin: 0 auto;
    }
  }

  .calculator-box .col-4 h2 {
    display: none;
  }

  @media screen and (max-width: 1800px) {
    .ccb-list .ccb-list-box ul {
      padding: 60px 60px 0 60px;
    }
  }

  @media screen and (max-width: 1400px) {
    .ccb-list .ccb-list-box ul {
      padding: 60px 49px 0 49px;
    }
  }

  @media screen and (max-width: 1980px) and (min-width: 1800px) {
    .df-row {
      width: 65%;
      /* width: 100%; */
      float: left;
      padding: 0 9px;
    }
  }

  @media screen and (max-width: 1200px) {
    .indsaet-dimensioner .id-box-50 {
      width: 100%;
    }

    .df-row {
      width: 36%;
    }

    .vaelg-form ul li {
      width: 48%;
    }

    .product_opselect {
      border: 1px solid #ddd;
      padding: 15px;
      margin: 2px 2px 2px 2px;
      width: 48% !important;
      display: inline-block;
    }

    .calculator-7 .calculator-contact-box .ccb-text-box {
      /*  margin: 0px 0px 10px 80px;*/
    }
  }

  .calculator-box.calculator-8 .calculator-contact-box .col-8 .ccb-text-box {

    width: 100%;

  }

  .id-box-50 {
    width: 33.33%;
    float: left;
    display: table;
    /* margin: auto; */
  }

  .ccb-text-box .vaelg-profil {
    /* margin-top: 70px;*/
  }

  .stolper_selection_step_wrap {
    margin: 0 auto;
    float: unset;

  }

  img.topFence.cursorpointer {
    /*width: 65%;*/
    /*height:90px;*/
    /* margin: 40px auto;*/
    margin: 0px auto;
    margin-bottom: 4px;
    max-width: 194px;

    width: 65%;
    min-height: 94px;
    object-fit: contain;
  }

  .stolper_selection_step_wrap,
  .profile_selection_step_wrap {
    text-align: center;
  }

  .thilbor {
    margin: 0 auto;
    float: unset;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .cursurpointers {
    width: 60%;
  }


  @media screen and (min-width:1800px) {
    .ccb-list .ccb-list-box ul {
      padding: 15px 45px 0 45px;
    }

    .ccb-list-box ul li {
      height: 74px
    }

    .ccb-list-box ul li span {
      font-size: 20px;
    }

    /*.ccb-text-box h2{font-size: 26px;
    line-height: 60px;}*/
    .calculator-box.calculator-7 .total-tab-finel tr td {
      font-size: 18px;
      line-height: 24px;
    }
  }

  /*.id-box-50.Tilbehør.product_item.Strø {
    height: 305px;
}
@media screen and (mix-width:1440px) {
.id-box-50.Tilbehør.product_item.Strø {
    height: 180px;
}
}*/
  .custom_completionlist_chk_wrap span {
    float: unset;
    margin: 0;
  }

  .custom_completionlist_chk_wrap.active {
    display: inline-block !important;
    margin: 0 12px !important;
  }

  .acc_check_val {
    margin-top: 0px !important;
    margin-left: 10px !important;
  }

  @media screen and (max-width:768px) {
    .ccb-list .ccb-list-box ul {
      padding: 60px 0px 0 0px;
    }

    .df-row {
      width: 50%;
    }
  }
</style>

<input type="hidden" id="instanceCounti" value="0" />
<input type="hidden" id="instanceCountl" value="0" />
<input type="hidden" id="instanceCountu" value="0" />
<input type="hidden" id="squere" value="0" />
<input type="hidden" id="fencetype" name="fencetype" value="" />
<input type="hidden" id="msgarr" name="msgarr" value="" />
<input type="hidden" id="msgarr2" name="msgarr2" value="" />
<input type="hidden" id="msgarr3" name="msgarr3" value="" />
<input id="fencetype1" name="fencetype1" type="hidden" value="" />
<input id="row_url_1" name="row_url_1" type="hidden" value="" />
<input id="row_url_2" name="row_url_2" type="hidden" value="" />
<input id="row_url_3" name="row_url_3" type="hidden" value="" />
<input id="row_url_4" name="row_url_4" type="hidden" value="" />
<input id="flipfance" name="flipfance" type="hidden" value="0" />
<input id="rotarfance" name="rotarfance" type="hidden" value="0" />
<input id="f_color" name="f_color" type="hidden" value="0" />
<script type="text/javascript">
  var ready_for_pdf = false;
  var pdf_hidden_data = '';
  var skus = [{"2578":"2513052"},{"2577":"2513048"},{"2576":"2513045"},{"2575":"2513047"},{"2574":"2512988"},{"2573":"2513050"},{"2567":"2412510"},{"2566":"2412509"},{"2565":"2412508"},{"2564":"2412503"},{"2563":"2412502"},{"2562":"2412500"},{"2499":""},{"2429":"2403029"},{"2430":"2403031"},{"2431":"2403030"},{"2432":"2403033"},{"2433":"2403034"},{"2434":"2403032"},{"2424":""},{"2425":"2399087"},{"2426":"2399086"},{"2427":"2399085"},{"2423":""},{"2489":"2456368"},{"2487":"2456369"},{"2488":"2399089"},{"2428":"2399088"},{"2418":""},{"2419":"2399186"},{"2420":"2395226"},{"2421":"2395228"},{"2307":"2275640"},{"2309":"2273516"},{"2308":"2273515"},{"2214":""},{"2225":"2262790"},{"2226":"2262794"},{"2213":""},{"2223":"2262802"},{"2224":"2262806"},{"2212":""},{"2222":"2262796"},{"2221":"2262797"},{"2211":""},{"2220":"2262803"},{"2219":"2262807"},{"2210":""},{"2217":"2262799"},{"2218":"2262800"},{"2209":""},{"2215":"2262805"},{"2216":"2262808"},{"2249":"2297661"},{"1122":""},{"1307":"1826497"},{"1304":"1894083"},{"1123":""},{"1309":"1894084"},{"1312":"1826500"},{"2288":""},{"2289":"2310801"},{"2290":"2310800"},{"2291":"2310799"},{"2292":"2310789"},{"1141":"1869000"},{"1142":"1868999"},{"1139":"1869002"},{"1140":"1869001"},{"1253":"2019160"},{"2160":"2140918"},{"1851":"2294265"},{"1294":"2122784"},{"1252":"2019158"},{"1251":"2039152"},{"1262":"2085557"},{"1151":"1894082"},{"1244":"2020775"},{"2572":"1826540"},{"1150":"1882794"},{"1149":"1882793"},{"1133":"1841018"},{"1130":"1868998"}];
  var product_names = [{"id":2578,"title":"K2 Kirkedal Galv. Dobbeltl\u00e5ge - 2000x1780 mm"},{"id":2577,"title":"K2 Kirkedal Galv. Dobbeltl\u00e5ge - 2000x1365 mm"},{"id":2576,"title":"K2 Kirkedal Galv. Dobbeltl\u00e5ge - 2000x900 mm"},{"id":2575,"title":"K1 Kirkedal Galv. Dobbeltl\u00e5ge - 2000x1365 mm"},{"id":2574,"title":"K1 Kirkedal Galv. Dobbeltl\u00e5ge - 2000x900 mm"},{"id":2573,"title":"K1 Kirkedal Galv. Dobbeltl\u00e5ge - 2000x1780 mm"},{"id":2567,"title":"K2 Kirkedal Galv. L\u00e5ge - 1000x1780 mm"},{"id":2566,"title":"K2 Kirkedal Galv. L\u00e5ge - 1000x1365 mm"},{"id":2565,"title":"K2 Kirkedal Galv. L\u00e5ge - 1000x900 mm"},{"id":2564,"title":"K1 Kirkedal Galv. L\u00e5ge - 1000x1780 mm"},{"id":2563,"title":"K1 Kirkedal Galv. L\u00e5ge - 1000x1365 mm"},{"id":2562,"title":"K1 Kirkedal Galv. L\u00e5ge - 1000x900 mm"},{"id":2499,"title":"Kirkedal Stolpetop"},{"id":2429,"title":"Kirkedal Alu L\u00e5ge \u2013 900x1700 \u2013 Alu Anodized"},{"id":2430,"title":"Kirkedal Alu L\u00e5ge \u2013 900x1140 \u2013 Alu Anodized"},{"id":2431,"title":"Kirkedal Alu L\u00e5ge \u2013 900x1420 \u2013 Alu Anodized"},{"id":2432,"title":"Kirkedal Alu L\u00e5ge \u2013 900x1420 \u2013 Alu Black - Ral 9005"},{"id":2433,"title":"Kirkedal Alu L\u00e5ge \u2013 900x1140 \u2013 Alu Black - Ral 9005"},{"id":2434,"title":"Kirkedal Alu L\u00e5ge \u2013 900x1700 \u2013 Alu Black - Ral 9005"},{"id":2424,"title":"Kirkedal Stolpe til Kirkedal Gavl. Hegn"},{"id":2425,"title":"Kirkedal Stolpe til Kirkedal Gavl. Hegn"},{"id":2426,"title":"Kirkedal Stolpe til Kirkedal Gavl. Hegn"},{"id":2427,"title":"Kirkedal Stolpe til Kirkedal Gavl. Hegn"},{"id":2423,"title":"Kirkedal sideprofil"},{"id":2489,"title":"Kirkedal sideprofil"},{"id":2487,"title":"Kirkedal sideprofil"},{"id":2488,"title":"Kirkedal sideprofil"},{"id":2428,"title":"Kirkedal U-Top\/bundskinnes\u00e6t"},{"id":2418,"title":"Kirkedal hegnsprofil K3"},{"id":2419,"title":"Kirkedal hegnsprofil K3"},{"id":2420,"title":"Kirkedal hegnsprofil K3"},{"id":2421,"title":"Kirkedal hegnsprofil K3"},{"id":2307,"title":"Kirkedal Alu Design Light - K1 Hegnsprofil, Black"},{"id":2309,"title":"Kirkedal Alu Design Light - Top\/Bundskinne Light, Black"},{"id":2308,"title":"Kirkedal Alu Design Light - Stolpe, Black"},{"id":2214,"title":"Heimdal - 22x130 - Black\/Grey"},{"id":2225,"title":"Heimdal - 22x130 - Black\/Grey"},{"id":2226,"title":"Heimdal - 22x130 - Black\/Grey"},{"id":2213,"title":"Heimdal - 22x130 - Oak\/Hardwood"},{"id":2223,"title":"Heimdal - 22x130 - Oak\/Hardwood"},{"id":2224,"title":"Heimdal - 22x130 - Oak\/Hardwood"},{"id":2212,"title":"Heimdal - 22x200 - Black\/Grey"},{"id":2222,"title":"Heimdal - 22x200 - Black\/Grey"},{"id":2221,"title":"Heimdal - 22x200 - Black\/Grey"},{"id":2211,"title":"Heimdal - 22x200 - Oak\/Hardwood"},{"id":2220,"title":"Heimdal - 22x200 - Oak\/Hardwood"},{"id":2219,"title":"Heimdal - 22x200 - Oak\/Hardwood"},{"id":2210,"title":"Heimdal - 22x300 - Black\/Grey"},{"id":2217,"title":"Heimdal - 22x300 - Black\/Grey"},{"id":2218,"title":"Heimdal - 22x300 - Black\/Grey"},{"id":2209,"title":"Heimdal - 22x300 - Oak\/Hardwood"},{"id":2215,"title":"Heimdal - 22x300 - Oak\/Hardwood"},{"id":2216,"title":"Heimdal - 22x300 - Oak\/Hardwood"},{"id":2249,"title":"Heimdal Pr\u00f8vekasse"},{"id":1122,"title":"K1 Kirkedal hegnsprofil - \"Basic\" profiler med tr\u00e6struktur"},{"id":1307,"title":"K1 Kirkedal hegnsprofil - \"Basic\" profiler med tr\u00e6struktur"},{"id":1304,"title":"K1 Kirkedal hegnsprofil - \"Basic\" profiler med tr\u00e6struktur"},{"id":1123,"title":"K2 Kirkedal hegnsprofil - \"Basic\" profiler med tr\u00e6struktur"},{"id":1309,"title":"K2 Kirkedal hegnsprofil - \"Basic\" profiler med tr\u00e6struktur"},{"id":1312,"title":"K2 Kirkedal hegnsprofil - \"Basic\" profiler med tr\u00e6struktur"},{"id":2288,"title":"Completionlist Heimdal"},{"id":2289,"title":"Completionlist Heimdal"},{"id":2290,"title":"Completionlist Heimdal"},{"id":2291,"title":"Completionlist Heimdal"},{"id":2292,"title":"Completionlist Heimdal"},{"id":1141,"title":"Kirkedal Alu Design top\/bundskinne - Alu"},{"id":1142,"title":"Kirkedal Alu Design top\/bundskinne - Alu Black"},{"id":1139,"title":"Kirkedal K100 Alu Design Stolpe - Alu"},{"id":1140,"title":"Kirkedal K100 Alu Design Stolpe - Alu Black"},{"id":1253,"title":"L-beslag til K100 Alu stolper"},{"id":2160,"title":"T-Clips mit Schrauben, 50 \u00d7 40 mm - Schwarz"},{"id":1851,"title":"Kirkedal Alu Hegn VAREPR\u00d8VE"},{"id":1294,"title":"Reparationsmaling til sort pulverlakerede stolper"},{"id":1252,"title":"Stolpetop til K100 Alu stolper"},{"id":1251,"title":"Zinkspray"},{"id":1262,"title":"Bl\u00e6ndkappe til Kirkedal stolper"},{"id":1151,"title":"Montagekl\u00e6b"},{"id":1244,"title":"Kirkedal Farveforst\u00e6rker"},{"id":2572,"title":"Kirkedal Komposit Rens"},{"id":1150,"title":"Slutbeslag"},{"id":1149,"title":"Startbeslag"},{"id":1133,"title":"Clips 20x40mm"},{"id":1130,"title":"Lang bit TX15"}];
  var form_lengths = [];
  var form_widths = [];
  var selected_form_id = "";
  var switch_map_val = "0";
  var map_init = false;



  function PrintElem(elem) {
    Popup(jQuery(elem).html());
  }

  function Popup(data) {
    var mywindow = window.open('', 'my div', 'height=400,width=600');
    mywindow.document.write('<html><head><title>my div</title>');
    mywindow.document.write('</head><body >');
    mywindow.document.write(data);
    mywindow.document.write('</body></html>');

    mywindow.document.close(); // necessary for IE >= 10
    mywindow.focus(); // necessary for IE >= 10

    mywindow.print();
    mywindow.close();
    return true;
  }


</script>
<input type="hidden" value="" id="color" />
<input type="hidden" name="wqs_control_segment" id="wqs_control_segment" value="" />
<input type="hidden" value="" id="model" />
<input type="hidden" value="" id="colorHidden" />
<input type="hidden" value="" id="topmodel" />
<input type="hidden" value="" id="post" />
<input type="hidden" value="" id="led" />
<input type="hidden" value="" id="skruer" />
<input type="hidden" value="" id="postsize" />
<input type="hidden" value="" id="endekap" />
<!-- HIDDEN INPUT TYPE TOTAL-->
<input type="hidden" name="fencetype1" value="" id='fencetype1' />
<input type="hidden" name="clips_type" value="" id='clips_type' />
<!-- HIDDEN INPUT TYPE topprofile-->
<input type="hidden" name="topprofiletype1" value="" id='topprofiletype1' />
<!-- HIDDEN INPUT TYPE postsize-->
<input type="hidden" name="postsize1" value="" id='postsize1' />
<!-- HIDDEN INPUT TYPE endekaptype-->
<input type="hidden" name="endekaptype1" value="" id='endekaptype1' />
<div id='accordion'>
  <div id="map_div" style="height: 800px;display:none;">

    <!-- HIDDEN INPUT TYPE endekaptype-->
    <input id="endekaptype1" name="endekaptype1" type="hidden" value="" />
    <input id="switchMap" style="display: none;" name="switchMap" type="checkbox" value="Values or Map?" />
    <div id="angles_div" style="margin-top: 20px; float: left; min-width: 800px;"></div>
    <div id="lengths_div" style="margin-top: 20px; float: left; min-width: 800px;"></div>
    <div id="forms_table" style="display: none;"> </div>
  </div>
  <div class="calculator-box calculator-1">
    <div class="calculator-contact-box">
      <div class="col-8">
        <div class="ccb-text">
          <div class="ccb-text-box">
            <h2>Vælg form</h2>
            <div class="vaelg-form">
              <input id="wqs_control_segment" name="wqs_control_segment" type="hidden" value="" />
              <ul>
                <li data_id="1"><img src="https://kirkedal.de/wp-content/uploads/2021/07/opform1.png" alt="" title="">
                </li>
                <li data_id="2"><img src="https://kirkedal.de/wp-content/uploads/2021/07/opform2.png" alt="" title="">
                </li>
                <li data_id="3"><img src="https://kirkedal.de/wp-content/uploads/2021/07/opform3.png" alt="" title="">
                </li>
                <!--<li data_id="4"><img src="https://kirkedal.de/wp-content/uploads/2021/07/opform4.png" alt="" title=""></li>-->
              </ul>
            </div>
          </div>
        </div>
      </div>
      <div class="col-4">
        <div class="ccb-list">
          <div class="ccb-list-box">
            <h2>DIT VALG</h2>
            <ul>
              <li class="active-list "><span>1. Serie / Terrasse</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2023/04/calculator_img.jpg" alt="" title=""></li>
              <li id="Volgform"><span class="sidebar_calc_box1 ">2. Vælg form</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
              <li><span>3. Dimensioner</span>
                <!--<img src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title="">-->
              </li>
              <!-- <li><span>4. Vælg opsætningsretning</span> <img src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>-->
              <li><span>4. Vælg terrassebræts længde</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
              <li><span>5. Vælg strø afstand</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
              <li><span>6. Vælg afslutningsmuligheder</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
              <li><span>7. Tilbehør</span> <img src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg"
                  alt="" title=""></li>
            </ul>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="calculator-box calculator-2" style="display:none">
    <div class="calculator-contact-box">
      <div class="col-8">
        <div class="ccb-text">
          <div class="ccb-text-box">
            <h2>indsæt Dimensioner</h2>
            <div class="indsaet-dimensioner ">
              <div class="id-box-50 indsaet-dimensioner_image_wrap"> <img
                  src="https://kirkedal.de/wp-content/images/form3.jpg" alt="" title=""> </div>
              <div class="id-box-50 indsaet-dimensioner_input_wrap">
                <div class="dimensioner-form">
                  <div class="df-row" id="form1_1" style="display:none;">
                    <input class="hidPost" type="hidden" value="opform1">
                    <div class="w-50 ">
                      <label>Længde for part A </label>
                      <input class="form-control" type="number" name="Højde" id="Højde">
                      <span>mtr</span>
                    </div>
                    <div class="w-50 ">
                      <label>Længde for part B </label>
                      <input type="number" class="form-control" name="Laengde" id="Laengde">
                      <span>mtr</span>
                    </div>
                  </div>
                  <div class="df-row" id="form2_2" style="display:none;">
                    <input class="hidPost" type="hidden" value="opform2">
                    <div class="w-50 ">
                      <label>Længde for part A</label>
                      <input type="number" class="form-control">
                      <span>mtr</span>
                    </div>
                    <div class="w-50 ">
                      <label>Længde for part B</label>
                      <input type="number" class="form-control">
                      <span>mtr</span>
                    </div>
                    <div class="w-50 ">
                      <label>Længde for part C</label>
                      <input type="number" class="form-control">
                      <span>mtr</span>
                    </div>
                    <div class="w-50 ">
                      <label>Længde for part D</label>
                      <input type="number" class="form-control">
                      <span>mtr</span>
                    </div>
                    <div class="w-50 ">
                      <label>Længde for part E</label>
                      <input type="number" class="form-control">
                      <span>mtr</span>
                    </div>
                    <div class="w-50 ">
                      <label>Længde for part F</label>
                      <input type="number" class="form-control">
                      <span>mtr</span>
                    </div>
                  </div>
                  <div class="df-row" id="form3_3" style="display:none;">
                    <input class="hidPost" type="hidden" value="opform3">
                    <div class="w-50 ">
                      <label>Længde for part A</label>
                      <input type="number" class="form-control">
                      <span>mtr</span>
                    </div>
                    <div class="w-50 ">
                      <label>Længde for part B</label>
                      <input type="number" class="form-control">
                      <span>mtr</span>
                    </div>
                    <div class="w-50 ">
                      <label>Længde for part C</label>
                      <input type="number" class="form-control">
                      <span>mtr</span>
                    </div>
                    <div class="w-50 ">
                      <label>Længde for part D</label>
                      <input type="number" class="form-control">
                      <span>mtr</span>
                    </div>
                    <div class="w-50 ">
                      <label>Længde for part E</label>
                      <input type="number" class="form-control">
                      <span>mtr</span>
                    </div>
                    <div class="w-50 ">
                      <label>Længde for part F</label>
                      <input type="number" class="form-control">
                      <span>mtr</span>
                    </div>
                    <div class="w-50 ">
                      <label>Længde for part G</label>
                      <input type="number" class="form-control">
                      <span>mtr</span>
                    </div>
                    <div class="w-50 ">
                      <label>Længde for part H</label>
                      <input type="number" class="form-control">
                      <span>mtr</span>
                    </div>
                  </div>
                  <div class="df-row" id="form4_4" style="display:none;">
                    <input class="hidPost" type="hidden" value="opform4">
                    <div class="w-50 ">
                      <label>Længde for part A</label>
                      <input type="number" class="form-control">
                      <span>mtr</span>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div class="btn-center" style="
    float: left;
    width: 100%;
">
              <ul style="
    max-width: 300px;
    margin: auto;
    display: table;
    margin-top: 37px;
">
                <li style="float: left; margin-right: 20px;">
                  <a href="javascript:void(0)" class="button btn btn_tilbage" style="    float: left;
    background: #fff;
    border: 1px solid #e1e1e1 !important;
    padding: 8px 11px 11px 10px;
    width: 120px;
    border-radius: 0px;
    font-weight: 700;">Tilbage</a>
                </li>
                <li style="float: left;">
                  <a href="javascript:void(0)" class="button btn btn_nexttrigger" style="    float: left;
    background: #fff;
    border: 1px solid #e1e1e1 !important;
    padding: 8px 11px 11px 10px;
    width: 120px;
    border-radius: 0px;
    font-weight: 700;">Næste</a>
                </li>
              </ul>
            </div>
          </div>
        </div>
      </div>
      <div class="col-4">
        <div class="ccb-list">
          <div class="ccb-list-box">
            <h2>DIT VALG</h2>
            <ul>
              <li class="active-list"><span>1. Serie / Terrasse</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2023/04/calculator_img.jpg" alt="" title=""></li>
              <li class="active-list sidebar_calc_box1"><span>2. Vælg form</span> <img
                  src="https://kirkedal.de/wp-content/images/form3.jpg" alt="" title=""></li>
              <li><span>3. Dimensioner</span>
                <!--<img src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title="">-->
              </li>
              <!--<li><span>4. Vælg opsætningsretning</span> <img src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>-->
              <li><span>4. Vælg terrassebræts længde</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
              <li><span>5. Vælg afslutningsmuligheder</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
              <li><span>6. Vælg strø afstand</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
              <li><span>7. Tilbehør</span> <img src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg"
                  alt="" title=""></li>
            </ul>
          </div>
        </div>
      </div>
    </div>
    <button class="button btn btn_next"
      style="background: #fff;border: 1px solid #000 !important;padding: 8px 11px 11px 10px;width: 11%;display: none;">Næste</button>
  </div>
  <!--<div class="calculator-box calculator-3" style="display:none">
    <div class="calculator-contact-box">
      <div class="col-8">
        <div class="ccb-text">
          <div class="ccb-text-box">
            <h2>Vælg opsætningsretning</h2>
            <div class="row vaelg-profil">
              <style type="text/css">
              
            </style>
              <div class="col-md-6 product_item product_opselect" style=""> <img class="fenceImg cursorpointer" src="https://kirkedal.de/wp-content/uploads/2021/07/Terrasseformrektangel.jpg" alt="" title="">
                <input type="hidden" class="hidTop" value="Retning3">
              </div>
              <div class="col-md-6 product_item product_opselect"> <img class="fenceImg cursorpointer" src="https://kirkedal.de/wp-content/uploads/2021/07/Terrasseformrektangel3.jpg" alt="" title="">
                <input type="hidden" class="hidTop" value="Retning4">
              </div>
              <div class="col-md-6 product_item product_opselect"> <img class="fenceImg cursorpointer" src="https://kirkedal.de/wp-content/uploads/2021/07/Terrasseformrektangel2.jpg" alt="" title="">
                <input type="hidden" class="hidTop" value="Retning5">
              </div>
              <div class="col-md-6 product_item product_opselect" > <img class="fenceImg cursorpointer" src="https://kirkedal.de/wp-content/uploads/2021/07/Terrasseformrektangel.jpg" alt="" title="">
                <input type="hidden" class="hidTop" value="Retning6">
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="col-4">
        <div class="ccb-list">
          <div class="ccb-list-box">
            <h2>DIT VALG</h2>
            <ul>
              <li class="active-list"><span>1. Serie / Terrasse</span> <img src="https://kirkedal.de/wp-content/uploads/2023/04/calculator_img.jpg" alt="" title=""></li>
              <li class="active-list sidebar_calc_box1"><span>2. Vælg form</span> <img src="https://kirkedal.de/wp-content/images/form3.jpg" alt="" title=""></li>
              <li class="active-list sidebar_calc_box2"><span>3. Dimensioner</span> <b class="dimention" style="  ">A:5X6 B: 5X4 A:5X6 B: 5X4 A:5X6 B: 5X4</b></li>
              
              <li><span>4. Vælg opsætningsretning</span> <img src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
              <li><span>5. Vælg terrassebræts længde</span> <img src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
              <li><span>6. Vælg strø afstand</span> <img src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
              <li><span>7. Vælg afslutningsmuligheder</span> <img src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
              <li><span>8. Tilbehør</span> <img src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
            </ul>
          </div>
        </div>
      </div>
    </div>
      </div>-->
  <div class="calculator-box calculator-4" style="display:none">
    <div class="calculator-contact-box">
      <div class="col-8">
        <div class="ccb-text">
          <div class="ccb-text-box">
            <h2>Vælg terrassebræts længde</h2>
            <div class="vaelg-profil">
              <style type="text/css">

              </style>
              <div class="row" style="overflow-y: auto;height: 595px;margin: auto;/*width: 70%;*/">

                <div class="col-md-12">
                  <h2 style="margin: 10px 0px 5px;border-bottom: 1px solid #ddd;">Heimdal 6 mtr</h2>
                </div>
                <div class="col-md-4 terrassebræts product_item"> <img class="fenceImg wqs_size1" style=""
                    src="https://kirkedal.de/wp-content/uploads/2022/03/22x130-side-by-side-black-grey.jpg" alt=""
                    title="">

                  <input type="hidden" class="hidFence" value="v22x130x6" attr_mm="130" />
                  <input class="hidColor" type="hidden" value="Black">
                  <p style="text-align:center;">Heimdal 22X130mm Black/Grey</p>
                </div>
                <div class="col-md-4 terrassebræts product_item"> <img class="fenceImg wqs_size1" style=""
                    src="https://kirkedal.de/wp-content/uploads/2022/03/22x200-black-grey.jpg" alt="" title="">
                  <input type="hidden" class="hidFence" value="v22x200x6" attr_mm="200" />
                  <input class="hidColor" type="hidden" value="Black">
                  <p style="text-align:center;">Heimdal 22X200mm Black/Grey</p>
                </div>
                <div class="col-md-4 terrassebræts product_item"> <img class="fenceImg wqs_size1" style=""
                    src="https://kirkedal.de/wp-content/uploads/2022/03/22x300-black-grey.jpg" alt="" title="">
                  <input type="hidden" class="hidFence" value="v22x300x6" attr_mm="300" />
                  <input class="hidColor" type="hidden" value="Black">
                  <p style="text-align:center;">Heimdal 22X300mm Black/Grey</p>
                </div>
                <div class="col-md-4 terrassebræts product_item"> <img class="fenceImg wqs_size1" style=""
                    src="https://kirkedal.de/wp-content/uploads/2022/03/22x130-side-by-side.jpg" alt="" title="">
                  <input type="hidden" class="hidFence" value="v22x130x6" attr_mm="130" />
                  <input class="hidColor" type="hidden" value="Hardwood">
                  <p style="text-align:center;">Heimdal 22X130mm Oak/Hardwood</p>
                </div>

                <div class="col-md-4 terrassebræts product_item"> <img class="fenceImg wqs_size1" style=""
                    src="https://kirkedal.de/wp-content/uploads/2022/03/22x200-side-by-side.jpg" alt="" title="">
                  <input type="hidden" class="hidFence" value="v22x200x6" attr_mm="200" />
                  <input class="hidColor" type="hidden" value="Hardwood">
                  <p style="text-align:center;">Heimdal 22X200mm Oak/Hardwood</p>
                </div>

                <div class="col-md-4 terrassebræts product_item"> <img class="fenceImg wqs_size1" style=""
                    src="https://kirkedal.de/wp-content/uploads/2022/03/22x300-side-by-side.jpg" alt="" title="">
                  <input type="hidden" class="hidFence" value="v22x300x6" attr_mm="300" />
                  <input class="hidColor" type="hidden" value="Hardwood">
                  <p style="text-align:center;">Heimdal 22X300mm Oak/Hardwood</p>
                </div>
                <div class="col-md-4 "> </div>
                                                                                                                                                                                                                                
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="col-4">
        <div class="ccb-list">
          <div class="ccb-list-box">
            <h2>DIT VALG</h2>
            <ul>
              <li class="active-list"><span>1. Serie / Terrasse</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2023/04/calculator_img.jpg" alt="" title=""></li>
              <li class="active-list sidebar_calc_box1"><span>2. Vælg form</span> <img
                  src="https://kirkedal.de/wp-content/images/form3.jpg" alt="" title=""></li>
              <li class="active-list sidebar_calc_box2"><span>3. Dimensioner</span><b class="dimention" style="  ">A:5X6
                  B: 5X4 A:5X6 B: 5X4 A:5X6 B: 5X4</b></li>
              <!-- <li  class="active-list sidebar_calc_box3"><span>4. Vælg opsætningsretning</span> <img src="https://kirkedal.de/wp-content/uploads/2021/07/vaelg-profil-1.jpg" alt="" title=""></li>-->
              <li><span>4. Vælg terrassebræts længde</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
              <li><span>5. Vælg strø afstand</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
              <li><span>6. Vælg afslutningsmuligheder</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
              <li><span>7. Tilbehør</span> <img src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg"
                  alt="" title=""></li>
            </ul>
          </div>
        </div>
      </div>
    </div>
  </div>
  <style type="text/css">

  </style>
  <div class="calculator-box calculator-5" style="display:none">
    <div class="calculator-contact-box">
      <div class="col-8">
        <div class="ccb-text">
          <div class="ccb-text-box">
            <h2>Vælg strø afstand</h2>
            <div class="col-md-12 vaelg-profil stolper_selection_step_wrap">
                            <div class="id-box-50 product_item col_AFSTAND" style="">
                                <img class="topFence cursorpointer"
                  src="https://kirkedal.de/wp-content/uploads/2022/04/ingen_stroer.png" alt="" title="">
                <input type="hidden" class="hidEndekap" value="50cm">
                <p style="text-align:center;">Ingen strøer</p>
              </div>
                                        </div>
          </div>
        </div>
      </div>
      <div class="col-4">
        <div class="ccb-list">
          <div class="ccb-list-box">
            <h2>DIT VALG</h2>
            <ul>
              <li class="active-list"><span>1. Serie / Terrasse</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2023/04/calculator_img.jpg" alt="" title=""></li>
              <li class="active-list sidebar_calc_box1"><span>2. Vælg form</span> <img
                  src="https://kirkedal.de/wp-content/images/form3.jpg" alt="" title=""></li>
              <li class="active-list sidebar_calc_box2"><span>3. Dimensioner</span><b class="dimention" style="  ">A:5X6
                  B: 5X4 A:5X6 B: 5X4 A:5X6 B: 5X4</b></li>
              <!--  <li class="active-list sidebar_calc_box3"><span>4. Vælg opsætningsretning</span> <img src="https://kirkedal.de/wp-content/uploads/2021/07/vaelg-profil-1.jpg" alt="" title=""></li>-->
              <li class="active-list sidebar_calc_box4"><span>4. Vælg terrassebræts længde</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2021/07/vaelg-stolpestorrelse2.jpg" alt="" title=""></li>
              <li><span>5. Vælg strø afstand</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
              <li><span>6. Vælg afslutningsmuligheder</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
              <li><span>7. Tilbehør</span> <img src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg"
                  alt="" title=""></li>
            </ul>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="calculator-box calculator-6" style="display:none">
    <div class="calculator-contact-box">
      <div class="col-8">
        <div class="ccb-text">
          <div class="ccb-text-box">
            <h2>Vælg tilbehør</h2>
            <div class="col-md-12 vaelg-profil profile_selection_step_wrap thilbor">

              <div class="id-box-50 product_item col_AFSTAND">
                <img class="fencePostsize" style="cursor: pointer;" src="/wp-content/images/endekapper.jpg" />
                <input type="hidden" class="hidPostsize" value="Endekap3" />
                <p style="text-align:center;">Endekap</p>
              </div>
              <div class="id-box-50 product_item col_AFSTAND">
                <img class="fencePostsize" style="cursor: pointer; height: 117px; text-align: center;"
                  src="/wp-content/images/pimgpsh.jpg" />
                <input type="hidden" class="hidPostsize" value="Endekap4" />
                <p style="text-align:center;">Railstep</p>
              </div>
              <div class="id-box-50 product_item col_AFSTAND" style="">
                <img class="topFence cursorpointer" src="https://kirkedal.de/wp-content/images/ingen.jpg" alt=""
                  title="">
                <input type="hidden" class="hidPostsize" value="Endekapingen">
                <p style="text-align:center;">Ingen afslutning</p>
              </div>



            </div>
          </div>
        </div>
      </div>
      <div class="col-4">
        <div class="ccb-list">
          <div class="ccb-list-box">
            <h2>DIT VALG</h2>
            <ul>
              <li class="active-list"><span>1. Serie / Terrasse</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2023/04/calculator_img.jpg" alt="" title=""></li>
              <li class="active-list sidebar_calc_box1"><span>2. Vælg form</span> <img
                  src="https://kirkedal.de/wp-content/images/form3.jpg" alt="" title=""></li>
              <li class="active-list sidebar_calc_box2"><span>3. Dimensioner</span> <b class="dimention"
                  style="  ">A:5X6 B: 5X4 A:5X6 B: 5X4 A:5X6 B: 5X4</b></li>
              <!--<li class="active-list sidebar_calc_box3"><span>4. Vælg profil</span> <img src="https://kirkedal.de/wp-content/uploads/2021/07/vaelg-profil-1.jpg" alt="" title=""></li>-->
              <li class="active-list sidebar_calc_box4"><span>4. Vælg terrassebræts længde</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2021/07/vaelg-stolpestorrelse2.jpg" alt="" title=""></li>
              <li class="active-list sidebar_calc_box5"><span>5. Vælg strø afstand</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2021/07/vaelg-topprofil.jpg" alt="" title=""></li>
              <li class=""><span>6. Vælg afslutningsmuligheder</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
              <li><span>7. Tilbehør</span> <img src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg"
                  alt="" title=""></li>
            </ul>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="calculator-box calculator-7" style="display:none">
    <div class="calculator-contact-box">
      <div class="col-8">
        <div class="ccb-text">
          <div class="ccb-text-box">
            <h2>tilbehør</h2>
            <div class="vaelg-tilbehor">
              <style type="text/css">
                .Tilbehør {
                  /*border: 1px solid #ddd;padding: 5px;margin: 3px 3px 3px 3px; height: 270px;*/
                }

                .Tilbehørcheckbox {
                  /*width: 100% !important;*/
                  height: 27px;
                }

                .accqw {
                  display: block;
                  font-size: 10px;
                  margin-bottom: 0px;
                }

                .fenceAccessories {
                  cursor: pointer;
                }

                .acc22 {
                  /*display:inline;*/
                  font-size: 12px;
                }

                @media screen and (max-width:2560px) {
                  .accqw {
                    display: block;
                    font-size: 14px;
                    margin-bottom: 0px;
                  }

                  .acc22 {
                    /*display:inline;*/
                    font-size: 18px;
                  }
                }

                @media screen and (max-width:1940px) {

                  /*	.accqw{display:block;    font-size: 12px;margin-bottom: 0px;}*/
                  .acc22 {
                    /*display:inline;*/
                    font-size: 18px;
                  }
                }

                @media screen and (max-width:1400px) {
                  .Tilbehør label span {
                    display: none;
                  }

                }

                @media screen and (max-width:1200px) {
                  .Tilbehør {
                    height: 240px;
                  }

                  .Tilbehør label span {
                    display: none;
                  }
                }

                @media screen and (max-width:1024px) {
                  .Tilbehør {
                    height: 240px;
                    display: inline-grid;
                  }

                  .accqw {
                    display: block;
                    font-size: 10px;
                    margin-bottom: 0px;
                  }
                }

                @media screen and (max-width:1000px) {
                  .Tilbehør label span {
                    display: none;
                  }

                  .accqw {
                    display: block;
                    font-size: 10px;
                    margin-bottom: 0px;
                  }
                }

                @media screen and (max-width:768px) {}

                @media screen and (max-width:600px) {}

                input.Tilbehørcheckbox {
                  margin-right: 5px;
                  width: 20px;
                  height: 20px;
                  /* display: none;*/
                }

                .chekacc {
                  text-align: end;
                }
              </style>
              <div class="col-md-12 vaelg-tilbehor-1 vaelg-top_profil_wrap">
                                <div class="id-box-50 Tilbehør product_item acc">
                  <div style=" " class="chekacc"><input type="checkbox" id="Acc3" name="Acc3" class="Tilbehørcheckbox">
                  </div>
                  <img class="fenceAccessories cursurpointers" dataid="Acc3" datakey="1"
                    src="https://kirkedal.de/wp-content/uploads/2021/07/Untitled-2.png" />

                  <input type="hidden" class="hidAccessories" value="acc3" />
                  <label for="Acc3" class="accqw">Rens 750ml</label>
                  <label for="Acc3" class="acc22" style="display:none">Vælg</label>

                </div>
                <div class="id-box-50 Tilbehør product_item acc">
                  <!--/wp-content/images/acc5.jpg"-->
                                    <div style=" " class="chekacc"><input type="checkbox" id="Acc5" name="Acc5" class="Tilbehørcheckbox">
                  </div>
                  <img class="fenceAccessories cursurpointers " dataid="acc5" datakey="2"
                    src="https://kirkedal.de/wp-content/uploads/2022/04/bits_torx.png" />
                  <input type="hidden" class="hidAccessories" value="acc5" />
                  <label for="Acc5" class="accqw">Bits Torx 15</label>
                  <label for="Acc5" class="acc22" style="display:none">Vælg</label>

                </div>
                <div class="id-box-50 Tilbehør product_item Strø">
                  <!--https://kirkedal.de/wp-content/uploads/2019/11/Str%C3%B8-Support-140-220-mm-300x300.jpg-->
                  <div style=" " class="chekacc"> <input type="checkbox" id="Acc6" name="Acc6" class="Tilbehørcheckbox">
                  </div>
                  <img class="fenceAccessories cursurpointers" dataid="acc6" datakey="3"
                    src="https://kirkedal.de/wp-content/uploads/2019/11/Str%C3%B8-Support-140-220-mm-300x300.jpg" />
                  <input type="hidden" class="hidAccessories" value="acc6" />
                  <label for="Acc6" id="lab" class="accqw">Alu Click Strø Support <span>140-220 mm</span></label>
                  <label for="Acc6" class="acc22" style="display:none">Vælg</label>

                </div>
                                                                <div class="id-box-50 Tilbehør product_item acc">
                  <div style=" " class="chekacc"> <input type="checkbox" id="Acc10" name="Acc10"
                      class="Tilbehørcheckbox"></div>
                  <img class="fenceAccessories cursurpointers " dataid="acc10" datakey="7"
                    src="https://kirkedal.de/wp-content/uploads/2021/10/SOLID-T-clips.jpg" />
                  <input type="hidden" class="hidAccessories" value="acc10" />
                  <label for="acc10" style="display:block;">T-clips til bort, 40x50 mm</label>
                  <label for="acc10" style="display:none">Vælg</label>

                </div>
                <div class="id-box-50 Tilbehør product_item acc Acc11">
                  <div style=" " class="chekacc"> <input type="checkbox" id="Acc11" name="Acc11"
                      class="Tilbehørcheckbox"></div>
                  <div>
                    <div class="acc_image_div">
                      <img class="fenceAccessories cursurpointers " dataid="acc11" datakey="8"
                        src="https://kirkedalkomposit.dk/wp-content/uploads/2022/08/Black-List.jpg" />
                      <input type="hidden" class="hidAccessories" value="acc11" />
                      <label for="acc11" style="display:block;">Completionlist Heimdal</label>
                      <label for="acc11" style="display:none">Vælg</label>
                    </div>

                  </div>
                </div>
                <div class="acc_checkbox_div custom_completionlist_chk_wrap" style="margin: 0 auto; display:none;">
                  <div class="custom_completionlist_chk_side_a_wrap">A <span class="aval_span">-5</span><input
                      type="checkbox" id="aval" name="aval" class="acc_check_val"></div>
                  <div class="custom_completionlist_chk_side_b_wrap">B <span class="aval_span">-5</span><input
                      type="checkbox" id="bval" name="bval" class="acc_check_val"></div>
                  <div class="custom_completionlist_chk_side_c_wrap">C <span class="aval_span">-5</span><input
                      type="checkbox" id="cval" name="cval" class="acc_check_val"></div>
                  <div class="custom_completionlist_chk_side_d_wrap">D <span class="aval_span">-5</span><input
                      type="checkbox" id="dval" name="dval" class="acc_check_val"></div>
                  <div class="custom_completionlist_chk_side_e_wrap">E <span class="aval_span">-5</span><input
                      type="checkbox" id="eval" name="eval" class="acc_check_val"></div>
                  <div class="custom_completionlist_chk_side_f_wrap">F <span class="aval_span">-5</span><input
                      type="checkbox" id="fval" name="fval" class="acc_check_val"></div>
                  <div class="custom_completionlist_chk_side_g_wrap">G <span class="aval_span">-5</span><input
                      type="checkbox" id="gval" name="gval" class="acc_check_val"></div>
                  <div class="custom_completionlist_chk_side_h_wrap">H <span class="aval_span">-5</span><input
                      type="checkbox" id="hval" name="hval" class="acc_check_val"></div>
                </div>
              </div>
              <div class="vaelg-tilbehor-3">
                <p style="text-align: center;margin: 4px 0;opacity: 0.8;font-size: 14px;padding: 0; display:none;">
                  Beregningen er kun vejledende og med forbehold for faktorer der påvirker udfaldet af beregningen. Det
                  er på kundens eget ansvar at tjekke beregningen/antal</p>
                <!-- <p>Du kan forlade dette uden valg eller en indtil alle</p>-->
                <button class="btn_beregn" style="background: #fff;
    border: 1px solid #e1e1e1 !important;
    padding: 13px 11px 11px 10px;
    width: 140px;
    border-radius: 0px;
    font-weight: 700;
    font-size: 16px;">beregn</button>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="col-4">
        <div class="ccb-list">
          <div class="ccb-list-box">
            <h2>DIT VALG</h2>
            <ul>
              <li class="active-list"><span>1. Serie / Terrasse</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2023/04/calculator_img.jpg" alt="" title=""></li>
              <li class="active-list sidebar_calc_box1"><span>2. Vælg form</span> <img
                  src="https://kirkedal.de/wp-content/images/form3.jpg" alt="" title=""></li>
              <li class="active-list sidebar_calc_box2"><span>3. Dimensioner</span><b class="dimention" style="  ">A:5X6
                  B: 5X4 A:5X6 B: 5X4 A:5X6 B: 5X4</b></li>
              <!--<li class="active-list sidebar_calc_box3"><span>4. Vælg profil</span> <img src="https://kirkedal.de/wp-content/uploads/2021/07/vaelg-profil-1.jpg" alt="" title=""></li>-->
              <li class="active-list sidebar_calc_box4"><span>4. Vælg terrassebræts længde</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2021/07/vaelg-stolpestorrelse2.jpg" alt="" title=""></li>
              <li class="active-list sidebar_calc_box5"><span>5. Vælg strø afstand</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2021/07/vaelg-topprofil.jpg" alt="" title=""></li>
              <li class="active-list sidebar_calc_box6"><span>6. Vælg afslutningsmuligheder</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
              <li class="Vælgtilbehor"><span>7. Tilbehør</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
            </ul>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="calculator-box calculator-8" style="display:none">
    <div class="calculator-contact-box desktop-vo">
      <div class="col-4 desktop-vo resizeing">
        <div class="ccb-list">
          <div class="ccb-list-box">
            <h2>DIT VALG</h2>
            <div class="dit-veg-mag">
              <ul>
                <li class="active-list down-arrow-list"><span>Rediger</span> <img
                    src="https://kirkedal.de/wp-content/uploads/2022/02/free-arrow-down-icon-3101-thumb.png" alt=""
                    title="" style="height: 50%;
    margin: auto 0 auto 0px;"></li>
              </ul>



            </div>
            <ul class="all-data-list-finel" style="display:none">
              <li class="active-list"><span>1. Serie / Terrasse</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2023/04/calculator_img.jpg" alt="" title=""></li>
              <li class="active-list sidebar_calc_box1"><span>2. Vælg form</span> <img
                  src="https://kirkedal.de/wp-content/images/form3.jpg" alt="" title=""></li>
              <li class="active-list sidebar_calc_box2"><span>3. Dimensioner</span><b class="dimention" style="  ">A:5X6
                  B: 5X4 A:5X6 B: 5X4 A:5X6 B: 5X4</b></li>
              <!--<li class="active-list sidebar_calc_box3"><span>4. Vælg profil</span> <img src="https://kirkedal.de/wp-content/uploads/2021/07/vaelg-profil-1.jpg" alt="" title=""></li>-->
              <li class="active-list sidebar_calc_box4"><span>4. Vælg terrassebræts længde</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2021/07/vaelg-stolpestorrelse2.jpg" alt="" title=""></li>
              <li class="active-list sidebar_calc_box5"><span>5. Vælg strø afstand</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2021/07/vaelg-topprofil.jpg" alt="" title=""></li>
              <li class="active-list sidebar_calc_box6"><span>6. Vælg afslutningsmuligheder</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
              <li class="active-list sidebar_calc_box7"><span>7. Tilbehør</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
            </ul>
          </div>
          <div class="total-row">
            <style>
              table {

                border-collapse: collapse;
                width: 100%;
              }

              /*.calculator-8 tbody tr{display: none;}*/
              .calculator-8 tbody tr:not(:first-child):not(:last-child) {
                display: none;
              }

              td,
              th {
                border: 1px solid #dddddd;
                text-align: left;
                padding: 8px;
              }

              tr.frist-tr {
                background-color: #dddddd;
              }
            </style>
            <div class="tbl_custom_data">
              <table id="" style="width:100%;" cellspacing="0" cellpadding="5" border="0">
                <thead>
                  <tr style="background-color: #dddddd;">
                    <th>Beskrivelse</th>
                    <th>Antal </th>

                    <th>Total</th>
                  </tr>
                </thead>
                <tbody>
                  <tr>
                    <td data-label="Beskrivelse">Areal
                      <input name="area1" value="" id="area1" style="width: 100px;" readonly="true" type="hidden" />
                      <br />
                      <span id="area1_sku"></span>
                    </td>
                    <td data-label="Antal"><span id="area1html"></span> &nbsp;m2
                      <br />
                      <span id="area1_rate"></span>
                    </td>


                    <td data-label="Total" style="text-align: right;"><span id="area1_total"></span> </td>
                  </tr>
                  <tr>
                    <td data-label="Beskrivelse">Terrassebræt<br />
                      <span id="fence1_sku"></span>
                    </td>
                    <td data-label="Antal"><input name="fence1" id="fence1" readonly style="width: 100px;"
                        type="hidden" />
                      <span id="fence1html"></span>
                      <select id="fence_color" name="fence_color" style="display:none;">
                        <option value="">Vælg venligst farve</option>
                        <option value="black">Black</option>
                        <option value="coffee">Coffee</option>
                        <option value="grey">Grey</option>
                        <option value="white">White</option>
                      </select>
                      &nbsp;stk. a <br /><span id="gettotal"></span>
                      <script>
                        function printtotal() {
                          document.getElementById('gettotal').innerHTML = document.getElementById('fencetype1').value;
                        }
                      </script><br />
                      <span id="fence1_rate"></span>
                    </td>


                    <td data-label="Total" style="text-align: right;"><span id="fence1_total"></span> </td>
                  </tr>
                  <tr>
                    <td data-label="Beskrivelse">Strøer<br />
                      <span id="topskruer1_sku"></span>
                    </td>
                    <td data-label="Antal"><input name="topskruer1" id="topskruer1" readonly style="width: 100px;"
                        type="hidden" />
                      <input name="topskruer1_id" id="topskruer1_id" readonly type="hidden" />
                      <span id="topskruer1html"></span> &nbsp;stk. a 4000 mm <br />
                      <span id="topskruer1_rate"></span>
                    </td>

                    <td data-label="Total" style="text-align: right;"><span id="topskruer1_total"></span> </td>
                  </tr>
                  <tr>
                    <td data-label="Beskrivelse">Clips<br />
                      <span id="slutstolpe1_sku"></span>
                    </td>
                    <td data-label="Antal"><input readonly="true" name="slutstolpe1" id="slutstolpe1"
                        style="width: 100px;" type="hidden" />
                      <span id="slutstolpe1html"></span>
                      <input type="hidden" readonly="true" name="slutstolpe1_id" id="slutstolpe1_id"
                        style="width: 100px;" />
                                            poser <br />
                      <span id="slutstolpe1_rate"></span>
                    </td>

                    <td data-label="Total" style="text-align: right;"><span id="slutstolpe1_total"></span> </td>
                  </tr>
                  <tr>
                    <td data-label="Beskrivelse">Afslutning<br />
                      <span id="post1_sku"></span>
                    </td>
                    <td data-label="Antal"><input type="hidden" readonly="true" name="post1" id="post1"
                        style="width: 100px;" />
                      <span id="post1html"></span> &nbsp;stk.<span id="gettopprofile"></span>
                      <script>
                        function topprofile() {
                          document.getElementById('gettopprofile').innerHTML = document.getElementById('topprofiletype1').value;
                        }
                      </script><br />
                      <span id="post1_rate"></span>
                    </td>

                    <td data-label="Total" style="text-align: right;"><span id="post1_total"></span> </td>
                  </tr>
                  <tr>
                    <td data-label="Beskrivelse">Connector<br />
                      <span id="connector_sku"></span>
                    </td>
                    <td data-label="Antal"><input type="hidden" readonly="true" name="connector" id="connector"
                        style="width: 100px;" />
                      <input type="hidden" readonly="true" name="connector_id" id="connector_id" />
                      <span id="connectorhtml"></span> stk. <br />

                      <span id="connector_rate"></span>
                    </td>

                    <td data-label="Total" style="text-align: right;"><span id="connector_total"></span> </td>
                  </tr>
                  <tr>
                    <td data-label="Beskrivelse">Kirkedal Alu Click Endekap<br />
                      <span id="alu_click_endekap_sku"></span>
                    </td>
                    <td data-label="Antal"><input type="hidden" readonly="true" name="alu_click_endekap"
                        id="alu_click_endekap" style="width: 100px;" />
                      <input type="hidden" readonly="true" name="alu_click_endekap_id" id="alu_click_endekap_id" />
                      <span id="alu_click_endekaphtml"></span> poser <br />
                      <span id="alu_click_endekap_rate"></span>
                    </td>

                    <td data-label="Total" style="text-align: right;"><span id="alu_click_endekap_total"></span> </td>
                  </tr>
                  <tr>
                    <td data-label="Beskrivelse">Startbeslag<br />
                      <span id="stolpe1_sku"></span>
                    </td>
                    <td data-label="Antal"><input type="hidden" readonly="true" name="stolpe1" id="stolpe1"
                        style="width: 100px;" />
                      <span id="stolpe1html"></span>&nbsp;poser med 50 stk. <br />
                      <span id="stolpe1_rate"></span>
                    </td>

                    <td data-label="Total" style="text-align: right;"><span id="stolpe1_total"></span> </td>
                  </tr>
                  <tr>
                    <td data-label="Beskrivelse">Slutbeslag<br />
                      <span id="topklods1_sku"></span>
                    </td>
                    <td data-label="Antal"><input type="hidden" readonly="true" name="topklods1" id="topklods1"
                        style="width: 100px;" />
                      <span id="topklods1html"></span> &nbsp;poser med 50 stk. <br />
                      <span id="topklods1_rate"></span>
                    </td>

                    <td data-label="Total" style="text-align: right;"><span id="topklods1_total"></span> </td>
                  </tr>
                  <tr>
                    <td data-label="Beskrivelse">Imprægnering 1L<br />
                      <span id="acc1_cnt_sku"></span>
                    </td>
                    <td data-label="Antal"><input type="hidden" readonly="true" name="acc1_cnt" id="acc1_cnt"
                        style="width: 100px;" />
                      <span id="acc1_cnthtml"></span> &nbsp;stk. a 1L<br />
                      <span id="acc1_cnt_rate"></span>
                    </td>

                    <td data-label="Total" style="text-align: right;"><span id="acc1_cnt_total"></span> </td>
                  </tr>
                  <tr>
                    <td data-label="Beskrivelse">Rens 750ml<br />
                      <span id="acc3_cnt_sku"></span>
                    </td>
                    <td data-label="Antal"><input type="hidden" readonly="true" name="acc3_cnt" id="acc3_cnt"
                        style="width: 100px;" />
                      <span id="acc3_cnthtml"></span> &nbsp;stk. a 750 ml<br />
                      <span id="acc3_cnt_rate"></span>
                    </td>

                    <td data-label="Total" style="text-align: right;"><span id="acc3_cnt_total"></span> </td>
                  </tr>
                  <tr>
                    <td data-label="Beskrivelse"> Bits Torx 15<br />
                      <span id="acc5_cnt_sku"></span>
                    </td>
                    <td data-label="Antal"><input type="hidden" readonly="true" name="acc5_cnt" id="acc5_cnt"
                        style="width: 100px;" />
                      <span id="acc5_cnthtml"></span> &nbsp;pose med 2 stk.<br />
                      <span id="acc5_cnt_rate"></span>
                    </td>

                    <td data-label="Total" style="text-align: right;"><span id="acc5_cnt_total"></span> </td>
                  </tr>
                  <tr>
                    <td data-label="Beskrivelse"> T-clips til bort, 40x50 mm<br />
                      <span id="acc10_cnt_sku"></span>
                    </td>
                    <td data-label="Antal"><input type="hidden" readonly="true" name="acc10_cnt" id="acc10_cnt"
                        class="acc10_cnt" style="width: 100px;" />
                      <span id="acc10_cnthtml"></span> &nbsp;pakke.<br />
                      <span id="acc10_cnt_rate"></span>
                    </td>

                    <td data-label="Total" style="text-align: right;"><span id="acc10_cnt_total"></span> </td>
                  </tr>
                  <tr>
                    <td data-label="Beskrivelse"> Completionlist Heimdal<br />
                      <span id="acc11_cnt_sku"></span>
                    </td>
                    <td data-label="Antal"><input type="hidden" readonly="true" name="acc11_cnt" id="acc11_cnt"
                        class="acc11_cnt" style="width: 100px;" />
                      <span id="acc11_cnthtml"></span> &nbsp;stk<br />
                      <span id="acc11_cnt_rate"></span>
                    </td>

                    <td data-label="Total" style="text-align: right;"><span id="acc11_cnt_total"></span> </td>
                  </tr>
                  <tr>
                    <td data-label="Beskrivelse"> Alu Click Strø Support 140-220 mm<br />

                      <span id="acc6_cnt_sku"></span>
                    </td>
                    <td data-label="Antal"><input type="hidden" readonly="true" name="acc6_cnt" id="acc6_cnt"
                        style="width: 100px;" />
                      <span id="acc6_cnthtml"></span> &nbsp; <br />
                      <span id="acc6_cnt_rate"></span>
                    </td>

                    <td data-label="Total" style="text-align: right;"><span id="acc6_cnt_total"></span> </td>
                  </tr>
                  <tr>
                    <td data-label="Beskrivelse"> Alu Click Strø Support 18-30 mm<br />
                      <span id="acc7_cnt_sku"></span>
                    </td>
                    <td data-label="Antal"><input type="hidden" readonly="true" name="acc7_cnt" id="acc7_cnt"
                        style="width: 100px;" />
                      <span id="acc7_cnthtml"></span> &nbsp; <br />
                      <span id="acc7_cnt_rate"></span>
                    </td>

                    <td data-label="Total" style="text-align: right;"><span id="acc7_cnt_total"></span> </td>
                  </tr>
                  <tr>
                    <td data-label="Beskrivelse"> Alu Click Strø Support 30-60 mm<br />
                      <span id="acc8_cnt_sku"></span>
                    </td>
                    <td data-label="Antal"><input type="hidden" readonly="true" name="acc8_cnt" id="acc8_cnt"
                        style="width: 100px;" />
                      <span id="acc8_cnthtml"></span> &nbsp;<br />
                      <span id="acc8_cnt_rate"></span>
                    </td>

                    <td data-label="Total" style="text-align: right;"><span id="acc8_cnt_total"></span> </td>
                  </tr>
                  <tr>
                    <td data-label="Beskrivelse"> Alu Click Strø Support 60-140 mm<br />
                      <span id="acc9_cnt_sku"></span>
                    </td>
                    <td data-label="Antal"><input type="hidden" readonly="true" name="acc9_cnt" id="acc9_cnt"
                        style="width: 100px;" />
                      <span id="acc9_cnthtml"></span> &nbsp; <br />
                      <span id="acc9_cnt_rate"></span>
                    </td>

                    <td data-label="Total" style="text-align: right;"><span id="acc9_cnt_total"></span> </td>
                  </tr>
                  <tr>
                    <td style="text-align: left;font-weight:800;">Total</td>
                    <td colspan="4" style="text-align: right;font-weight:800;"><input id="total" style="width: 120px;"
                        name="total" readonly="readonly" type="hidden">
                      <span id="totaltotll"></span> € <span style="font-weight:400;">inkl. moms</span>
                    </td>
                  </tr>
                </tbody>
              </table>
              <p style="display:none;">Beregningen er kun vejledende og med forbehold for faktorer der påvirker udfaldet
                af beregningen. Det er på kundens eget ansvar at tjekke beregningen/antal.<br>
                Fragtpriser: Ab butik - 812,50 kr. Leveret til kantsten - 1.625,00 kr.<br>
                1 colli = 4 hegnsprofiler</p>
                            <form id="pdf_print_form" action="/beregner_pdf/pdf/terrasse.php" method="post" name="form">
                <input type="hidden" name="product_img" id="product_img" value="">
                <input type="hidden" name="cal_top_img1_wrap" id="cal_top_img1_wrap" value="">
                <input type="hidden" name="form_img" id="form_img" value="">
                <div class="hidden_pdf_data"> </div>
                <div class="height_with_info" style="display:none;"> Side A-H:3m-B:4m </div>
                <input type="hidden" name="datablade_img1" id="datablade_img1"
                  value="https://kirkedal.de/wp-content/uploads/2019/05/terrasseplanker_solid.png">
                <input type="hidden" name="datablade_link1" id="datablade_link1"
                  value="https://kirkedal.de/wp-content/uploads/2019/05/TreeTops_Kirkedal-Datablad-SOLID_NY-netfil-5-2-4.pdf">
                <input type="hidden" name="pdfemail" id="pdfemail" value="">
                <input type="hidden" name="pdfphone" id="pdfphone" value="">
                <input type="hidden" name="pdfagree" id="pdfagree" value="">
                <input type="hidden" name="pdfarea" id="pdfarea" value="">
                <input type="hidden" name="pdfhojde" id="pdfhojde" value="">
                <input type="hidden" name="pdflangde" id="pdflangde" value="" />
                <input type="hidden" name="pdfterrasse" id="pdfterrasse" value="" />
                <input type="hidden" name="pdfstroe" id="pdfstroe" value="" />
                <input type="hidden" name="pdfstroe_id" id="pdfstroe_id" value="" />
                <input type="hidden" name="pdfclips" id="pdfclips" value="" />
                <input type="hidden" name="pdfafslutning" id="pdfafslutning" value="" />
                <input type="hidden" name="pdfstartbeslag" id="pdfstartbeslag" value="" />
                <input type="hidden" name="pdfslutbeslag" id="pdfslutbeslag" value="" />
                <input type="hidden" name="pdffarve" id="pdffarve" value="" />
                <input type="hidden" name="pdftotal" id="pdftotal" value="" />
                <input type="hidden" name="pdftypeterrasse" id="pdftypeterrasse" value="" />
                <input type="hidden" name="pdfclips_type" id="pdfclips_type" value="" />
                <input type="hidden" name="pdfclips_id" id="pdfclips_id" value="" />
                <input type="hidden" name="pdfconnector" id="pdfconnector" value="" />
                <input type="hidden" name="pdfconnector_id" id="pdfconnector_id" value="" />
                <input type="hidden" name="pdfalu_click_endekap" id="pdfalu_click_endekap" value="" />
                <input type="hidden" name="pdfalu_click_endekap_id" id="pdfalu_click_endekap_id" value="" />
                <input type="hidden" name="pdftypeafslutning" id="pdftypeafslutning" value="" />
                <input type="hidden" name="pdf_acc1_cnt" id="pdf_acc1_cnt" value="" />
                <input type="hidden" name="pdf_acc2_cnt" id="pdf_acc2_cnt" value="" />
                <input type="hidden" name="pdf_acc3_cnt" id="pdf_acc3_cnt" value="" />
                <input type="hidden" name="pdf_acc4_cnt" id="pdf_acc4_cnt" value="" />
                <input type="hidden" name="pdf_acc5_cnt" id="pdf_acc5_cnt" value="" />
                <input type="hidden" name="pdf_acc6_cnt" id="pdf_acc6_cnt" value="" />
                <input type="hidden" name="pdf_acc7_cnt" id="pdf_acc7_cnt" value="" />
                <input type="hidden" name="pdf_acc8_cnt" id="pdf_acc8_cnt" value="" />
                <input type="hidden" name="pdf_acc9_cnt" id="pdf_acc9_cnt" value="" />
                <input type="hidden" name="pdf_acc10_cnt" id="pdf_acc10_cnt" value="" />
                <input type="hidden" name="pdf_acc11_cnt" id="pdf_acc11_cnt" value="" />
                <input type="hidden" name="wqs_clip_count" id="wqs_clip_count" value="" />
                <input type="hidden" name="wqs_clip_stk" id="wqs_clip_stk" value="" />
                <input type="hidden" name="pdf_product_id" id="pdf_product_id" value="" />
                <input type="hidden" name="pdf_product_name" id="pdf_product_name" value="" />
                <input type="hidden" name="pdf_product_skus" id="pdf_product_skus" value="" />
                <input type="submit" id="printsubmit" style="display: none;" value="Print/Send beregningen"
                  onClick="pdf1()">
                <input type="button" id="addtocartbutton" style="display: none;" value="Tilføj indkøbskurven"
                  onClick="add_to_cart()">
              </form>
            </div>
            <!-- <div class="te-price"> Total  <span id="totaltotll2" ></span> </div> -->
            <style type="text/css">

            </style>
            <div class="button-row">
              <button type="button" id="printpdf">Print/Send beregningen</button>
              <button type="button" id="fuldskaerm">Fuldskærm 3D</button>
              <button type="button" id="nulstil">Nulstil</button>
              <button type="button" id="addtocart" style="display:none;">Tilføj indkøbskurven</button>
              <button type="button" id="testdemo">Se bagsiden</button>
              <button type="button" id="testroter">Skift retning</button>

            </div>
            <p style="font-size:16px">Brædderne er 2 farvet.</p>
            <p style="text-align: center;margin: 4px 0;opacity: 0.8;font-size: 14px;padding: 0; margin-top:40px;">
              Beregningen er kun vejledende og med forbehold for faktorer der påvirker udfaldet af beregningen. Det er
              på kundens eget ansvar at tjekke beregningen/antal</p>
          </div>

        </div>
      </div>
      <script>
        // $(".all-data-list-finel").hide();	
        jQuery(document).ready(function () {
          jQuery(document).on("click", 'li.down-arrow-list', function () {


            jQuery(".all-data-list-finel").toggle();
          });
        });

        jQuery('#testdemo').click(function () {
          jQuery(".renderCanvas").remove();

          jQuery(".show-3d-box").after('<canvas class="renderCanvas" id="renderCanvas" touch-action="none" style=" width: 100% !important;"></canvas>');

          flipfance = jQuery('#flipfance').val();
          if (flipfance == 0) {
            jQuery('input#flipfance').val(1);
            jQuery('.btn_beregn').trigger('click');
          } else {
            jQuery('input#flipfance').val(0);
            jQuery('.btn_beregn').trigger('click');
          }

          f_color = jQuery('#f_color').val();

          if (f_color == "Black") {
            jQuery("#f_color").val("Grey");
            jQuery('#testdemo').text("Se Grey");
          } else if (f_color == "Grey") {
            jQuery("#f_color").val("Black");
            jQuery('#testdemo').text("Se Black");
          } else if (f_color == "Oak") {
            jQuery("#f_color").val("Hardwood");
            jQuery('#testdemo').text("Se Hardwood");
          } else if (f_color == "Hardwood") {
            jQuery("#f_color").val("Oak");
            jQuery('#testdemo').text("Se Oak");
          }

          jQuery('.all-data-list-finel').hide();

        });


        jQuery('#testroter').click(function () {
          jQuery(".renderCanvas").remove();

          jQuery(".show-3d-box").after('<canvas class="renderCanvas" id="renderCanvas" touch-action="none" style=" width: 100% !important;"></canvas>');

          rotarfance = jQuery('#rotarfance').val();
          if (rotarfance == 0) {
            jQuery('input#rotarfance').val(1);
            jQuery('.btn_beregn').trigger('click');
          } else {
            jQuery('input#rotarfance').val(0);
            jQuery('.btn_beregn').trigger('click');


          }
          jQuery('.all-data-list-finel').hide();
        });
      </script>

      <div class="col-8 fullwidth">
        <div class="ccb-text">
          <div class="ccb-text-box d3d-width">
            <div class="show-3d">
              <!-- <h3>3D show</h3>-->
              <style type="text/css">
                .minimizebutton {
                  width: 4%;
                  top: 22px;
                  /* float: left; */
                  padding-left: 21px;
                  position: absolute;
                  z-index: 99999;
                  left: 30px;
                }

                .show-3d .show-3d-box .mouse_gest {
                  position: absolute;
                  right: 50px;
                  top: 30px;

                }
              </style>
              <div class="show-3d-box"> <img class="minimizebutton"
                  src="https://kirkedal.de/wp-content/uploads/2022/02/minimize.png" alt="" title=""
                  style="display: none;">
                <img class="mouse_gest"
                  src="https://kirkedal.de/wp-content/themes/kallyas-child/image/mouse-gestures.png" alt="" title=""
                  width="50px">
              </div>


              <canvas class="renderCanvas" id="renderCanvas" touch-action="none"
                style=" width: 100% !important;"></canvas>
            </div>
          </div>
        </div>
      </div>
    </div>
    <style type="text/css">
      .tbl_custom_data span {
        padding: 0 0;
        font-size: 14px;
      }

      #tbl_custom_data tr,
      #tbl_custom_data1 tr {
        border-bottom: 1px solid;
      }
    </style>
    <script>


      function resizetextbox() {
        jQuery("#tbl_custom_data input").each(function () {
          var txt_val = jQuery(this).val().length;
          var width_val = ((txt_val + 1) * 12) + 'px';
          jQuery(this).css('width', width_val);
        });
        jQuery("#tbl_custom_data span[id$=_rate]").each(function () {
          //alert(jQuery(this).attr('id'));
          var price_valtxt = jQuery(this).text();
          var nStr = price_valtxt.replace('.', ',')
          //jQuery(this).text(price_valtxt.replace('.',','));
          //alert(nStr);
          var new_str = addCommas(nStr);
          jQuery(this).text(new_str);
        });
        jQuery("#tbl_custom_data span[id$=_total]").each(function () {
          //alert(jQuery(this).attr('id'));
          var price_valtxt = jQuery(this).text();
          //jQuery(this).text(price_valtxt.replace('.',','));
          var nStr1 = price_valtxt.replace('.', ',')
          var new_str1 = addCommas(nStr1);
          jQuery(this).text(new_str1);
        });

      }
      function addCommas(nStr) {
        nStr += '';
        x = nStr.split(',');
        x1 = x[0];
        x2 = x.length > 1 ? ',' + x[1] : '';
        var rgx = /(\d+)(\d{3})/;
        while (rgx.test(x1)) {
          x1 = x1.replace(rgx, '$1' + '.' + '$2');
        }
        return x1 + x2;
      }
    </script>
    <table id="tbl_custom_data1" border="0" style="width:100%;display: none;" width="1000px" cellspacing="0"
      cellpadding="5">
      <tr>
        <td style="padding-left:20px;"><select id="fence_color" name="fence_color">
            <option value="black">Black</option>
            <option value="hardwood">Hardwood</option>
            <option value="oak">Oak</option>
            <option value="grey">Grey</option>
          </select></td>
      </tr>
    </table>
    <div class="tbl_custom_data" style="display:none">
      <table id="" style="width:100%; display:none" cellspacing="0" cellpadding="5" border="0">
        <thead>
          <tr>
            <th>Beskrivelse</th>
            <th>Antal </th>
            <th>Varenr.</th>
            <th>Pris pr. stk. </th>
            <th>Total</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td data-label="Beskrivelse">Areal
              <input name="area1" value="" id="area1" style="width: 100px;" readonly="true" type="hidden" />
            </td>
            <td data-label="Antal"><span id="area1html"></span> &nbsp;m2 </td>
            <td data-label="Varenr."><span id="area1_sku"></span></td>
            <td data-label="Pris pr. stk.."><span id="area1_rate"></span> EUR</td>
            <td data-label="Total"><span id="area1_total"></span> EUR</td>
          </tr>
          <tr>
            <td data-label="Beskrivelse">Terrassebræt</td>
            <td data-label="Antal"><input name="fence1" id="fence1" readonly style="width: 100px;" type="hidden" />
              <span id="fence1html"></span>
              <select id="fence_color" name="fence_color" style="display:none;">
                <option value="">Vælg venligst farve</option>
                <option value="black">Black</option>
                <option value="coffee">Coffee</option>
                <option value="grey">Grey</option>
                <option value="white">White</option>
              </select>
              &nbsp;stk. a <span id="gettotal"></span>
              <script>
                function printtotal() {
                  document.getElementById('gettotal').innerHTML = document.getElementById('fencetype1').value;
                }
              </script>
            </td>
            <td data-label="Varenr."><span id="fence1_sku"></span></td>
            <td data-label="Pris pr. stk.."><span id="fence1_rate"></span> </td>
            <td data-label="Total"><span id="fence1_total"></span> </td>
          </tr>
          <tr>
            <td data-label="Beskrivelse">Strøer</td>
            <td data-label="Antal"><input name="topskruer1" id="topskruer1" readonly style="width: 100px;"
                type="hidden" />
              <input name="topskruer1_id" id="topskruer1_id" readonly type="hidden" />
              <span id="topskruer1html"></span> &nbsp;stk. a 4000 mm
            </td>
            <td data-label="Varenr."><span id="topskruer1_sku"></span></td>
            <td data-label="Pris pr. stk.."><span id="topskruer1_rate"></span> </td>
            <td data-label="Total"><span id="topskruer1_total"></span> </td>
          </tr>
          <tr>
            <td data-label="Beskrivelse">Clips</td>
            <td data-label="Antal"><input readonly="true" name="slutstolpe1" id="slutstolpe1" style="width: 100px;"
                type="hidden" />
              <span id="slutstolpe1html"></span>
              <input type="hidden" readonly="true" name="slutstolpe1_id" id="slutstolpe1_id" style="width: 100px;" />
                            poser
            </td>
            <td data-label="Varenr."><span id="slutstolpe1_sku"></span></td>
            <td data-label="Pris pr. stk.."><span id="slutstolpe1_rate"></span> </td>
            <td data-label="Total"><span id="slutstolpe1_total"></span> </td>
          </tr>
          <tr>
            <td data-label="Beskrivelse">Afslutning</td>
            <td data-label="Antal"><input type="hidden" readonly="true" name="post1" id="post1" style="width: 100px;" />
              <span id="post1html"></span> &nbsp;stk.<span id="gettopprofile"></span>
              <script>
                function topprofile() {
                  document.getElementById('gettopprofile').innerHTML = document.getElementById('topprofiletype1').value;
                }
              </script>
            </td>
            <td data-label="Varenr."><span id="post1_sku"></span></td>
            <td data-label="Pris pr. stk.."><span id="post1_rate"></span> </td>
            <td data-label="Total"><span id="post1_total"></span> </td>
          </tr>
          <tr>
            <td data-label="Beskrivelse">Connector</td>
            <td data-label="Antal"><input type="hidden" readonly="true" name="connector" id="connector"
                style="width: 100px;" />
              <input type="hidden" readonly="true" name="connector_id" id="connector_id" />
              <span id="connectorhtml"></span> stk.
            </td>
            <td data-label="Varenr."><span id="connector_sku"></span></td>
            <td data-label="Pris pr. stk.."><span id="connector_rate"></span> </td>
            <td data-label="Total"><span id="connector_total"></span> </td>
          </tr>
          <tr>
            <td data-label="Beskrivelse">Kirkedal Alu Click Endekap</td>
            <td data-label="Antal"><input type="hidden" readonly="true" name="alu_click_endekap" id="alu_click_endekap"
                style="width: 100px;" />
              <input type="hidden" readonly="true" name="alu_click_endekap_id" id="alu_click_endekap_id" />
              <span id="alu_click_endekaphtml"></span> poser
            </td>
            <td data-label="Varenr."><span id="alu_click_endekap_sku"></span></td>
            <td data-label="Pris pr. stk.."><span id="alu_click_endekap_rate"></span> </td>
            <td data-label="Total"><span id="alu_click_endekap_total"></span> </td>
          </tr>
          <tr>
            <td data-label="Beskrivelse">Startbeslag</td>
            <td data-label="Antal"><input type="hidden" readonly="true" name="stolpe1" id="stolpe1"
                style="width: 100px;" />
              <span id="stolpe1html"></span>&nbsp;poser med 50 stk.
            </td>
            <td data-label="Varenr."><span id="stolpe1_sku"></span></td>
            <td data-label="Pris pr. stk.."><span id="stolpe1_rate"></span> </td>
            <td data-label="Total"><span id="stolpe1_total"></span> </td>
          </tr>
          <tr>
            <td data-label="Beskrivelse">Slutbeslag</td>
            <td data-label="Antal"><input type="hidden" readonly="true" name="topklods1" id="topklods1"
                style="width: 100px;" />
              <span id="topklods1html"></span> &nbsp;poser med 50 stk.
            </td>
            <td data-label="Varenr."><span id="topklods1_sku"></span></td>
            <td data-label="Pris pr. stk.."><span id="topklods1_rate"></span> </td>
            <td data-label="Total"><span id="topklods1_total"></span> </td>
          </tr>
          <tr>
            <td data-label="Beskrivelse">Imprægnering 1L</td>
            <td data-label="Antal"><input type="hidden" readonly="true" name="acc1_cnt" id="acc1_cnt"
                style="width: 100px;" />
              <span id="acc1_cnthtml"></span> &nbsp;stk. a 1L
            </td>
            <td data-label="Varenr."><span id="acc1_cnt_sku"></span></td>
            <td data-label="Pris pr. stk.."><span id="acc1_cnt_rate"></span> </td>
            <td data-label="Total"><span id="acc1_cnt_total"></span> </td>
          </tr>
          <tr>
            <td data-label="Beskrivelse">Rens 750ml</td>
            <td data-label="Antal"><input type="hidden" readonly="true" name="acc3_cnt" id="acc3_cnt"
                style="width: 100px;" />
              <span id="acc3_cnthtml"></span> &nbsp;stk. a 750 ml
            </td>
            <td data-label="Varenr."><span id="acc3_cnt_sku"></span></td>
            <td data-label="Pris pr. stk.."><span id="acc3_cnt_rate"></span> </td>
            <td data-label="Total"><span id="acc3_cnt_total"></span> </td>
          </tr>
          <tr>
            <td data-label="Beskrivelse"> Bits Torx 15</td>
            <td data-label="Antal"><input type="hidden" readonly="true" name="acc5_cnt" id="acc5_cnt"
                style="width: 100px;" />
              <span id="acc5_cnthtml"></span> &nbsp;pose med 2 stk.
            </td>
            <td data-label="Varenr."><span id="acc5_cnt_sku"></span></td>
            <td data-label="Pris pr. stk.."><span id="acc5_cnt_rate"></span> </td>
            <td data-label="Total"><span id="acc5_cnt_total"></span> </td>
          </tr>
          <tr>
            <td data-label="Beskrivelse"> T-clips til bort, 40x50 mm</td>
            <td data-label="Antal"><input type="hidden" readonly="true" name="acc10_cnt" id="acc10_cnt"
                class="acc10_cnt" style="width: 100px;" />
              <span id="acc10_cnthtml"></span> &nbsp;pakke.
            </td>
            <td data-label="Varenr."><span id="acc10_cnt_sku"></span></td>
            <td data-label="Pris pr. stk.."><span id="acc10_cnt_rate"></span> </td>
            <td data-label="Total"><span id="acc10_cnt_total"></span> </td>
          </tr>
          <tr>
            <td data-label="Beskrivelse"> Alu Click Strø Support 140-220 mm</td>
            <td data-label="Antal"><input type="hidden" readonly="true" name="acc6_cnt" id="acc6_cnt"
                style="width: 100px;" />
              <span id="acc6_cnthtml"></span> &nbsp;
            </td>
            <td data-label="Varenr."><span id="acc6_cnt_sku"></span></td>
            <td data-label="Pris pr. stk.."><span id="acc6_cnt_rate"></span> </td>
            <td data-label="Total"><span id="acc6_cnt_total"></span> </td>
          </tr>
          <tr>
            <td data-label="Beskrivelse"> Alu Click Strø Support 18-30 mm</td>
            <td data-label="Antal"><input type="hidden" readonly="true" name="acc7_cnt" id="acc7_cnt"
                style="width: 100px;" />
              <span id="acc7_cnthtml"></span> &nbsp;
            </td>
            <td data-label="Varenr."><span id="acc7_cnt_sku"></span></td>
            <td data-label="Pris pr. stk.."><span id="acc7_cnt_rate"></span> </td>
            <td data-label="Total"><span id="acc7_cnt_total"></span> </td>
          </tr>
          <tr>
            <td data-label="Beskrivelse"> Alu Click Strø Support 30-60 mm</td>
            <td data-label="Antal"><input type="hidden" readonly="true" name="acc8_cnt" id="acc8_cnt"
                style="width: 100px;" />
              <span id="acc8_cnthtml"></span> &nbsp;
            </td>
            <td data-label="Varenr."><span id="acc8_cnt_sku"></span></td>
            <td data-label="Pris pr. stk.."><span id="acc8_cnt_rate"></span> </td>
            <td data-label="Total"><span id="acc8_cnt_total"></span> </td>
          </tr>
          <tr>
            <td data-label="Beskrivelse"> Alu Click Strø Support 60-140 mm</td>
            <td data-label="Antal"><input type="hidden" readonly="true" name="acc9_cnt" id="acc9_cnt"
                style="width: 100px;" />
              <span id="acc9_cnthtml"></span> &nbsp;
            </td>
            <td data-label="Varenr."><span id="acc9_cnt_sku"></span></td>
            <td data-label="Pris pr. stk.."><span id="acc9_cnt_rate"></span> </td>
            <td data-label="Total"><span id="acc9_cnt_total"></span> </td>
          </tr>
          <tr>
            <td style="text-align: left;font-weight:800;">Total</td>
            <td colspan="4" style="text-align: right;font-weight:800;"><input id="total" style="width: 120px;"
                name="total" readonly="readonly" type="hidden">
              <span id="totaltotll"></span> EUR <span style="font-weight:400;">inkl. moms</span>
            </td>
          </tr>
        </tbody>
      </table>
      <p style="display:none;">Beregningen er kun vejledende og med forbehold for faktorer der påvirker udfaldet af
        beregningen. Det er på kundens eget ansvar at tjekke beregningen/antal.<br>
        Fragtpriser: Ab butik - 812,50 kr. Leveret til kantsten - 1.625,00 kr.<br>
        1 colli = 4 hegnsprofiler</p>
            <form id="pdf_print_form" action="/beregner_pdf/pdf/terrasse.php" method="post" name="form">
        <input type="hidden" name="product_img" id="product_img" value="">
        <input type="hidden" name="cal_top_img1_wrap" id="cal_top_img1_wrap" value="">
        <input type="hidden" name="form_img" id="form_img" value="">
        <div class="hidden_pdf_data"> </div>
        <div class="height_with_info" style="display:none;"> Side A-H:3m-B:4m </div>
        <input type="hidden" name="datablade_img1" id="datablade_img1"
          value="https://kirkedal.de/wp-content/uploads/2019/05/terrasseplanker_solid.png">
        <input type="hidden" name="datablade_link1" id="datablade_link1"
          value="https://kirkedal.de/wp-content/uploads/2019/05/TreeTops_Kirkedal-Datablad-SOLID_NY-netfil-5-2-4.pdf">
        <input type="hidden" name="pdfemail" id="pdfemail" value="">
        <input type="hidden" name="pdfphone" id="pdfphone" value="">
        <input type="hidden" name="pdfagree" id="pdfagree" value="">
        <input type="hidden" name="pdfarea" id="pdfarea" value="">
        <input type="hidden" name="pdfhojde" id="pdfhojde" value="">
        <input type="hidden" name="pdflangde" id="pdflangde" value="" />
        <input type="hidden" name="pdfterrasse" id="pdfterrasse" value="" />
        <input type="hidden" name="pdfstroe" id="pdfstroe" value="" />
        <input type="hidden" name="pdfstroe_id" id="pdfstroe_id" value="" />
        <input type="hidden" name="pdfclips" id="pdfclips" value="" />
        <input type="hidden" name="pdfafslutning" id="pdfafslutning" value="" />
        <input type="hidden" name="pdfstartbeslag" id="pdfstartbeslag" value="" />
        <input type="hidden" name="pdfslutbeslag" id="pdfslutbeslag" value="" />
        <input type="hidden" name="pdffarve" id="pdffarve" value="" />
        <input type="hidden" name="pdftotal" id="pdftotal" value="" />
        <input type="hidden" name="pdftypeterrasse" id="pdftypeterrasse" value="" />
        <input type="hidden" name="pdfclips_type" id="pdfclips_type" value="" />
        <input type="hidden" name="pdfclips_id" id="pdfclips_id" value="" />
        <input type="hidden" name="pdfconnector" id="pdfconnector" value="" />
        <input type="hidden" name="pdfconnector_id" id="pdfconnector_id" value="" />
        <input type="hidden" name="pdfalu_click_endekap" id="pdfalu_click_endekap" value="" />
        <input type="hidden" name="pdfalu_click_endekap_id" id="pdfalu_click_endekap_id" value="" />
        <input type="hidden" name="pdftypeafslutning" id="pdftypeafslutning" value="" />
        <input type="hidden" name="pdf_acc1_cnt" id="pdf_acc1_cnt" value="" />
        <input type="hidden" name="pdf_acc2_cnt" id="pdf_acc2_cnt" value="" />
        <input type="hidden" name="pdf_acc3_cnt" id="pdf_acc3_cnt" value="" />
        <input type="hidden" name="pdf_acc4_cnt" id="pdf_acc4_cnt" value="" />
        <input type="hidden" name="pdf_acc5_cnt" id="pdf_acc5_cnt" value="" />
        <input type="hidden" name="pdf_acc6_cnt" id="pdf_acc6_cnt" value="" />
        <input type="hidden" name="pdf_acc7_cnt" id="pdf_acc7_cnt" value="" />
        <input type="hidden" name="pdf_acc8_cnt" id="pdf_acc8_cnt" value="" />
        <input type="hidden" name="pdf_acc9_cnt" id="pdf_acc9_cnt" value="" />
        <input type="hidden" name="pdf_acc10_cnt" id="pdf_acc10_cnt" value="" />
        <input type="hidden" name="wqs_clip_count" id="wqs_clip_count" value="" />
        <input type="hidden" name="wqs_clip_stk" id="wqs_clip_stk" value="" />
        <input type="hidden" name="pdf_product_id" id="pdf_product_id" value="" />
        <input type="hidden" name="pdf_product_name" id="pdf_product_name" value="" />
        <input type="hidden" name="pdf_product_skus" id="pdf_product_skus" value="" />
        <input type="submit" id="printsubmit" style="display: none;" value="Print/Send beregningen" onClick="pdf1()">
        <input type="button" id="addtocartbutton" style="display: none;" value="Tilføj indkøbskurven"
          onClick="add_to_cart()">
      </form>
    </div>
    <div class="calculator-contact-box modal-vo">
      <div class="col-8">
        <div class="ccb-text">
          <div class="ccb-text-box">
            <div class="show-3d">
              <!-- <h3>3D show</h3>-->

              <div class="show-3d-box"> <img class="minimizebutton"
                  src="https://kirkedal.de/wp-content/uploads/2022/02/minimize.png" alt="" title=""
                  style="display: none;">
                <img class="mouse_gest"
                  src="https://kirkedal.de/wp-content/themes/kallyas-child/image/mouse-gestures.png" alt="" title=""
                  width="50px">
              </div>
              <canvas class="renderCanvas" id="renderCanvas" touch-action="none"
                style=" width: 100% !important;"></canvas>
            </div>
          </div>
        </div>
      </div>
      <div class="col-4">
        <div class="ccb-list">
          <div class="ccb-list-box">
            <h2>DIT VALG</h2>
            <ul>
              <li class="active-list"><span>1. Serie / Terrasse</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2023/04/calculator_img.jpg" alt="" title=""></li>
              <li class="active-list sidebar_calc_box1"><span>2. Vælg form</span> <img
                  src="https://kirkedal.de/wp-content/images/form3.jpg" alt="" title=""></li>
              <li class="active-list sidebar_calc_box2"><span>3. Dimensioner</span><b class="dimention" style="  ">A:5X6
                  B: 5X4 A:5X6 B: 5X4 A:5X6 B: 5X4</b></li>
              <!--<li class="active-list sidebar_calc_box3"><span>4. Vælg profil</span> <img src="https://kirkedal.de/wp-content/uploads/2021/07/vaelg-profil-1.jpg" alt="" title=""></li>-->
              <li class="active-list sidebar_calc_box4"><span>4. Vælg terrassebræts længde</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2021/07/vaelg-stolpestorrelse2.jpg" alt="" title=""></li>
              <li class="active-list sidebar_calc_box5"><span>5. Vælg strø afstand</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2021/07/vaelg-topprofil.jpg" alt="" title=""></li>
              <li class="active-list sidebar_calc_box6"><span>6. Vælg afslutningsmuligheder</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
              <li class="active-list sidebar_calc_box7"><span>7. Tilbehør</span>
                <!--<img src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title="">-->
              </li>
            </ul>
          </div>
          <div class="total-row">
            <div class="te-price"> Total <br><span id="totaltotl2"></span> </div>
            <div class="button-row">
              <button type="button" id="printpdf">Print/Send beregningen</button>
              <button type="button" id="fuldskaerm">Fuldskærm 3D</button>
              <button type="button" id="nulstil">Nulstil</button>
              <button type="button" id="addtocart" style="display:none;">Tilføj indkøbskurven</button>
              <button type="button" id="testdemo">Se bagsiden</button>
              <button type="button" id="testroter">Skift retning</button>

            </div>
            <script>
              // $(".all-data-list-finel").hide();	
              /*jQuery("li.down-arrow-list").click(function(){
          
              jQuery(".all-data-list-finel").toggle();	
              });*/

              jQuery(document).on("click", '#testdemo', function () {
                //alert();
                jQuery(".modal-vo").find(".renderCanvas").remove();

                jQuery(".modal-vo").find(".show-3d-box").after('<canvas class="renderCanvas" id="renderCanvas" touch-action="none" style=" width: 100% !important;"></canvas>');

                flipfance = jQuery('#flipfance').val();
                if (flipfance == 0) {
                  jQuery('input#flipfance').val(1);
                  jQuery('.btn_beregn').trigger('click');
                } else {
                  jQuery('input#flipfance').val(0);
                  jQuery('.btn_beregn').trigger('click');
                }

                f_color = jQuery('#f_color').val();

                if (f_color == "Black") {
                  jQuery("#f_color").val("Grey");
                  jQuery('#testdemo').text("Se Grey");
                } else if (f_color == "Grey") {
                  jQuery("#f_color").val("Black");
                  jQuery('#testdemo').text("Se Black");
                } else if (f_color == "Oak") {
                  jQuery("#f_color").val("Hardwood");
                  jQuery('#testdemo').text("Se Hardwood");
                } else if (f_color == "Hardwood") {
                  jQuery("#f_color").val("Oak");
                  jQuery('#testdemo').text("Se Oak");
                }

                jQuery('.all-data-list-finel').hide();

              });

              jQuery(document).on("click", '#testroter', function () {
                //jQuery('#testroter').click(function(){
                jQuery(".modal-vo").find(".renderCanvas").remove();

                jQuery(".modal-vo").find(".show-3d-box").after('<canvas class="renderCanvas" id="renderCanvas" touch-action="none" style=" width: 100% !important;"></canvas>');

                rotarfance = jQuery('#rotarfance').val();
                if (rotarfance == 0) {
                  jQuery('input#rotarfance').val(1);
                  jQuery('.btn_beregn').trigger('click');
                } else {
                  jQuery('input#rotarfance').val(0);
                  jQuery('.btn_beregn').trigger('click');


                }
                jQuery('.all-data-list-finel').hide();
              });
            </script>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="calculator-box calculator-9" style="display:none">
    <div class="calculator-contact-box desktop-vo">
      <div class="col-4">
        <div class="ccb-list">
          <div class="ccb-list-box">
            <h2>DIT VALG</h2>
            <ul>
              <li class="active-list"><span>1. Serie / Terrasse</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
            </ul>
            <div class="serie-alu-hegn">
              <div class="serie-img"> <img src="https://kirkedal.de/wp-content/uploads/2021/07/serie-1.jpg" alt=""
                  title=""> </div>
              <div class="serie-img"> <img src="https://kirkedal.de/wp-content/uploads/2021/07/serie-2.jpg" alt=""
                  title=""> </div>
              <div class="serie-img"> <img src="https://kirkedal.de/wp-content/uploads/2021/07/serie-3.jpg" alt=""
                  title=""> </div>
              <div class="serie-img"> <img src="https://kirkedal.de/wp-content/uploads/2021/07/serie-4.jpg" alt=""
                  title=""> </div>
            </div>
          </div>
          <div class="total-row">
            <div class="te-price"> Total <span>26.244,60</span> </div>
            <div class="button-row">
              <button>Print/Send beregningen</button>
              <button style="display:none;"> Tilføj indkøbskurven</button>
            </div>
          </div>
        </div>
      </div>
      <div class="col-8">
        <div class="ccb-text">
          <div class="ccb-text-box">
            <div class="show-3d">
              <!-- <h3>3D show</h3>-->
              <div class="show-3d-box"> <img src="https://kirkedal.de/wp-content/uploads/2021/07/show-3d.jpg" alt=""
                  title=""> </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="tbl_custom_data">
      <table id="" style="width:100%;" cellspacing="0" cellpadding="5" border="0">
        <thead>
          <tr>
            <th>Beskrivelse</th>
            <th>Antal </th>
            <th>Varenr.</th>
            <th>Pris pr. stk. </th>
            <th>Total</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td data-label="Beskrivelse">Profil</td>
            <td data-label="Antal">132 stk. a K1</td>
            <td data-label="Varenr."> 1826497</td>
            <td data-label="Pris pr. stk."> 123,95 DDK</td>
            <td data-label="Total">16.757,40 EUR</td>
          </tr>
          <tr>
            <td data-label="Beskrivelse">Profil</td>
            <td data-label="Antal">132 stk. a K1</td>
            <td data-label="Varenr."> 1826497</td>
            <td data-label="Pris pr. stk."> 123,95 DDK</td>
            <td data-label="Total">16.757,40 EUR</td>
          </tr>
          <tr>
            <td data-label="Beskrivelse">Profil</td>
            <td data-label="Antal">132 stk. a K1</td>
            <td data-label="Varenr."> 1826497</td>
            <td data-label="Pris pr. stk."> 123,95 DDK</td>
            <td data-label="Total">16.757,40 EUR</td>
          </tr>
          <tr>
            <td data-label="Beskrivelse">Profil</td>
            <td data-label="Antal">132 stk. a K1</td>
            <td data-label="Varenr."> 1826497</td>
            <td data-label="Pris pr. stk."> 123,95 DDK</td>
            <td data-label="Total">16.757,40 EUR</td>
          </tr>
          <tr>
            <td data-label="Beskrivelse">Profil</td>
            <td data-label="Antal">132 stk. a K1</td>
            <td data-label="Varenr."> 1826497</td>
            <td data-label="Pris pr. stk."> 123,95 DDK</td>
            <td data-label="Total">16.757,40 EUR</td>
          </tr>
          <tr>
            <td data-label="Beskrivelse">Profil</td>
            <td data-label="Antal">132 stk. a K1</td>
            <td data-label="Varenr."> 1826497</td>
            <td data-label="Pris pr. stk."></td>
            <td data-label="Total">16.757,40 EUR</td>
          </tr>
          <tr>
            <td data-label="Beskrivelse">Profil</td>
            <td data-label="Antal">132 stk. a K1</td>
            <td data-label="Varenr."> 1826497</td>
            <td data-label="Pris pr. stk."> 123,95 DDK</td>
            <td data-label="Total">16.757,40 EUR</td>
          </tr>
          <tr>
            <td style="text-align: left;font-weight:800;">Total</td>
            <td colspan="4" style="text-align: right;font-weight:800;"><span>26.244,60</span> EUR <span
                style="font-weight:400;">inkl. moms</span></td>
          </tr>
        </tbody>
      </table>
      <p>Beregningen er kun vejledende og med forbehold for faktorer der påvirker udfaldet af beregningen. Det er på
        kundens eget ansvar at tjekke beregningen/antal.<br>
        Fragtpriser: Ab butik - 812,50 kr. Leveret til kantsten - 1.625,00 kr.<br>
        1 colli = 4 hegnsprofiler</p>
    </div>
    <div class="calculator-contact-box modal-vo">
      <div class="col-4">
        <div class="ccb-list">
          <div class="ccb-list-box">
            <h2>DIT VALG</h2>
            <ul>
              <li class="active-list"><span>1. Serie / Terrasse</span> <img
                  src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
            </ul>
            <div class="serie-alu-hegn">
              <div class="serie-img"> <img src="https://kirkedal.de/wp-content/uploads/2021/07/serie-1.jpg" alt=""
                  title=""> </div>
              <div class="serie-img"> <img src="https://kirkedal.de/wp-content/uploads/2021/07/serie-2.jpg" alt=""
                  title=""> </div>
              <div class="serie-img"> <img src="https://kirkedal.de/wp-content/uploads/2021/07/serie-3.jpg" alt=""
                  title=""> </div>
              <div class="serie-img"> <img src="https://kirkedal.de/wp-content/uploads/2021/07/serie-4.jpg" alt=""
                  title=""> </div>
            </div>
          </div>
          <div class="total-row">
            <div class="te-price"> Total <span>26.244,60</span> </div>
            <div class="button-row">
              <button>Print/Send beregningen</button>
              <button style="display:none;"> Tilføj indkøbskurven</button>
            </div>
          </div>
        </div>
      </div>
      <div class="col-8">
        <div class="ccb-text">
          <div class="ccb-text-box">
            <div class="show-3d">
              <!--  <h3>3D show</h3>-->
              <div class="show-3d-box"> <img src="https://kirkedal.de/wp-content/uploads/2021/07/show-3d.jpg" alt=""
                  title=""> </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<script
  src="https://maps.googleapis.com/maps/api/js?key=AIzaSyA8atx7IHiqGwW7pIxhDG52G8JAS-Oj1sU&amp;signed_in=false&amp;libraries=geometry,places,drawing"></script>
<script>
  jQuery(document).ready(function () {
    var row = '';
    var row_length = '';
    var row_height = '';
    var row_url_1 = '';
    var row_url_2 = '';
    var row_url_3 = '';
    var row_url_4 = '';
    var row_set = 0;

    jQuery("#printpdf").click(function (e) {

      e.preventDefault();
      if (jQuery("#pdf_product_name").val() == "") {

        jQuery.post("/wp-admin/admin-ajax.php", { action: "get_product_name", product_id: jQuery("#pdf_product_id").val() }, function (data) {
          jQuery("#pdf_product_name").val(data);
          jQuery("#pdf_product_skus").val(JSON.stringify(skus));
          jQuery("#pdf_print_form").submit();
        })
      }
      else if (ready_for_pdf == false) {
        e.preventDefault();
        BootstrapDialog.show({
          title: "Send PDF",
          message: jQuery('<div style="padding:20px;"></div>').load('/wp-content/themes/kallyas-child/templates/email_dialog.php?unique=' + guid())
        });
        return false;
      }
    });
    jQuery("#printpdf").click(function () {
      // alert();
      jQuery("#printsubmit").trigger("click");
    });
    jQuery("#printpdff").click(function () {
      jQuery("#printsubmit").trigger("click");
    });
    jQuery("#addtocart").click(function () {
      jQuery("#addtocartbutton").trigger("click");
    });

    jQuery(".btn_nexttrigger").click(function () {
      jQuery(".btn_next").trigger("click");
    });
    jQuery(".btn_tilbage").click(function () {
      jQuery(".active-list.sidebar_calc_box1").trigger("click");
      jQuery('#totop').click();
    });



    vaelgform = jQuery('#Volgform img').attr('src');
    jQuery('.calculator-box.calculator-1 .vaelg-form ul li').click(function () {

      vaelgform = jQuery(this).find('img').attr('src');
      //	console.log(vaelgform);
      jQuery('#Volgform img').attr('src', vaelgform);
      jQuery('#Volgform img').show();
      jQuery('.indsaet-dimensioner').find('img').attr('src', vaelgform);
      //jQuery('#form_img').val(vaelgform);
      jQuery('.ccb-list-box').find('.sidebar_calc_box1 img').attr('src', vaelgform);
      jQuery('#form_img').val(vaelgform);
      velgformdata_id = jQuery(this).attr('data_id');
      row = velgformdata_id;
      row_set = velgformdata_id;
      //console.log(velgformdata_id);
      //	 jQuery('#wqs_control_segment').val('set');
      // jQuery('#wqs_control_segment_1').val('set');
      jQuery('.dimensioner-form').find('.df-row').removeClass('activee');
      jQuery('.dimensioner-form').find('.df-row').hide();;
      if (velgformdata_id == '1') {
        jQuery(".dimensioner-form #form1_1").show();
        jQuery(".dimensioner-form #form1_1").addClass("activee");


      } else if (velgformdata_id == '2') {
        jQuery(".dimensioner-form #form2_2").show();
        jQuery(".dimensioner-form #form2_2").addClass("activee");
      }
      else if (velgformdata_id == '3') {
        jQuery(".dimensioner-form #form3_3").show();
        jQuery(".dimensioner-form #form3_3").addClass("activee");
      }
      else if (velgformdata_id == '4') {
        jQuery(".dimensioner-form #form4_4").show();
        jQuery(".dimensioner-form #form4_4").addClass("activee");
      }

      jQuery('.calculator-box').hide();
      jQuery('.calculator-box.calculator-2').show();
    });

    jQuery('.btn_next').click(function () {
      form_widths = [];
      form_lengths = [];
      form_lengthss = [];
      var all_inputs_filled = true;
      i = 0;

      jQuery(".dimensioner-form .activee .form-control").each(function () {
        form_lengthss.push(jQuery(this).val().replace(',', '.'));
        jQuery(this).css("border", "1px solid #ccc");
        if (jQuery(this).val() == "") {
          all_inputs_filled = false;
          jQuery(this).css("border", "1px solid red");
        }
        else {
          if (i === 0) {
            form_widths.push(jQuery(this).val().replace(',', '.'));
          }
          else if (i % 2 === 0) {
            form_widths.push(jQuery(this).val().replace(',', '.'))
          }
          else {
            form_lengths.push(jQuery(this).val().replace(',', '.'));
          }

        }
        //console.log(jQuery(this).val());
        /*if (all_inputs_filled)
         {
             var $accordion = jQuery("#accordion").accordion();

             var current = $accordion.accordion("option","active"),
                 maximum = $accordion.find("h3").length,
                 next = current+1 === maximum ? 0 : current+1;

             $accordion.accordion("option","active",next);
         }*/
        i++;
      });
      //console.log(form_lengthss.toString());
      //var heightt_width_strr= new Array();
      //var pdf_hidden_data='';
      //temp = new Array();
      //h = form_heights.toString();
      //temp = h.split(",");
      //lengths = new Array();
      //l= form_lengths.toString();
      //console.log(h);
      //console.log(l);
      //lengths = l.split(",");
      //console.log(lengths[0]);
      //side_cnt =0;
      /*jQuery.each( temp, function( key, value ) {
            heightt_width_strr[key]=value+'X'+lengths[key];
            //console.log(heightt_width_str);
            side_cnt++;
        });*/


      //	console.log(heightt_width_strr);

      heightt_width_strr = new Array();
      side_cnt = 0;
      cuuarray = ['A', 'B', 'C', 'D'];
      jQuery(".sidebar_calc_box2").find('.dimention').html('<ul class="myarraydata" style="padding:0;margin:0;"></ul>');
      jQuery.each(form_widths, function (key, value) {

        if (side_cnt == 0) {
          jQuery(".custom_completionlist_chk_side_a_wrap span.aval_span").html(' - ' + value + ' mtr');
          jQuery(".custom_completionlist_chk_side_b_wrap span.aval_span").html(' - ' + form_lengths[key] + ' mtr');
          jQuery(".custom_completionlist_chk_side_c_wrap span.aval_span").html(' - ' + value + ' mtr');
          jQuery(".custom_completionlist_chk_side_d_wrap span.aval_span").html(' - ' + form_lengths[key] + ' mtr');
        }
        if (side_cnt == 1) {
          jQuery(".custom_completionlist_chk_side_c_wrap span.aval_span").html(' - ' + value + ' mtr');
          jQuery(".custom_completionlist_chk_side_d_wrap span.aval_span").html(' - ' + form_lengths[key] + ' mtr');

        }
        if (side_cnt == 2) {
          jQuery(".custom_completionlist_chk_side_e_wrap span.aval_span").html(' - ' + value + ' mtr');
          jQuery(".custom_completionlist_chk_side_f_wrap span.aval_span").html(' - ' + form_lengths[key] + ' mtr');
        }
        if (side_cnt == 3) {
          jQuery(".custom_completionlist_chk_side_g_wrap span.aval_span").html(' - ' + value + ' mtr');
          jQuery(".custom_completionlist_chk_side_h_wrap span.aval_span").html(' - ' + form_lengths[key] + ' mtr');
        }

        heightt_width_strr[key] = value + 'X' + form_lengths[key];
        //console.log(heightt_width_str);

        heightt_width_strr[key] = '<li style="height:unset;    margin: 0;background-color: #f4f4f4;    margin-top: -5px;box-shadow: none;">' + cuuarray[key] + ' : ' + value + 'X' + form_lengths[key] + '</li>';
        heightt_width_strr = '<li style="height:unset;    margin: 0;background-color: #f4f4f4;    margin-top: -5px;box-shadow: none;">' + cuuarray[key] + ' : ' + value + 'X' + form_lengths[key] + '</li>';
        jQuery(".myarraydata").append(heightt_width_strr);
        side_cnt++;

      });
      splitheight = heightt_width_strr.toString();
      Vælgform = jQuery(".dimensioner-form .activee .hidPost").val();
      jQuery('#post').val(Vælgform);
      jQuery(".sidebar_calc_box2").find('span').attr("heightt_width_strr", splitheight);
      jQuery(".sidebar_calc_box2").find('span').attr("form_widths", form_widths);
      jQuery(".sidebar_calc_box2").find('span').attr("form_lengths", form_lengths);
      jQuery(".sidebar_calc_box2").find('span').attr("form_lengthss", form_lengthss.toString());
      jQuery(".sidebar_calc_box2").find('span').attr("Vælgform", Vælgform);

      jQuery('.calculator-box').hide();
      jQuery(this).parent('.calculator-box').next('.calculator-box').show();
      jQuery('#totop').click();

    });
    jQuery('.calculator-box.calculator-3 .product_item').click(function () {
      Vælgprofil = jQuery(this).find('img').attr('src');
      hidTop = jQuery(".hidTop").val();

      jQuery(".sidebar_calc_box3").find('img').attr('src', Vælgprofil);
      jQuery("#product_img").val(Vælgprofil);
      jQuery(".sidebar_calc_box3").find('img').attr('hidTop', hidTop);
      jQuery('#topmodel').val(hidTop);
      //console.log(hidTop);
      //cal_top_img1_wrap

      jQuery('.calculator-box').hide();
      jQuery('.calculator-box.calculator-4').show();
    });
    jQuery('.calculator-box.calculator-4 .product_item').click(function () {

      postsize_img = jQuery(this).find('img').attr('src');
      // console.log(postsize_img);
      f_attr_mm = jQuery(this).find('.hidFence').attr('attr_mm');
      f = jQuery(this).find('.hidFence').val();
      f_color = jQuery(this).find('.hidColor').val();
      jQuery('input#model').val(f);
      f_color = f_color.toLowerCase();
      jQuery('input#colorHidden').val(f_color);

      if (f_attr_mm == "130") {
        jQuery("input.hidEndekap[value='alu_click_stro_130mm']").closest("div").show();
        jQuery("input.hidEndekap[value='alu_click_stro_200mm']").closest("div").hide();
        jQuery("input.hidEndekap[value='alu_click_stro_300mm']").closest("div").hide();
      }
      if (f_attr_mm == "200") {
        jQuery("input.hidEndekap[value='alu_click_stro_200mm']").closest("div").show();
        jQuery("input.hidEndekap[value='alu_click_stro_130mm']").closest("div").hide();
        jQuery("input.hidEndekap[value='alu_click_stro_300mm']").closest("div").hide();
      }
      if (f_attr_mm == "300") {
        jQuery("input.hidEndekap[value='alu_click_stro_300mm']").closest("div").show();
        jQuery("input.hidEndekap[value='alu_click_stro_130mm']").closest("div").hide();
        jQuery("input.hidEndekap[value='alu_click_stro_200mm']").closest("div").hide();
      }

      if (f == "v25x150x4" || f == "v25x150x5" || f == "v25x150x6" || f == "v25x200x4" || f == "v25x200x5" || f == "v25x200x6") {
        jQuery("input.hidPostsize[value='Endekap3']").closest("div").show();
        jQuery("input.hidPostsize[value='Endekap4']").closest("div").show();
      }
      else {
        jQuery("input.hidPostsize[value='Endekap3']").closest("div").hide();
        jQuery("input.hidPostsize[value='Endekap4']").closest("div").hide();
      }
      jQuery("#product_img").val(postsize_img);
      jQuery(".sidebar_calc_box4").find('img').attr('src', postsize_img);
      jQuery(".sidebar_calc_box4").find('img').attr('f_attr_mm', f_attr_mm);
      jQuery(".sidebar_calc_box4").find('img').attr('f', f);
      jQuery(".sidebar_calc_box4").find('img').attr('f_color', f_color);

      if (f_color == "black") {
        jQuery("#testdemo").text("Se Black");
        jQuery("#f_color").val("Black");

      } else {

        jQuery("#testdemo").text("Se Oak");
        jQuery("#f_color").val("Oak");
      }


      jQuery('.calculator-box').hide();
      jQuery('.calculator-box.calculator-5').show();
      jQuery('#totop').click();
    });
    jQuery('.calculator-box.calculator-5 .product_item').click(function () {

      topprofil = jQuery(this).find('img').attr('src');
      c = jQuery(this).find('.hidEndekap').val();
      jQuery('#endekap').val(c);

      jQuery(".sidebar_calc_box5").find('img').attr('src', topprofil);
      jQuery(".sidebar_calc_box5").find('img').attr('c', c);

      if (c == "alu_click_stro_130mm") {

        jQuery(".calculator-box.calculator-7 .acc").removeClass('active').css("border", "1px solid rgb(244, 244, 244)").hide();
        jQuery(".calculator-box.calculator-7 .Strø").show();
      } else {

        jQuery(".calculator-box.calculator-7 .acc").show();
        jQuery(".calculator-box.calculator-7 .Strø").removeClass('active').css("border", "1px solid rgb(244, 244, 244)").hide();
      }



      jQuery('.calculator-box').hide();

      jQuery('.calculator-box.calculator-6').show();

      //alert(jQuery(".calculator-box.calculator-6 .product_item:visible").length);

      if (jQuery(".calculator-box.calculator-6 .product_item:visible").length == 1) {
        //alert(jQuery(".calculator-box.calculator-6 .product_item:visible").length);
        jQuery(".calculator-box.calculator-6 .product_item:visible").trigger('click');
      }

    });
    jQuery('.calculator-box.calculator-6 .product_item').click(function () {
      hidepostprofuke = jQuery(this).find('img').attr('src');
      c = jQuery(this).find('.hidPostsize').val();
      jQuery('#postsize').val(c);
      jQuery(".sidebar_calc_box6").find('img').attr('src', hidepostprofuke);
      jQuery(".sidebar_calc_box6").find('img').attr('postsize', c);
      jQuery('.calculator-box').hide();
      jQuery('.calculator-box.calculator-7').show();
    });

    accs = {};
    jQuery('.calculator-box.calculator-7 .product_item').click(function () {


      accessories = jQuery(this).find('img').attr('src');
      magicradio = jQuery(".magic-radio").val()
      acc = jQuery(this).find('img').attr('dataid');
      acckey = jQuery(this).find('img').attr('datakey');
      if (jQuery(this).hasClass("active")) {
        jQuery(this).removeClass("active");
        jQuery('.custom_completionlist_chk_wrap').removeClass('active');
        jQuery(this).css('border', '1px solid #f4f4f4');
        jQuery(this).find('.chekacc input[type="checkbox"]').prop("checked", false);
        accs[acckey] = '';
      }

      else {
        if (acc == 'acc11') {
          jQuery('.custom_completionlist_chk_wrap').addClass('active');
          custom_completionlist_chk_hide_show();
        }
        jQuery(this).removeClass("active");
        jQuery(this).addClass("active");
        jQuery(this).css('border', '1px solid #a9a9a9');
        jQuery(this).find('.chekacc input[type="checkbox"]').prop("checked", true);
        accs[acckey] = acc;
      }
      //accs[acckey] = acc;

      //console.log(accs);
      jQuery(".sidebar_calc_box7").find('img').attr('src', accessories);
      //jQuery(".sidebar_calc_box7").find('img').attr('led',magicradio);
      jQuery(".sidebar_calc_box7").find('img').attr('acc', acc);
      jQuery(".sidebar_calc_box7").find('img').attr('accs', JSON.stringify(accs));

      jQuery(".Vælgtilbehor").find('img').attr('src', accessories);
      //jQuery(".Vælgtilbehor").find('img').attr('led',magicradio);
      jQuery(".Vælgtilbehor").find('img').attr('acc', acc);
      jQuery(".Vælgtilbehor").find('img').show();
      //jQuery(this).find('input[type="checkbox"]').prop( "checked", true );
      console.log(jQuery(".magic-radio").val());

      //jQuery('.calculator-box').hide();
      //jQuery('.calculator-box.calculator-7').show();
    });
    function custom_completionlist_chk_hide_show() {
      var Vælgform = jQuery('input#post').val();
      if (Vælgform == 'opform1') {
        jQuery('.custom_completionlist_chk_side_a_wrap').show();
        jQuery('.custom_completionlist_chk_side_b_wrap').show();
        jQuery('.custom_completionlist_chk_side_c_wrap').show();
        jQuery('.custom_completionlist_chk_side_d_wrap').show();
        jQuery('.custom_completionlist_chk_side_e_wrap').hide();
        jQuery('.custom_completionlist_chk_side_f_wrap').hide();
        jQuery('.custom_completionlist_chk_side_g_wrap').hide();
        jQuery('.custom_completionlist_chk_side_h_wrap').hide();
      }
      if (Vælgform == 'opform2') {
        jQuery('.custom_completionlist_chk_side_a_wrap').show();
        jQuery('.custom_completionlist_chk_side_b_wrap').show();
        jQuery('.custom_completionlist_chk_side_c_wrap').show();
        jQuery('.custom_completionlist_chk_side_d_wrap').show();
        jQuery('.custom_completionlist_chk_side_e_wrap').show();
        jQuery('.custom_completionlist_chk_side_f_wrap').show();
        jQuery('.custom_completionlist_chk_side_g_wrap').hide();
        jQuery('.custom_completionlist_chk_side_h_wrap').hide();
      }
      if (Vælgform == 'opform3') {
        jQuery('.custom_completionlist_chk_side_a_wrap').show();
        jQuery('.custom_completionlist_chk_side_b_wrap').show();
        jQuery('.custom_completionlist_chk_side_c_wrap').show();
        jQuery('.custom_completionlist_chk_side_d_wrap').show();
        jQuery('.custom_completionlist_chk_side_e_wrap').show();
        jQuery('.custom_completionlist_chk_side_f_wrap').show();
        jQuery('.custom_completionlist_chk_side_g_wrap').show();
        jQuery('.custom_completionlist_chk_side_h_wrap').show();
      }
    }
    jQuery(".btn_beregn").click(function () {
      jQuery('.all-data-list-finel').hide();
      var len = jQuery('input#length').val();
      var w = jQuery('input#fWidth').val();
      var mod = jQuery('input#post').val();
      var tmod = jQuery('input#topmodel').val();
      var pst = jQuery('input#post').val();
      var Vælgplanke = jQuery('input#model').val();


      var Vælgform = jQuery('input#post').val();
      var Vælgtopprofil = "Retning3";
      var Vælgstolpe = jQuery('input#postsize').val();
      var Vælgendekap = jQuery('input#endekap').val();
      var length = jQuery('input#length').val();
      var width = jQuery('input#fWidth').val();
      var led = jQuery('input#led').val();
      var coord_text = jQuery("#coordinates").text();
      var fencetype = jQuery("#fencetype").val();
      //  var accessories =acc;
      var area = 0;
      if (Vælgplanke == "v18x130x4" || Vælgplanke == "v18x130x6") {
        //    $('#fence_color').find('option').remove().end().append('<option value="black">Black</option>').append('<option value="hardwood">Hardwood</option>').append('<option value="oak">Oak</option>').append('<option value="grey">Grey</option>');
      }
      else if (Vælgplanke == "v21x146x2") {
        //    $('#fence_color').find('option').remove().end().append('<option value="black">Black</option>').append('<option value="coffee">Coffee</option>').append('<option value="grey">Grey</option>').append('<option value="light_teak">Light Teak</option>').append('<option value="red">Red</option>');
      }
      else if (Vælgplanke == "v25x150x5") {
        //	$('#fence_color').find('option').remove().end().append('<option value="black">Black</option>');
      }
      else if (Vælgplanke == "v25x150x4") {
        //    $('#fence_color').find('option').remove().end().append('<option value="black">Black</option>');
      }
      else if (Vælgplanke == "v25x150x6") {
        //    $('#fence_color').find('option').remove().end().append('<option value="black">Black</option>');
      }
      else if (Vælgplanke == "v25x200x4") {
        //    $('#fence_color').find('option').remove().end().append('<option value="black">Black</option>');
      }
      else if (Vælgplanke == "v25x200x5") {
        //   $('#fence_color').find('option').remove().end().append('<option value="black">Black</option>');
      }

      else if (Vælgplanke == "v25x200x6") {
        //  $('#fence_color').find('option').remove().end().append('<option value="black">Black</option>');
      }
      else if (Vælgplanke == "v22x300x4") {
        //$('#fence_color').find('option').remove().end().append('<option value="black">Black</option>');
        //	$('#fence_color').find('option').remove().end().append('<option value="black">Black</option>').append('<option value="hardwood">Hardwood</option>').append('<option value="oak">Oak</option>').append('<option value="grey">Grey</option>').append('<option value="white">White</option>');
      }

      else if (Vælgplanke == "v22x300x6") {
        // $('#fence_color').find('option').remove().end().append('<option value="black">Black</option>');
        //	$('#fence_color').find('option').remove().end().append('<option value="black">Black</option>').append('<option value="hardwood">Hardwood</option>').append('<option value="oak">Oak</option>').append('<option value="grey">Grey</option>').append('<option value="white">White</option>');
      }

      if (Vælgplanke == "vwidex4" || Vælgplanke == "vwidex6") {
        // $('#fence_color').find('option').remove().end().append('<option value="black">Black</option>').append('<option value="hardwood">Hardwood</option>').append('<option value="oak">Oak</option>').append('<option value="grey">Grey</option>').append('<option value="white">White</option>');
      }
      // var Vælgfarve = jQuery('#fence_color').val();
      var Vælgfarve = jQuery('input#colorHidden').val();
      var switch_map = "true";
      if (coord_text.length > 10) {
        var str_pos = coord_text.indexOf("Areal:");
        if (str_pos >= 0) {
          coord_text = coord_text.substring(str_pos + 6, coord_text.indexOf("m2"));
          coord_text = coord_text.replace("m2", "");
          area = coord_text.replace(" ", "");
        }
      }
      if (switch_map_val == "1") switch_map = "false";
      var accessories = []; var accessories11 = [];
      if (jQuery("#Acc1").is(":checked")) accessories.push("acc1");
      if (jQuery("#Acc2").is(":checked")) accessories.push("acc2");
      if (jQuery("#Acc3").is(":checked")) accessories.push("acc3");
      if (jQuery("#Acc4").is(":checked")) accessories.push("acc4");
      if (jQuery("#Acc5").is(":checked")) accessories.push("acc5");
      if (jQuery("#Acc6").is(":checked")) accessories.push("acc6");
      if (jQuery("#Acc7").is(":checked")) accessories.push("acc7");
      if (jQuery("#Acc8").is(":checked")) accessories.push("acc8");
      if (jQuery("#Acc9").is(":checked")) accessories.push("acc9");
      if (jQuery("#Acc10").is(":checked")) accessories.push("acc10");
      if (jQuery("#Acc11").is(":checked")) {
        var Vælgform = jQuery('input#post').val();
        if (Vælgform == 'opform1') {
          if (jQuery('.custom_completionlist_chk_side_a_wrap .acc_check_val').is(":checked")) { accessories11.push("a"); }
          if (jQuery('.custom_completionlist_chk_side_b_wrap .acc_check_val').is(":checked")) { accessories11.push("b"); }
          if (jQuery('.custom_completionlist_chk_side_c_wrap .acc_check_val').is(":checked")) { accessories11.push("c"); }
          if (jQuery('.custom_completionlist_chk_side_d_wrap .acc_check_val').is(":checked")) { accessories11.push("d"); }

          if (jQuery('.custom_completionlist_chk_side_a_wrap .acc_check_val').is(":checked") || jQuery('.custom_completionlist_chk_side_b_wrap .acc_check_val').is(":checked") || jQuery('.custom_completionlist_chk_side_c_wrap .acc_check_val').is(":checked") || jQuery('.custom_completionlist_chk_side_d_wrap .acc_check_val').is(":checked")) {

          } else {
            alert('Please select any side for Completionlist Heimdal');
            return false;
          }




        }
        if (Vælgform == 'opform2') {
          if (jQuery('.custom_completionlist_chk_side_a_wrap .acc_check_val').is(":checked")) { accessories11.push("a"); }
          if (jQuery('.custom_completionlist_chk_side_b_wrap .acc_check_val').is(":checked")) { accessories11.push("b"); }
          if (jQuery('.custom_completionlist_chk_side_c_wrap .acc_check_val').is(":checked")) { accessories11.push("c"); }
          if (jQuery('.custom_completionlist_chk_side_d_wrap .acc_check_val').is(":checked")) { accessories11.push("d"); }
          if (jQuery('.custom_completionlist_chk_side_e_wrap .acc_check_val').is(":checked")) { accessories11.push("e"); }
          if (jQuery('.custom_completionlist_chk_side_f_wrap .acc_check_val').is(":checked")) { accessories11.push("f"); }

          if (jQuery('.custom_completionlist_chk_side_a_wrap .acc_check_val').is(":checked") || jQuery('.custom_completionlist_chk_side_b_wrap .acc_check_val').is(":checked") || jQuery('.custom_completionlist_chk_side_c_wrap .acc_check_val').is(":checked") || jQuery('.custom_completionlist_chk_side_d_wrap .acc_check_val').is(":checked") || jQuery('.custom_completionlist_chk_side_e_wrap .acc_check_val').is(":checked") || jQuery('.custom_completionlist_chk_side_f_wrap .acc_check_val').is(":checked")) {

          } else {
            alert('Please select any side for Completionlist Heimdal');
            return false;
          }
        }
        if (Vælgform == 'opform3') {
          if (jQuery('.custom_completionlist_chk_side_a_wrap .acc_check_val').is(":checked")) { accessories11.push("a"); }
          if (jQuery('.custom_completionlist_chk_side_b_wrap .acc_check_val').is(":checked")) { accessories11.push("b"); }
          if (jQuery('.custom_completionlist_chk_side_c_wrap .acc_check_val').is(":checked")) { accessories11.push("c"); }
          if (jQuery('.custom_completionlist_chk_side_d_wrap .acc_check_val').is(":checked")) { accessories11.push("d"); }
          if (jQuery('.custom_completionlist_chk_side_e_wrap .acc_check_val').is(":checked")) { accessories11.push("e"); }
          if (jQuery('.custom_completionlist_chk_side_f_wrap .acc_check_val').is(":checked")) { accessories11.push("f"); }
          if (jQuery('.custom_completionlist_chk_side_g_wrap .acc_check_val').is(":checked")) { accessories11.push("g"); }
          if (jQuery('.custom_completionlist_chk_side_h_wrap .acc_check_val').is(":checked")) { accessories11.push("h"); }

          if (jQuery('.custom_completionlist_chk_side_a_wrap .acc_check_val').is(":checked") || jQuery('.custom_completionlist_chk_side_b_wrap .acc_check_val').is(":checked") || jQuery('.custom_completionlist_chk_side_c_wrap .acc_check_val').is(":checked") || jQuery('.custom_completionlist_chk_side_d_wrap .acc_check_val').is(":checked") || jQuery('.custom_completionlist_chk_side_e_wrap .acc_check_val').is(":checked") || jQuery('.custom_completionlist_chk_side_f_wrap .acc_check_val').is(":checked") || jQuery('.custom_completionlist_chk_side_g_wrap .acc_check_val').is(":checked") || jQuery('.custom_completionlist_chk_side_h_wrap .acc_check_val').is(":checked")) {

          } else {
            alert('Please select any side for Completionlist Heimdal');
            return false;
          }
        }
        accessories.push("acc11");
      }
      lent = jQuery(".sidebar_calc_box2").find('span').attr("form_lengthss");
      length = '';
      width = '';
      var dataString = '&length=' + length + '&width=' + width + '&Vælgplanke=' + Vælgplanke + '&Vælgfarve=' + Vælgfarve
        + '&Vælgform=' + Vælgform + '&led=' + led + '&Vælgtopprofil=' + Vælgtopprofil + '&Vælgstolpe=' + Vælgstolpe + '&Vælgendekap=' + Vælgendekap +
        '&switchMap=' + switch_map + '&area=' + area + "&form_lengths=" + lent + "&form_widths=" + form_widths.join();
      if (accessories.length > 0) dataString += "&accessories=" + accessories.toString();
      if (accessories11.length > 0) dataString += "&accessories11=" + accessories11.toString();

      //fence_color = jQuery("#fence_color").val();
      fence_color = jQuery("#colorHidden").val();

      //var product_type = jQuery("#fencetype1").val();
      var product_type = jQuery("input#model").val();

      var product_id = 0;
      var variation_id = 0;
      var main_products = {};
      if (product_type == "v18x130x4" || product_type == "v18x130x6") {
        main_products = {
          black: { product_id: 1134, variations: { v18x130x6: 1326 } },
          hardwood: { product_id: 1132, variations: { v18x130x4: 1323, v18x130x6: 1324 } },
          oak: { product_id: 1135, variations: { v18x130x4: 1327, v18x130x6: 1328 } },
          grey: { product_id: 1143, variations: { v18x130x4: 1329, v18x130x6: 1330 } }
        };
      }
      else if (product_type == "v25x200x4" || product_type == "v25x200x5" || product_type == "v25x200x6") {
        main_products = {
          black: { product_id: 1686, variations: { v25x200x4: 1687, v25x200x5: 1688, v25x200x6: 1689 } }

        };
      }

      else if (product_type == "v22x300x4" || product_type == "v22x300x6") {
        main_products = {
          black: { product_id: 1219, variations: { v22x300x4: 1340, v22x300x6: 1341 } },
          hardwood: { product_id: 1247, variations: { v22x300x4: 1359, v22x300x6: 1360 } },
          //oak:{product_id:4537,variations:{v22x300x4:4542,v22x300x6:4541}},
          grey: { product_id: 1246, variations: { v22x300x4: 1357, v22x300x6: 1358 } },
          //grey:{product_id:4540,variations:{v22x300x4:4539,v22x300x6:4538}}
          oak: { product_id: 1245, variations: { v22x300x4: 1354, v22x300x6: 1355 } },
          white: { product_id: 1249, variations: { v22x300x4: 1363, v22x300x6: 1364 } }
        };
      }
      else if (product_type == "vwidex4" || product_type == "vwidex6") {
        main_products = {
          black: { product_id: 1145, variations: { vwidex4: 1332, vwidex6: 1333 } },
          hardwood: { product_id: 1146, variations: { vwidex4: 1334, vwidex6: 1335 } },
          oak: { product_id: 1147, variations: { vwidex4: 1336, vwidex6: 1337 } },
          grey: { product_id: 1148, variations: { vwidex4: 1338, vwidex6: 1339 } },
          white: { product_id: 1248, variations: { vwidex4: 1361, vwidex6: 1362 } }
        };
      }
      else if (product_type == "v22x130x6") {
        main_products = {
          black: { product_id: 2214, variations: { v22x130x6: 2214 } },
          hardwood: { product_id: 2213, variations: { v22x130x6: 2224 } }

        };
      }
      else if (product_type == "v22x200x6") {
        main_products = {
          black: { product_id: 2212, variations: { v22x200x6: 2221 } },
          hardwood: { product_id: 2211, variations: { v22x200x6: 2219 } }

        };
      }
      else if (product_type == "v22x300x6") {
        main_products = {
          black: { product_id: 2365, variations: { v22x300x6: 2367 } },
          hardwood: { product_id: 2209, variations: { v22x300x6: 2216 } }

        };
      }




      else {
        main_products = {
          black: { product_id: 226, variations: { v21x146x2: 844, v25x150x4: 838, v25x150x5: 839, v25x150x6: 840 } },
          coffee: { product_id: 845, variations: { v21x146x2: 846, v25x150x4: 852, v25x150x6: 850 } },
          grey: { product_id: 863, variations: { v21x146x2: 864, v25x150x4: 870, v25x150x6: 868 } },
          /*dark_teak:{product_id:882,variations:{v21x146x2:883,v25x150x4:889,v25x150x6:887}},*/
          light_teak: { product_id: 872, variations: { v21x146x2: 873, v25x150x4: 879, v25x150x6: 877 } },
          red: { product_id: 854, variations: { v21x146x2: 855, v25x150x4: 861, v25x150x6: 859 } }
        };
      }

      var main_product = main_products[fence_color];

      dataString += '&product_id=' + main_product.product_id + "&product_variation_id=" + main_product.variations[product_type] + "&fenceheightcount=" + fencetype;
      //console.log(dataString);


      /**/
      //jQuery(".sidebar_calc_box2").find('span').attr("form_widths",form_widths);
      //jQuery(".sidebar_calc_box2").find('span').attr("form_lengths",form_lengths);
      var lengths1 = [];
      jQuery(".dimensioner-form .activee .form-control").each(function () {
        lengths1.push(jQuery(this).val());
      });
      /*var heights1 = [];
      jQuery("[id*=height_]").each(function()
      {
        heights1.push(jQuery(this).val());
      });*/

      var height_width_str = '';
      var pdf_hidden_data = '';
      var sideindex = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'N', 'O'];
      var side_cnt = 0;
      //console.log(lengths1);

      jQuery.each(lengths1, function (key, value) {
        //console.log(value);
        if (value != "") {
          //alert(key+'--'+value+'-height:'+lengths[key]);
          height_width_str = height_width_str + 'Side ' + sideindex[side_cnt] + ' - B:' + lengths1[key] + 'm<br/>';
          pdf_hidden_data = pdf_hidden_data + '<input type="hidden" name="height_with_data[]" value="Side ' + sideindex[side_cnt] + '-H:' + value + 'm - B:' + lengths1[key] + 'm"/>'
          side_cnt++;
        }
      });
      jQuery('.hidden_pdf_data').html(pdf_hidden_data);
      jQuery('.height_with_info').html(height_width_str);
      /**/

      jQuery(".ajax_loader_wrap").addClass('active');
      jQuery.ajax({
        type: "POST",
        dataType: 'json',
        url: "/wp-content/calculationter_new.php",
        data: dataString,
        success: function (msg) {
          //console.log(msg);
          jQuery("#pdf_product_name").val('');
          /* var $accordion = jQuery("#accordion").accordion();
           var current = $accordion.accordion("option","active"),
               maximum = $accordion.find("h3").length,
               next = current+1 === maximum ? 0 : current+1;
           $accordion.accordion("option","active",next);*/
          if (msg[32] == 0) {
            jQuery('#area1').parents("tr").hide();
          } else {
            jQuery('#area1').attr('value', msg[32]);
            jQuery('#area1html').html(new Intl.NumberFormat('de-DE').format(msg[32]));
            jQuery('#area1').parents("tr").show();
          }
          jQuery('#wqs_overwrite').html(msg[32] + '<span id="wqs_m"> M</span><span id="wqs_2">2</span>');
          jQuery('#length1').val(msg[0]);
          jQuery('#width1').val(msg[1]);
          if (msg[2] == 0) {
            jQuery('#fence1').parents("tr").hide();
          } else {
            jQuery('#fence1').parents("tr").show();
            jQuery('#fence1').val(msg[2]);
            jQuery('#fence1html').html(msg[2]);
          }

          jQuery('#fence1_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[36][0]['fence1_rate']));

          jQuery('#fence1_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[36][0]['fence1_total']));
          jQuery('#fence1_sku').text("DB " + msg[36][0]['fence1_sku']);

          jQuery('#top1').val(msg[3]);
          if (msg[4] == 0) {
            jQuery('#post1').parents("tr").hide();
          } else {
            jQuery('#post1').parents("tr").show();
            jQuery('#post1').val(msg[4]);
            jQuery('#post1html').html(msg[4]);
          }

          jQuery('#post1_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[36][0]['post1_rate']));

          jQuery('#post1_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[36][0]['post1_total']));
          jQuery('#post1_sku').text("DB " + msg[36][0]['post1_sku']);
          if (msg[45] == 0) {
            jQuery('#connector').parents("tr").hide();
          } else {
            jQuery('#connector').parents("tr").show();
            jQuery('#connector').val(msg[45]);
            jQuery('#connectorhtml').html(msg[45]);
          }

          jQuery('#connector_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[36][0]['connector_rate']));

          jQuery('#connector_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[36][0]['connector_total']));
          jQuery('#connector_sku').text("DB " + msg[36][0]['connector_sku']);
          jQuery('#connector_id').val(msg[36][0]['connector_id']);



          if (msg[46] == 0) {
            jQuery('#alu_click_endekap').parents("tr").hide();
          } else {
            jQuery('#alu_click_endekap').parents("tr").show();
            jQuery('#alu_click_endekap').val(msg[46]);
            jQuery('#alu_click_endekaphtml').html(msg[46]);
          }

          jQuery('#alu_click_endekap_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[36][0]['alu_click_endekap_rate']));

          jQuery('#alu_click_endekap_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[36][0]['alu_click_endekap_total']));
          jQuery('#alu_click_endekap_sku').text("DB " + msg[36][0]['alu_click_endekap_sku']);
          jQuery('#alu_click_endekap_id').val(msg[36][0]['alu_click_endekap_id']);

          jQuery('#led1').val(msg[5]);
          jQuery('#total').val(msg[6]);
          jQuery('#totaltotl').html(msg[6]);
          jQuery('#totaltotll').html(msg[6]);
          jQuery('#totaltotl2').html(msg[6]);
          jQuery('#skruer1').val(msg[7]);
          if (msg[8] == 0) {
            jQuery('#stolpe1').parents("tr").hide();
          } else {
            jQuery('#stolpe1').parents("tr").show();
            jQuery('#stolpe1').val(msg[8]);
            jQuery('#stolpe1html').html(msg[8]);
          }

          jQuery('#stolpe1_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[36][0]['stolpe1_rate']));

          jQuery('#stolpe1_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[36][0]['stolpe1_total']));
          jQuery('#stolpe1_sku').text("DB " + msg[36][0]['stolpe1_sku']);

          //jQuery('#slutstolpe1').val(msg[9]);
          if (msg[10] == 0) {
            jQuery('#topklods1').parents("tr").hide();
          } else {
            jQuery('#topklods1').parents("tr").show();
            jQuery('#topklods1').val(msg[10]);
            jQuery('#topklods1html').html(msg[10]);
          }

          jQuery('#topklods1_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[36][0]['topklods1_rate']));

          jQuery('#topklods1_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[36][0]['topklods1_total']));
          jQuery('#topklods1_sku').text("DB " + msg[36][0]['topklods1_sku']);
          if (msg[11] == 0) {
            jQuery('#topskruer1').parents("tr").hide();
          } else {
            jQuery('#topskruer1').parents("tr").show();
            jQuery('#topskruer1').val(msg[11]);
            jQuery('#topskruer1html').html(msg[11]);
          }

          jQuery('#topskruer1_id').val(msg[36][0]['topskruer1_id']);

          jQuery('#topskruer1_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[36][0]['topskruer1_rate']));

          jQuery('#topskruer1_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[36][0]['topskruer1_total']));
          jQuery('#topskruer1_sku').text("DB " + msg[36][0]['topskruer1_sku']);

          //console.log(msg[36][0]['topskruer1_sku']);

          jQuery('#endekap1').val(msg[12]);
          jQuery('#power1').val(msg[13]);
          jQuery('#fencetype1').val(msg[14]);
          jQuery('#clips_type').val(msg[33]);
          jQuery('#topprofiletype1').val(msg[15]);
          jQuery('#farve1').val(msg[16]);
          jQuery('#postsize1').val(msg[17]);
          jQuery('#postsizetype1').val(msg[18]);
          jQuery('#endekaptype1').val(msg[19]);
          if (msg[22] == 0) {
            jQuery('#acc1_cnt').parents("tr").hide();
          } else {
            jQuery('#acc1_cnt').parents("tr").show();
            jQuery('#acc1_cnt').val(msg[22]);
            jQuery('#acc1_cnthtml').html(msg[22]);
          }

          jQuery('#acc1_cnt_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[36][0]['acc1_cnt_rate']));

          jQuery('#acc1_cnt_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[36][0]['acc1_cnt_total']));
          if (msg[37] == 0) {
            jQuery('#acc6_cnt').parents("tr").hide();
          } else {
            jQuery('#acc6_cnt').parents("tr").show();
            jQuery('#acc6_cnt').val(msg[37]);
            jQuery('#acc6_cnthtml').html(msg[37]);

          }
          jQuery('#acc6_cnt_sku').text("DB " + msg[36][0]['acc6_cnt_sku']);

          jQuery('#acc6_cnt_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[36][0]['acc6_cnt_rate']));

          jQuery('#acc6_cnt_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[36][0]['acc6_cnt_total']));
          if (msg[39] == 0) {
            jQuery('#acc7_cnt').parents("tr").hide();
          } else {
            jQuery('#acc7_cnt').parents("tr").show();
            jQuery('#acc7_cnt').val(msg[39]);
            jQuery('#acc7_cnthtml').html(msg[39]);
          }
          jQuery('#acc7_cnt_sku').text("DB " + msg[36][0]['acc7_cnt_sku']);

          jQuery('#acc7_cnt_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[36][0]['acc7_cnt_rate']));

          jQuery('#acc7_cnt_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[36][0]['acc7_cnt_total']));
          if (msg[41] == 0) {
            jQuery('#acc8_cnt').parents("tr").hide();
          } else {
            jQuery('#acc8_cnt').parents("tr").show();
            jQuery('#acc8_cnt').val(msg[41]);
            jQuery('#acc8_cnthtml').html(msg[41]);
          }
          jQuery('#acc8_cnt_sku').text("DB " + msg[36][0]['acc8_cnt_sku']);

          jQuery('#acc8_cnt_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[36][0]['acc8_cnt_rate']));

          jQuery('#acc8_cnt_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[36][0]['acc8_cnt_total']));

          if (msg[43] == 0) {
            jQuery('#acc9_cnt').parents("tr").hide();
          } else {
            jQuery('#acc9_cnt').parents("tr").show();
            jQuery('#acc9_cnt').val(msg[43]);
            jQuery('#acc9_cnthtml').html(msg[43]);

          }

          jQuery('#acc9_cnt_sku').text("DB " + msg[36][0]['acc9_cnt_sku']);
          jQuery('#acc9_cnt_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[36][0]['acc9_cnt_rate']));

          jQuery('#acc9_cnt_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[36][0]['acc9_cnt_total']));


          //jQuery('#topskruer1_sku').text(msg[36][0]['topskruer1_sku']);

          jQuery('#acc2_cnt').val(msg[24]);
          if (msg[26] == 0) {
            jQuery('#acc3_cnt').parents("tr").hide();
          } else {
            jQuery('#acc3_cnt').parents("tr").show();
            jQuery('#acc3_cnt').val(msg[26]);
            jQuery('#acc3_cnthtml').html(msg[26]);
          }
          jQuery('#acc3_cnt_sku').text("DB " + msg[36][0]['acc3_cnt_sku']);
          jQuery('#acc3_cnt_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[36][0]['acc3_cnt_rate']));

          jQuery('#acc3_cnt_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[36][0]['acc3_cnt_total']));

          jQuery('#acc4_cnt').val(msg[28]);
          if (msg[30] == 0) {
            jQuery('#acc5_cnt').parents("tr").hide();
          } else {
            jQuery('#acc5_cnt').parents("tr").show();
            jQuery('#acc5_cnt').val(msg[30]);
            jQuery('#acc5_cnthtml').html(msg[30]);
          }

          jQuery('#acc5_cnt_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[36][0]['acc5_cnt_rate']));
          jQuery('#acc5_cnt_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[36][0]['acc5_cnt_total']));

          jQuery('#acc5_cnt_sku').text("DB " + msg[36][0]['acc5_cnt_sku']);


          if (msg[36][0]['acc10_pakker_needed'] == 0) {
            jQuery('#acc10_cnt').parents("tr").hide();
          } else {
            jQuery('#acc10_cnt').parents("tr").show();
            jQuery('#acc10_cnt').val(msg[36][0]['acc10_pakker_needed']);
            jQuery('#acc10_cnthtml').html(msg[36][0]['acc10_pakker_needed']);

            jQuery('#pdf_acc10_cnt').val(msg[36][0]['acc10_pakker_needed']);
          }
          console.log('msg', msg);
          if (typeof msg[36][0]['acc10_cnt_sku'] === "undefined") {
            jQuery('#acc10_cnt').parents("tr").hide();
            jQuery('#acc10_cnt_rate').text("0 EUR");
            jQuery('#acc10_cnthtml').text("0");
            jQuery('#acc10_cnt_total').text("0 EUR");
            jQuery('#acc10_cnt_sku').text("");

          } else {
            jQuery('#acc10_cnt').parents("tr").show();
            jQuery('#acc10_cnt_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[36][0]['acc10_cnt_rate']));
            jQuery('#acc10_cnthtml').text(msg[36][0]['acc10_pakker_needed']);
            jQuery('#acc10_cnt_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[36][0]['acc10_cnt_total']));
            jQuery('#acc10_cnt_sku').text("DB " + msg[36][0]['acc10_cnt_sku']);
          }

          if (msg[51] == 0) {
            jQuery('#acc11_cnt').parents("tr").hide();
          } else {
            jQuery('#acc11_cnt').parents("tr").show();
            jQuery('#acc11_cnt').val(msg[51]);
            jQuery('#acc11_cnthtml').html(msg[51]);
          }

          if (typeof msg[36][0]['acc11_cnt_sku'] === "undefined") {
            jQuery('#acc11_cnt').parents("tr").hide();
            jQuery('#acc11_cnt_rate').text("0 EUR");

            jQuery('#acc11_cnt_total').text("0 EUR");
            jQuery('#acc11_cnt_sku').text("");

          } else {

            jQuery('#acc11_cnt_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[36][0]['acc11_cnt_rate']));

            jQuery('#acc11_cnt_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[36][0]['acc11_cnt_total']));
            jQuery('#acc11_cnt_sku').text("DB " + msg[36][0]['acc11_cnt_sku']);
          }


          if (msg[14] == 'v25x200x4' || msg[14] == 'v25x200x5' || msg[14] == 'v25x200x6') {
            jQuery('#slutstolpe1_id').parents("tr").show();
            jQuery('#wqs_clips_num').html('50');
            jQuery('#wqs_clip_stk').val(50);
            jQuery('#slutstolpe1').val(msg[9] * 2);
            slutstolpe1html = jQuery('#slutstolpe1').val();
            // console.log(slutstolpe1html);
            jQuery('#slutstolpe1html').html(slutstolpe1html);
            jQuery('#slutstolpe1_id').val(msg[36][0]['slutstolpe1_id']);

            jQuery('#slutstolpe1_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[36][0]['slutstolpe1_rate']));

            jQuery('#slutstolpe1_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[36][0]['slutstolpe1_total']));
            jQuery('#slutstolpe1_sku').text("DB " + msg[36][0]['slutstolpe1_sku']);


            jQuery('#wqs_clip_count').val(msg[9] * 2);
          } else {
            jQuery('#slutstolpe1_id').parents("tr").show();
            jQuery('#wqs_clips_num').html('100');
            jQuery('#wqs_clip_stk').val(100);
            jQuery('#slutstolpe1').val(msg[9]);
            jQuery('#slutstolpe1html').html(msg[9]);
            jQuery('#slutstolpe1_id').val(msg[36][0]['slutstolpe1_id']);

            jQuery('#slutstolpe1_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[36][0]['slutstolpe1_rate']));

            jQuery('#slutstolpe1_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[36][0]['slutstolpe1_total']));
            jQuery('#slutstolpe1_sku').text("DB " + msg[36][0]['slutstolpe1_sku']);

            jQuery('#wqs_clip_count').val(msg[9]);
          }
          //alert(jQuery('#wqs_clips_num').html());

          fencerowh = jQuery("#fencetype").val();

          if (fencerowh == '') {
            vælgform = jQuery(".sidebar_calc_box3").find('img').attr('hidcolor');
            myJsonString = {};
            var cnt_main = 0;
            jQuery.each(msg[49], function (index, value) {
              //console.log(value.length);
              lengthss = value.length;
              myarr = {};

              for (i = 0; i < lengthss; i++) {
                subArr = [];

                subArr['heigth'] = value.heights;
                subArr['lengthss'] = lengthss;
                myarr[i] = { 'heigth': value.heights, 'lengthss': lengthss, 'f_row_type': 'fence', 'color': vælgform };//subArr; //.push(Object.assign({}, subArr));
              }
              myJsonString[cnt_main] = myarr;
              cnt_main++;
            });
            myJsonString = JSON.stringify(myJsonString);
            jQuery("#fencetype").val(myJsonString);
            //console.log("fancxe="+myJsonString);
          } else {
            //fencetypee = jQuery("#fencetype").val();
            //console.log(JSON.parse(fencetypee));

          }
          //console.log(row+'roww');

          //msg[16]="grey";
          // console.log("msg[49]"+msg[49]);
          // msg[37]=[{length: 3, heights: 13}];
          console.log("row_set" + row_set);

          if (jQuery('input#post').val() == 'opform1') {
            myJsonStrings = JSON.stringify((msg[49]));
            jQuery("#msgarr").val(myJsonStrings);
            jQuery("#instanceCounti").val(msg[49][0]['length']);

          }
          if (jQuery('input#post').val() == 'opform2') {
            myJsonStrings = JSON.stringify((msg[49][0]));
            jQuery("#instanceCounti").val(msg[49][0][0]['length']);
            jQuery("#msgarr").val(myJsonStrings);

            myJsonStrings1 = JSON.stringify((msg[49][1]));
            jQuery("#instanceCountl").val(msg[49][1][0]['length']);
            jQuery("#msgarr2").val(myJsonStrings1);




          }

          if (jQuery('input#post').val() == 'opform3') {
            myJsonStrings = JSON.stringify((msg[49][0]));
            jQuery("#instanceCounti").val(msg[49][0][0]['length']);
            jQuery("#msgarr").val(myJsonStrings);

            myJsonStrings1 = JSON.stringify((msg[49][1]));
            jQuery("#instanceCountl").val(msg[49][1][0]['length']);
            jQuery("#msgarr2").val(myJsonStrings1);

            myJsonStrings2 = JSON.stringify((msg[49][2]));
            jQuery("#instanceCountu").val(msg[49][2][0]['length']);
            jQuery("#msgarr3").val(myJsonStrings2);




          }


          fencerowheight = jQuery("#fencetype").val();



          if (fencerowheight != '') {
            myfunction();
          }


          printtotal();
          topprofile();
          pdf1();
          var pdf_product_id = jQuery("#pdf_product_id").val();
          //console.log(pdf_product_id);
          if (pdf_product_id != "" && pdf_product_id != undefined) {
            for (var i = 0; i < product_names.length; i++) {
              // console.log(product_names[i]);
              if (product_names[i].id == pdf_product_id) {
                jQuery("span#gettotal").text(product_names[i].title);
              }
            }
          }
          resizetextbox();

          jQuery('.tbl_custom_data tr:visible:odd').css('background', '#f5f5f5');
        }
      });



    });

    jQuery(".btn_beregn").click(function () {
      fencetype = jQuery("#fencetype").val();
      if (fencetype == '') {
        // myfunction();

      }
    });

    jQuery('.calculator-box.calculator-7 .btn_beregn').click(function () {
      jQuery('.calculator-box').hide();
      jQuery('.calculator-box.calculator-8').show();
    });

    jQuery('.active-list.sidebar_calc_box1').click(function () {
      jQuery('.calculator-box').hide(); jQuery('.calculator-box.calculator-1').show();
      jQuery('#totop').click();
    });
    jQuery('.active-list.sidebar_calc_box2').click(function () {
      jQuery('.calculator-box').hide(); jQuery('.calculator-box.calculator-2').show();
      jQuery('#totop').click();
    });
    jQuery('.active-list.sidebar_calc_box3').click(function () {
      jQuery('.calculator-box').hide(); jQuery('.calculator-box.calculator-3').show();
      jQuery('#totop').click();
    });
    jQuery('.active-list.sidebar_calc_box4').click(function () {
      jQuery('.calculator-box').hide(); jQuery('.calculator-box.calculator-4').show();
      jQuery('#totop').click();
    });
    jQuery('.active-list.sidebar_calc_box5').click(function () {
      jQuery('.calculator-box').hide(); jQuery('.calculator-box.calculator-5').show();
      jQuery('#totop').click();
    });
    jQuery('.active-list.sidebar_calc_box6').click(function () {
      jQuery('.calculator-box').hide(); jQuery('.calculator-box.calculator-6').show();
      jQuery('#totop').click();
    });
    jQuery('.active-list.sidebar_calc_box7').click(function () {
      jQuery('.calculator-box').hide(); jQuery('.calculator-box.calculator-7').show();
      jQuery('#totop').click();
    });



  });
</script>
<script>
  /*  jQuery(window).load(function()
    {
        jQuery("#accordion" ).accordion({
            collapsible: true,
            active: false
        });
    });*/
  function switchMap() {
    jQuery("#lengthsTable").toggle();
    jQuery("#mapTable").toggle();
  }
  jQuery(document).ready(function () {
    jQuery("#lengthsTable").css("display", "none");
  });

  function select_map(val) {
    clearShape();
    switch_map_val = val;
    if (val == "1") {
      jQuery("#forms_table").css("display", "none");
      jQuery("#lengthsTable").css("display", "none");
      jQuery("#mapTable").css("display", "block");
      jQuery("#switchMap").prop("checked", false);
      if (!map_init) {
        map_init = true;
        initMap();
      }
    }
    else {
      jQuery("#forms_table").css("display", "block");
      jQuery("#lengthsTable").css("display", "none");
      jQuery("#nextbtn_table").css("display", "none");
      jQuery("#mapTable").css("display", "none");
      jQuery("#switchMap").prop("checked", true);
      jQuery("#angles_div").html("");
      jQuery("#heightTable").css("display", "none");
    }
    var $accordion = jQuery("#accordion").accordion();
    var current = $accordion.accordion("option", "active"),
      maximum = $accordion.find("h3").length,
      next = current + 1 === maximum ? 0 : current + 1;
    $accordion.accordion("option", "active", next);

  }

  function add_to_cart() {
    var fence_color = "";
    if (jQuery("#fence_color").val() == "" || jQuery("#fence_color").val() == undefined) {
      alert("Please select color");
      jQuery("#fence_color").focus();
      return false;
    }
    // fence_color = jQuery("#fence_color").val();
    fence_color = jQuery('input#colorHidden').val();
    fence_color = fence_color.toLowerCase();
    endekaps = { endekap1: 261, endekap2: 241, endekap3: 250, endekap4: 825 };
    stroer_id = 1126;
    //if (jQuery("#topskruer1_id").val()!="")
    {
      stroer_id = jQuery("#topskruer1_id").val();
    }
    connector_id = 0;
    if (jQuery("#connector_id").val() != "") {
      connector_id = jQuery("#connector_id").val();
    }

    alu_click_endekap_id = 0;
    if (jQuery("#alu_click_endekap_id").val() != "") {
      alu_click_endekap_id = jQuery("#alu_click_endekap_id").val();
    }

    clips_id = 259;
    var clips_type = jQuery('#clips_type').val();
    /*if (clips_type == "clips_solid") clips_id = 1983;
    if (clips_type == "clips_wide") clips_id = 1691;*/
    clips_id = jQuery("#slutstolpe1_id").val();


    slutbeslag_id = 239;
    if (clips_type == "clips_solid") slutbeslag_id = 1150;
    startbeslag_id = 237;
    if (clips_type == "clips_solid") startbeslag_id = 1149;
    bits_id = 1130;
    acc1_id = 1124;
    acc1_var_id1 = 195;
    acc1_var_id2 = 196;
    acc3_id = 1125;
    acc3_var_id1 = 1405;
    acc3_var_id2 = 200;

    acc6_id = 1273;
    acc7_id = 1270;
    acc8_id = 1271;
    acc9_id = 1272;




    acc1_cnt = jQuery("#acc1_cnt").val();
    acc2_cnt = jQuery("#acc2_cnt").val();
    acc3_cnt = jQuery("#acc3_cnt").val();
    acc4_cnt = jQuery("#acc4_cnt").val();
    acc5_cnt = jQuery("#acc5_cnt").val();

    acc6_cnt = jQuery("#acc6_cnt").val();
    acc7_cnt = jQuery("#acc7_cnt").val();
    acc8_cnt = jQuery("#acc8_cnt").val();
    acc9_cnt = jQuery("#acc9_cnt").val();


    var post_size = jQuery("#postsize").val().toLowerCase();
    var endekap_id = endekaps[post_size.toLowerCase()];
    var endekap_cnt = jQuery("#post1").val();

    //var product_type = jQuery("input#fencetype1").val();//Umid
    var product_type = jQuery("input#model").val();

    var product_id = 0;
    var variation_id = 0;
    var main_products = {};
    if (product_type == "v18x130x4" || product_type == "v18x130x6") {
      main_products = {
        black: { product_id: 1134, variations: { v18x130x6: 1326 } },
        hardwood: { product_id: 1132, variations: { v18x130x4: 1323, v18x130x6: 1324 } },
        oak: { product_id: 1135, variations: { v18x130x4: 1327, v18x130x6: 1328 } },
        grey: { product_id: 1143, variations: { v18x130x4: 1329, v18x130x6: 1330 } }
      };
    }
    else if (product_type == "v25x200x4" || product_type == "v25x200x5" || product_type == "v25x200x6") {
      main_products = {
        black: { product_id: 1686, variations: { v25x200x4: 1687, v25x200x5: 1688, v25x200x6: 1689 } }

      };
    }

    else if (product_type == "v22x300x4" || product_type == "v22x300x6") {
      main_products = {
        black: { product_id: 1219, variations: { v22x300x4: 1340, v22x300x6: 1341 } },
        hardwood: { product_id: 1247, variations: { v22x300x4: 1359, v22x300x6: 1360 } },
        //oak:{product_id:4537,variations:{v22x300x4:4542,v22x300x6:4541}},
        grey: { product_id: 1246, variations: { v22x300x4: 1357, v22x300x6: 1358 } },
        //grey:{product_id:4540,variations:{v22x300x4:4539,v22x300x6:4538}}
        oak: { product_id: 1245, variations: { v22x300x4: 1354, v22x300x6: 1355 } },
        white: { product_id: 1249, variations: { v22x300x4: 1363, v22x300x6: 1364 } }
      };
    }
    else if (product_type == "vwidex4" || product_type == "vwidex6") {
      main_products = {
        black: { product_id: 1145, variations: { vwidex4: 1332, vwidex6: 1333 } },
        hardwood: { product_id: 1146, variations: { vwidex4: 1334, vwidex6: 1335 } },
        oak: { product_id: 1147, variations: { vwidex4: 1336, vwidex6: 1337 } },
        grey: { product_id: 1148, variations: { vwidex4: 1338, vwidex6: 1339 } },
        white: { product_id: 1248, variations: { vwidex4: 1361, vwidex6: 1362 } }
      };
    }
    else {
      main_products = {
        black: { product_id: 226, variations: { v21x146x2: 844, v25x150x4: 838, v25x150x5: 839, v25x150x6: 840 } },
        coffee: { product_id: 845, variations: { v21x146x2: 846, v25x150x4: 852, v25x150x6: 850 } },
        grey: { product_id: 863, variations: { v21x146x2: 864, v25x150x4: 870, v25x150x6: 868 } },
        /*dark_teak:{product_id:882,variations:{v21x146x2:883,v25x150x4:889,v25x150x6:887}},*/
        light_teak: { product_id: 872, variations: { v21x146x2: 873, v25x150x4: 879, v25x150x6: 877 } },
        red: { product_id: 854, variations: { v21x146x2: 855, v25x150x4: 861, v25x150x6: 859 } }
      };
    }

    var main_product = main_products[fence_color];
    if (main_product.variations[product_type] == 0) {
      alert("This product is missing");
      return false;
    }
    var main_product_cnt = jQuery("#fence1").val();
    var products = [];

    datastring = main_product.product_id + "," + main_product.variations[product_type] + "," + main_product_cnt;
    if (jQuery("#topskruer1").val() != "0") {

      datastring += "|" + stroer_id + ",0," + jQuery("#topskruer1").val();
    }

    if (jQuery("#connector").val() != "") {
      connector_id = jQuery("#connector_id").val();
      datastring += "|" + connector_id + ",0," + jQuery("#connector").val();
    }
    if (jQuery("#alu_click_endekap").val() != "") {
      alu_click_endekap_id = jQuery("#alu_click_endekap_id").val();
      datastring += "|" + alu_click_endekap_id + ",0," + jQuery("#alu_click_endekap").val();
    }


    if (jQuery("#stolpe1").val() != "0") {
      datastring += "|" + startbeslag_id + ",0," + jQuery("#stolpe1").val();
    }
    if (jQuery("#slutstolpe1").val() != "0") {
      datastring += "|" + clips_id + ",0," + jQuery("#slutstolpe1").val();
    }
    if (jQuery("#topklods1").val() != "0") {
      datastring += "|" + slutbeslag_id + ",0," + jQuery("#topklods1").val();
    }
    if (endekap_cnt != "0") {
      datastring += "|" + endekap_id + ",0," + endekap_cnt;
    }
    if (acc1_cnt != "0") {
      datastring += "|" + acc1_id + ",0," + acc1_cnt;
    }
    if (acc2_cnt != "0") {
      datastring += "|" + acc1_id + "," + acc1_var_id2 + "," + acc2_cnt;
    }
    if (acc3_cnt != "0") {
      datastring += "|" + acc3_id + "," + acc3_var_id1 + "," + acc3_cnt;
    }
    if (acc4_cnt != "0") {
      datastring += "|" + acc3_id + "," + acc3_var_id2 + "," + acc4_cnt;
    }
    if (acc5_cnt != "0") {
      datastring += "|" + bits_id + ",0," + acc5_cnt;
    }

    if (acc6_cnt != "0") {
      datastring += "|" + acc6_id + ",0," + acc6_cnt;
    }
    if (acc7_cnt != "0") {
      datastring += "|" + acc7_id + ",0," + acc7_cnt;
    }
    if (acc8_cnt != "0") {
      datastring += "|" + acc8_id + ",0," + acc8_cnt;
    }
    if (acc9_cnt != "0") {
      datastring += "|" + acc9_id + ",0," + acc9_cnt;
    }

    jQuery.post("/wp-content/add_to_cart.php", { data: datastring }, function (result) {
      window.location.href = "/beregn-din-terrasse_new/";
    });
  }
  var drawing_mode = "Linje";
  jQuery('.drawing-mode-btn').bind('click', function () {
    jQuery('.drawing-mode-btn').css("background-color", "");
    jQuery(this).css("background-color", "lightblue");
    drawing_mode = jQuery(this).val();
    clearShape();
  });

  var map;

  var labels = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
  var labelIndex = 0;
  var markers = [];

  var is_drawing = false;
  var main_line = null;
  var dashed_line = null;
  var main_polygon = null;
  var dashed_polygon = null;
  var main_rectangle = null;
  var dashed_rectangle = null;
  var main_circle = null;
  var dashed_circle = null;
  var corners_cnt = 0;
  var points_cnt = 0;


  var lineSymbol = {
    path: 'M 0,-1 0,1',
    strokeOpacity: 1,
    scale: 4
  };

  function initMap() {
    map = new google.maps.Map(document.getElementById('map'), {
      center: { lat: 55.85, lng: 12.1833 },
      zoom: 13,
      mapTypeId: google.maps.MapTypeId.ROADMAP,
      zoomControl: true,
      draggableCursor: 'pointer'
    });
    console.log(map);

    // Create the search box and link it to the UI element.
    var input = document.getElementById('pac-input');
    var searchBox = new google.maps.places.SearchBox(input);
    map.controls[google.maps.ControlPosition.TOP_LEFT].push(input);

    // Bias the SearchBox results towards current map's viewport.
    map.addListener('bounds_changed', function () {
      searchBox.setBounds(map.getBounds());
    });

    google.maps.event.addDomListener(document.getElementById('delete-button'), 'click', clearShape);

    // [START region_getplaces]
    searchBox.addListener('places_changed', function () {
      var places = searchBox.getPlaces();

      if (places.length == 0) {
        return;
      }

      // For each place, get the icon, name and location.
      var bounds = new google.maps.LatLngBounds();
      places.forEach(function (place) {
        var icon = {
          url: place.icon,
          size: new google.maps.Size(71, 71),
          origin: new google.maps.Point(0, 0),
          anchor: new google.maps.Point(17, 34),
          scaledSize: new google.maps.Size(25, 25)
        };


        if (place.geometry.viewport) {
          // Only geocodes have viewport.
          bounds.union(place.geometry.viewport);
        } else {
          bounds.extend(place.geometry.location);
        }
      });
      map.fitBounds(bounds);
    });
    // [END region_getplaces]

    google.maps.event.addListener(map, 'mousemove', function (event) {
      if (is_drawing && drawing_mode == "Linje") redrawLine(event);
      if (is_drawing && drawing_mode == "Polygon") redrawPolygon(event);
      if (is_drawing && drawing_mode == "Rectangle") redrawRectangle(event);
      if (is_drawing && drawing_mode == "Circle") redrawCircle(event);
    });

    google.maps.event.addListener(map, 'click', function (event) {
      if (drawing_mode == "Linje" || drawing_mode == "Polygon") {
        if (!is_drawing) {
          if (drawing_mode == "Polygon") clearShape();
          is_drawing = true;
          if (markers.length > 0) {
            if (markers[0] == markers[markers.length - 1]) markers.pop();
          }
          placeMarker(event.latLng);
        }
        else {
          placeMarker(event.latLng);
        }
      }
      else if (drawing_mode == "Rectangle") {
        if (is_drawing) {
          placeMarker(event.latLng);
          if (markers.length >= 2) {
            is_drawing = false;
            drawMainRectangle();
          }
        }
        else {
          is_drawing = true;
          clearShape();
          placeMarker(event.latLng);
        }
      }
      else if (drawing_mode == "Circle") {
        if (is_drawing) {
          placeMarker(event.latLng);
          if (markers.length >= 2) {
            is_drawing = false;
            drawMainCircle();
          }
        }
        else {
          is_drawing = true;
          clearShape();
          placeMarker(event.latLng);
        }
      }
      calc_length(event);
    });
  }

  function placeMarker(location) {
    var marker = new google.maps.Marker({
      position: location,
      label: labels[labelIndex++ % labels.length],
      map: map,
      draggable: true
    });
    markers.push(marker);
    google.maps.event.addListener(marker, 'click', function (event) {
      if (drawing_mode == "Linje") {
        var index = markers.indexOf(this);
        is_drawing = false;
        if (dashed_line != null) dashed_line.setMap(null);
        if (index == 0) markers.push(markers[0]);
        drawMainLine();
      }
      else if (drawing_mode == "Polygon") {
        if (markers[0] != markers[markers.lengh - 1])
          markers.push(markers[0]);
        if (dashed_polygon != null) dashed_polygon.setMap(null);
        is_drawing = false;
        drawMainPolygon();
      }
    });

    google.maps.event.addListener(marker, 'dragend', function (event) {
      if (drawing_mode == "Linje") drawMainLine();
      if (drawing_mode == "Polygon") drawMainPolygon();
      if (drawing_mode == "Rectangle") drawMainRectangle();
      if (drawing_mode == "Circle") drawMainCircle();
    });
    if (drawing_mode == "Linje") drawMainLine();
    if (drawing_mode == "Polygon") drawMainPolygon();
    if (drawing_mode == "Rectangle") drawMainRectangle();
    if (drawing_mode == "Circle") drawMainCircle();
  }

  function redrawLine(event) {
    prevCoord = null;
    if (markers.length > 0) {
      prevCoord = markers[markers.length - 1].position;
      var lineCoords = [
        prevCoord,
        event.latLng
      ];

      if (dashed_line != null) dashed_line.setMap(null);

      dashed_line = new google.maps.Polyline({
        path: lineCoords,
        strokeColor: "#FF0000",
        strokeOpacity: 1.0,
        strokeWeight: 2,
        clickable: false,
        icons: [{
          icon: lineSymbol,
          offset: '0',
          repeat: '30px'
        }]
      });

      dashed_line.setMap(map);
      calc_length(event);
    }
  }

  function redrawPolygon(event) {
    var lineCoords = [];
    if (markers.length > 0) {
      for (i = 0; i < markers.length; i++) { lineCoords.push(markers[i].position); } lineCoords.push(event.latLng); lineCoords.push(lineCoords[0]); if (dashed_polygon != null) dashed_polygon.setMap(null); dashed_polygon = new google.maps.Polygon({ paths: lineCoords, strokeColor: "#FF0000", strokeOpacity: 1.0, strokeWeight: 2, fillColor: '#FF0000', fillOpacity: 0.35, clickable: false }); dashed_polygon.setMap(map); calc_length(event);
    }
  } function redrawRectangle(event) {
    var bounds = new Object(); if (markers.length > 0) {
      bounds.north = event.latLng.lat();
      bounds.south = markers[0].getPosition().lat();
      bounds.east = event.latLng.lng();
      bounds.west = markers[0].getPosition().lng();

      if (dashed_rectangle != null) dashed_rectangle.setMap(null);

      dashed_rectangle = new google.maps.Rectangle({
        strokeColor: '#FF0000',
        strokeOpacity: 0.8,
        strokeWeight: 2,
        fillColor: '#FF0000',
        fillOpacity: 0.35,
        clickable: false,
        map: map,
        bounds: bounds
      });

      dashed_rectangle.setMap(map);
      calc_length(event);
    }
  }

  function redrawCircle(event) {
    var bounds = new Object();
    if (markers.length > 0) {
      if (dashed_circle != null) dashed_circle.setMap(null);

      var x_coords = [markers[0].getPosition(), event.latLng];

      var radius = google.maps.geometry.spherical.computeLength(x_coords);

      dashed_circle = new google.maps.Circle({
        strokeColor: '#FF0000',
        strokeOpacity: 0.8,
        strokeWeight: 2,
        fillColor: '#FF0000',
        fillOpacity: 0.35,
        clickable: false,
        map: map,
        center: markers[0].getPosition(),
        radius: radius
      });

      dashed_circle.setMap(map);
      calc_length(event);
    }
  }

  function drawMainLine() {
    if (main_line != null) main_line.setMap(null);
    var lineCoords = [];
    for (var i = 0; i < markers.length; i++) {
      lineCoords.push(markers[i].position);
    }
    main_line = new google.maps.Polyline({
      path: lineCoords,
      strokeColor: "#00FF00",
      strokeOpacity: 1.0,
      strokeWeight: 2,
      clickable: false
    });
    main_line.setMap(map);
    calc_length(null);
  }

  function drawMainPolygon() {
    if (main_polygon != null) main_polygon.setMap(null);
    var lineCoords = [];
    for (var i = 0; i < markers.length; i++) { lineCoords.push(markers[i].position); } lineCoords.push(markers[0].position); main_polygon = new google.maps.Polygon({ paths: lineCoords, strokeColor: "#00FF00", strokeOpacity: 1.0, strokeWeight: 2, fillColor: '#00FF00', fillOpacity: 0.35, clickable: false }); main_polygon.setMap(map); calc_length(null);
  } function drawMainRectangle() {
    if (main_rectangle != null) main_rectangle.setMap(null); var bounds = new Object(); if (markers.length > 1) {
      bounds.north = markers[1].getPosition().lat();
      bounds.south = markers[0].getPosition().lat();
      bounds.east = markers[1].getPosition().lng();
      bounds.west = markers[0].getPosition().lng();

      if (dashed_rectangle != null) dashed_rectangle.setMap(null);

      main_rectangle = new google.maps.Rectangle({
        strokeColor: '#00FF00',
        strokeOpacity: 0.8,
        strokeWeight: 2,
        fillColor: '#00FF00',
        fillOpacity: 0.35,
        clickable: false,
        map: map,
        bounds: bounds
      });

      main_rectangle.setMap(map);
      calc_length(null);
    }
  }

  function drawMainCircle() {
    if (main_circle != null) main_circle.setMap(null);
    if (markers.length > 1) {
      var x_coords = [markers[0].getPosition(), markers[1].getPosition()];

      var radius = google.maps.geometry.spherical.computeLength(x_coords);

      if (dashed_circle != null) dashed_circle.setMap(null);

      main_circle = new google.maps.Circle({
        strokeColor: '#00FF00',
        strokeOpacity: 0.8,
        strokeWeight: 2,
        fillColor: '#00FF00',
        fillOpacity: 0.35,
        clickable: false,
        map: map,
        center: markers[0].getPosition(),
        radius: radius
      });

      main_circle.setMap(map);
      calc_length(null);
    }
  }

  function calc_length(event) {
    var coords = [];
    var length = 0;
    if (drawing_mode == "Linje" || drawing_mode == "Polygon" || drawing_mode == "Rectangle" || drawing_mode == "Circle") {
      for (i = 0; i < markers.length; i++) { coords.push(markers[i].position); } if (event != null) coords.push(event.latLng);
    } var area_text = ""; var angle_text = ""; points_cnt = coords.length; corners_cnt = points_cnt - 2; if (coords[0] == coords[coords.length - 1]) { points_cnt--; corners_cnt++; } if (coords.length > 1) {
      var x_coords = [];
      if (drawing_mode == "Linje" || drawing_mode == "Polygon") {
        x_coords = coords;
        x_coords.push(coords[0]);
        length = Math.ceil(10 * google.maps.geometry.spherical.computeLength(x_coords)) / 10;
        if (coords[0] == coords[coords.length - 1])
          area_text = ", Areal: " + Math.ceil(100 * google.maps.geometry.spherical.computeArea(x_coords)) / 100 + " m2";
      }
      else if (drawing_mode == "Rectangle") {
        points_cnt = 4;
        corners_cnt = 4;
        var bounds = null;
        if (is_drawing) {
          if (dashed_rectangle != null) bounds = dashed_rectangle.getBounds();
        }
        else {
          if (main_rectangle != null) bounds = main_rectangle.getBounds();
        }
        if (bounds != null) {
          var sw = bounds.getSouthWest();
          var ne = bounds.getNorthEast();
          var southWest = new google.maps.LatLng(sw.lat(), sw.lng());
          var northEast = new google.maps.LatLng(ne.lat(), ne.lng());
          var southEast = new google.maps.LatLng(sw.lat(), ne.lng());
          var northWest = new google.maps.LatLng(ne.lat(), sw.lng());

          x_coords = [northEast, northWest, southWest, southEast];
          x_coords.push(northEast);

          length = Math.ceil(10 * google.maps.geometry.spherical.computeLength(x_coords)) / 10;
          area_text = ", Areal: " + Math.ceil(100 * google.maps.geometry.spherical.computeArea(x_coords)) / 100 + " m2 " + Date.now();
          angle_text = ", cornerA = 90, cornerB = 90, cornerC = 90, cornerD = 90";
        }
      }
      else if (drawing_mode == "Circle") {
        points_cnt = 2;
        corners_cnt = 0;
        x_coords = coords;
        var radius = google.maps.geometry.spherical.computeLength(x_coords);
        length = Math.ceil(10 * 2 * Math.PI * radius) / 10;
        area_text = ", Areal: " + Math.ceil(100 * Math.PI * Math.pow(radius, 2)) / 100 + " m2, radius = " + radius + " m";
      }

      if (coords.length > 2 && drawing_mode != "Rectangle") {
        angle_text = "";
        if (drawing_mode == "Linje" || drawing_mode == "Polygon") {
          for (i = 0; i < corners_cnt; i++) {
            var angle_coords = [];
            var x1 = i;
            var x2 = (i + 1 <= points_cnt - 1) ? i + 1 : i + 1 - points_cnt;
            var x3 = (i + 2 <= points_cnt - 1) ? i + 2 : i + 2 - points_cnt;
            angle_coords = [coords[x1], coords[x2], coords[x3]];
            if (x3 != 1) angle_text += ", " + labels[x2 % labels.length] + "=" + calc_angles(angle_coords) + "<sup>0</sup>";
            else angle_text = ", " + labels[x2 % labels.length] + "=" + calc_angles(angle_coords) + "<sup>0</sup> " + angle_text;
          }
        }
      }
    }

    jQuery("#coordinates").html("Total: " + length + " m" + area_text + ", punkter: " + points_cnt + ", hjørner: " + corners_cnt + angle_text);

    var html = "<table>";
    var angle_start_idx = 0;
    if (corners_cnt != points_cnt) angle_start_idx++;
    for (i = 0; i < corners_cnt; i++) {
      html += "<tr>";
      html += " <td width='150'>Hjørne" + labels[angle_start_idx % labels.length] + "</td>";
      html += " <td><select id='select_corner" + labels[angle_start_idx % labels.length] + "'><option value=''>Vælg hjørnevinkler</option>";
      html += "<option value='45'>45&deg;</option>";
      html += "<option value='90'>90&deg;</option>";
      //html += "<option value='180'>180&deg;</option>";
      html += "</select></td>";
      html += "</tr>";
      angle_start_idx++;
    }
    html += "</table>";
    jQuery("#angles_div").html(html);

    jQuery("#heightTable").css("display", "none");
    var html = "<table>";
    var height_end_idx = markers.length - 1;
    if (corners_cnt == points_cnt) height_end_idx = 0;
    for (i = 0; i < markers.length - 1; i++) {
      var piece_length = google.maps.geometry.spherical.computeLength([markers[i].position, markers[i + 1].position]);
      height_end_idx = i + 1;
      if (corners_cnt == points_cnt && i == markers.length - 2) height_end_idx = 0;
      html += " <tr>";
      html += "<td width='150'>Højde for part " + labels[i % labels.length] + labels[height_end_idx % labels.length] + "</td>";
      html += "<td><input id='height_" + i + "' type='number' style='width:75px;' value=''/>";
      html += "<input id='length_" + i + "' type='hidden' style='width:75px;' value='" + piece_length + "'/></td>";
      html += "</tr>";
    }
    html += "</table>";
    jQuery("#lengths_div").html(html);
  }

  function calc_angles(coords) {
    var a = google.maps.geometry.spherical.computeLength([coords[0], coords[1]]);
    var b = google.maps.geometry.spherical.computeLength([coords[1], coords[2]]);
    var c = google.maps.geometry.spherical.computeLength([coords[2], coords[0]]);
    var angle = (Math.pow(a, 2) + Math.pow(b, 2) - Math.pow(c, 2)) / (2 * a * b);
    return angle = Math.ceil(180 * Math.acos(angle) / Math.PI * 10) / 10;
  }

  function clearShape() {
    labelIndex = 0;
    for (i = 0; i < markers.length; i++) {
      markers[i].setMap(null);
    }
    markers = [];
    drawMainLine();
    if (main_line != null) main_line.setMap(null);
    if (dashed_line != null) dashed_line.setMap(null);
    if (dashed_polygon != null) dashed_polygon.setMap(null);
    if (main_polygon != null) main_polygon.setMap(null);
    if (dashed_rectangle != null) dashed_rectangle.setMap(null);
    if (main_rectangle != null) main_rectangle.setMap(null);
    if (dashed_circle != null) dashed_circle.setMap(null);
    if (main_circle != null) main_circle.setMap(null);
  }

  function check_map() {
    if (!map_init) {
      map_init = true;
      initMap();
    }
  }

  function update_calculation() {
    //update calculations
  }

  function set_colors() {
    var profil_color = jQuery("#profil_color").val();
    //alert(jQuery("#profil_color").val());
    if (profil_color != "") {
      /*jQuery("#topprofil_color").val(profil_color);
       jQuery("#k5_color").val(profil_color);
       jQuery("#k6_color").val(profil_color);
       jQuery("#k7_color").val(profil_color);
       jQuery("#k14_color").val(profil_color);
       jQuery("#skruer1_color").val(profil_color);
       jQuery("#skruer2_color").val(profil_color);
       jQuery("#endekap_color").val(profil_color);
       jQuery("#topklods_color").val(profil_color);*/
      jQuery("#hidColor").val(profil_color);
      if (profil_color != 'Black') {
        jQuery("#bundskinne_color").val('alu');
        jQuery("#alu_color").val('alu');
      } else {
        jQuery("#bundskinne_color").val('black');
        jQuery("#alu_color").val('black');
      }
    }
  }



  jQuery("#profil_color").on("change", function () {
    jQuery("#pdf_product_name").val("");
    jQuery("#pdf_product_id").val("");
  });

  function remove_zeroes() {
    jQuery("#mydiv input[type=text]").each(function () {
      if (jQuery(this).val() == "0") {
        jQuery(this).closest("tr").hide();
      }
    });
    jQuery("span#gettopprofile").text(jQuery("span#gettopprofile").text().replace('40x120 mm', ''));
  }

  function guid() {
    function s4() {
      return Math.floor((1 + Math.random()) * 0x10000)
        .toString(16)
        .substring(1);
    }
    return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
      s4() + '-' + s4() + s4() + s4();
  }
</script>
<script>
  function pdf2() {
    if (jQuery("#profil_color").val() == "" || jQuery("#profil_color").val() == 'undefined') {
      alert("Please select color");
      jQuery("#profil_color").focus();
      return false;
    }
    if (jQuery("#topprofil_color").val() == "" || jQuery("#topprofil_color").val() == 'undefined') {
      alert("Please select color");
      jQuery("#topprofil_color").focus();
      return false;
    }
    if (jQuery("#k5_color").val() == "" || jQuery("#k5_color").val() == 'undefined') {
      alert("Please select color");
      jQuery("#k5_color").focus();
      return false;
    }
    if (jQuery("#k6_color").val() == "" || jQuery("#k6_color").val() == 'undefined') {
      alert("Please select color");
      jQuery("#k6_color").focus();
      return false;
    }
    if (jQuery("#alu_color").val() == "" || jQuery("#alu_color").val() == 'undefined') {
      alert("Please select color");
      jQuery("#alu_color").focus();
      return false;
    }
    if (jQuery("#k7_color").val() == "" || jQuery("#k7_color").val() == 'undefined') {
      alert("Please select color");
      jQuery("#k7_color").focus();
      return false;
    }
    if (jQuery("#k14_color").val() == "" || jQuery("#k14_color").val() == 'undefined') {
      alert("Please select color");
      jQuery("#k14_color").focus();
      return false;
    }
    if (jQuery("#skruer1_color").val() == "" || jQuery("#skruer1_color").val() == 'undefined') {
      alert("Please select color");
      jQuery("#skruer1_color").focus();
      return false;
    }
    if (jQuery("#skruer2_color").val() == "" || jQuery("#skruer2_color").val() == 'undefined') {
      alert("Please select color");
      jQuery("#skruer2_color").focus();
      return false;
    }
    if (jQuery("#endekap_color").val() == "" || jQuery("#endekap_color").val() == 'undefined') {
      alert("Please select color");
      jQuery("#endekap_color").focus();
      return false;
    }
    if (jQuery("#topklods_color").val() == "" || jQuery("#topklods_color").val() == 'undefined') {
      alert("Please select color");
      jQuery("#topklods_color").focus();
      return false;
    }
    return true;
  }
  function pdf2() {
    if (jQuery("#fence_color").val() == "" || jQuery("#fence_color").val() == undefined) {
      alert("Please select color");
      jQuery("#fence_color").focus();
      return false;
    }
    return true;
  }
  function pdf1() {

    //fence_color = jQuery("#fence_color").val();
    fence_color = jQuery("#colorHidden").val();
    //var product_type = jQuery("#fencetype1").val();
    var product_type = jQuery("input#model").val();
    var product_id = 0;
    var variation_id = 0;
    var main_products = {};
    if (product_type == "v18x130x4" || product_type == "v18x130x6") {
      main_products = {
        black: { product_id: 1134, variations: { v18x130x6: 1326 } },
        hardwood: { product_id: 1132, variations: { v18x130x4: 1323, v18x130x6: 1324 } },
        oak: { product_id: 1135, variations: { v18x130x4: 1327, v18x130x6: 1328 } },
        grey: { product_id: 1143, variations: { v18x130x4: 1329, v18x130x6: 1330 } }
      };
    }
    else if (product_type == "v25x200x4" || product_type == "v25x200x5" || product_type == "v25x200x6") {
      main_products = {
        black: { product_id: 1686, variations: { v25x200x4: 1687, v25x200x5: 1688, v25x200x6: 1689 } }

      };
    }
    else if (product_type == "v22x300x4" || product_type == "v22x300x6") {
      main_products = {
        black: { product_id: 1219, variations: { v22x300x4: 1340, v22x300x6: 1341 } },
        hardwood: { product_id: 1247, variations: { v22x300x4: 1359, v22x300x6: 1360 } },
        //oak:{product_id:4537,variations:{v22x300x4:4542,v22x300x6:4541}},
        grey: { product_id: 1246, variations: { v22x300x4: 1357, v22x300x6: 1358 } },
        //grey:{product_id:4540,variations:{v22x300x4:4539,v22x300x6:4538}}
        oak: { product_id: 1245, variations: { v22x300x4: 1354, v22x300x6: 1355 } },
        white: { product_id: 1249, variations: { v22x300x4: 1363, v22x300x6: 1364 } }
      };
    }
    else if (product_type == "vwidex4" || product_type == "vwidex6") {
      main_products = {
        black: { product_id: 1145, variations: { vwidex4: 1332, vwidex6: 1333 } },
        hardwood: { product_id: 1146, variations: { vwidex4: 1334, vwidex6: 1335 } },
        oak: { product_id: 1147, variations: { vwidex4: 1336, vwidex6: 1337 } },
        grey: { product_id: 1148, variations: { vwidex4: 1338, vwidex6: 1339 } },
        white: { product_id: 1248, variations: { vwidex4: 1361, vwidex6: 1362 } }
      };
    } else if (product_type == "v22x130x6") {
      main_products = {
        black: { product_id: 2214, variations: { v22x130x6: 2214 } },
        hardwood: { product_id: 2213, variations: { v22x130x6: 2224 } }

      };
    }
    else if (product_type == "v22x200x6") {
      main_products = {
        black: { product_id: 2212, variations: { v22x200x6: 2221 } },
        hardwood: { product_id: 2211, variations: { v22x200x6: 2219 } }

      };
    }
    else if (product_type == "v22x300x6") {
      main_products = {
        black: { product_id: 2365, variations: { v22x300x6: 2367 } },
        hardwood: { product_id: 2209, variations: { v22x300x6: 2216 } }

      };
    }
    else {
      main_products = {
        black: { product_id: 226, variations: { v21x146x2: 844, v25x150x4: 838, v25x150x5: 839, v25x150x6: 840 } },
        coffee: { product_id: 845, variations: { v21x146x2: 846, v25x150x4: 852, v25x150x6: 850 } },
        grey: { product_id: 863, variations: { v21x146x2: 864, v25x150x4: 870, v25x150x6: 868 } },
        /*dark_teak:{product_id:882,variations:{v21x146x2:883,v25x150x4:889,v25x150x6:887}},*/
        light_teak: { product_id: 872, variations: { v21x146x2: 873, v25x150x4: 879, v25x150x6: 877 } },
        red: { product_id: 854, variations: { v21x146x2: 855, v25x150x4: 861, v25x150x6: 859 } }
      };
    }

    var main_product = main_products[fence_color];

    jQuery("#pdf_product_id").val(main_product.variations[product_type]);


    jQuery("#pdf_acc1_cnt").val(jQuery("#acc1_cnt").val());
    jQuery("#pdf_acc2_cnt").val(jQuery("#acc2_cnt").val());
    jQuery("#pdf_acc3_cnt").val(jQuery("#acc3_cnt").val());
    jQuery("#pdf_acc4_cnt").val(jQuery("#acc4_cnt").val());
    jQuery("#pdf_acc5_cnt").val(jQuery("#acc5_cnt").val());

    jQuery("#pdf_acc6_cnt").val(jQuery("#acc6_cnt").val());
    jQuery("#pdf_acc7_cnt").val(jQuery("#acc7_cnt").val());
    jQuery("#pdf_acc8_cnt").val(jQuery("#acc8_cnt").val());
    jQuery("#pdf_acc9_cnt").val(jQuery("#acc9_cnt").val());
    jQuery("#pdf_acc10_cnt").val(jQuery("#acc10_cnt").val());
    jQuery("#pdf_acc11_cnt").val(jQuery("#acc11_cnt").val());

    document.getElementById('pdfarea').value = jQuery('#area1').val();
    document.getElementById('pdfterrasse').value = document.getElementById("fence1").value;
    document.getElementById('pdfstroe').value = document.getElementById("topskruer1").value;
    document.getElementById('pdfstroe_id').value = document.getElementById("topskruer1_id").value;

    document.getElementById('pdfclips').value = document.getElementById("slutstolpe1").value;
    document.getElementById('pdfafslutning').value = document.getElementById("post1").value;
    document.getElementById('pdfstartbeslag').value = document.getElementById("stolpe1").value;
    document.getElementById('pdfslutbeslag').value = document.getElementById("topklods1").value;
    //document.getElementById('pdffarve').value =
    //  document.getElementById("fence_color").value;
    document.getElementById('pdffarve').value = document.getElementById("colorHidden").value;

    document.getElementById('pdftotal').value = document.getElementById("total").value;
    document.getElementById('pdftypeterrasse').value = document.getElementById("fencetype1").value;
    document.getElementById('pdfclips_type').value = document.getElementById("clips_type").value;

    document.getElementById('pdfclips_id').value = document.getElementById("slutstolpe1_id").value;

    document.getElementById('pdfconnector').value = document.getElementById("connector").value;
    document.getElementById('pdfconnector_id').value = document.getElementById("connector_id").value;

    document.getElementById('pdfalu_click_endekap').value = document.getElementById("alu_click_endekap").value;
    document.getElementById('pdfalu_click_endekap_id').value = document.getElementById("alu_click_endekap_id").value;

    document.getElementById('pdftypeafslutning').value =
      document.getElementById("topprofiletype1").value;
  }
  //jQuery('#wqs_clip_count').val(jQuery('#wqs_clips_num').html());

</script>
<script>
  var scene_custom = '';
  var scene = '';
  var xposition_custom = 0;
  var yposition_custom = 0;
  var index_custom = 0;
  var custom_mesh = '';
  var custom_button = '';
  var custom_advancedTexturee = '';
  var fence_space = 0.04;
  db = 0;

  var custom_type = 'fence';


  function myfunction() {
    var canvas = document.getElementById("renderCanvas"); // Get the canvas element
    var engine = new BABYLON.Engine(canvas, true);
    var mesh1 = '';
    var mesh = '';
    var mesh3 = '';


    // Generate the BABYLON 3D engine
    // Add your code here matching the playground format
    var createScene = function () {
      var scene = null;
      scene = new BABYLON.Scene(engine);

      var container = new BABYLON.AssetContainer(scene);

      let instanceCountiw = jQuery("#instanceCounti").val(); //17
      let instanceCountlw = jQuery("#instanceCountl").val(); //12
      let instanceCountuw = jQuery("#instanceCountu").val(); //3
      var msgarr = jQuery("#msgarr").val();
      var squerew = jQuery("#squere").val();
      width = 1;
      heightt = 1;
      positionx = 0;
      positionz = 0;




      var camera = new BABYLON.ArcRotateCamera("camera1", 0, 0, 10, BABYLON.Vector3.Zero(), scene);
      //const camera = new BABYLON.ArcRotateCamera("camera", -Math.PI / 2, Math.PI / 2.5, 200, new BABYLON.Vector3(0, 0, 0));
      // camera.setPosition(new BABYLON.Vector3(10, 5, -15));
      camera.setPosition(new BABYLON.Vector3(5, 2.5, -7.5));
      camera.upperRadiusLimit = 30;
      camera.attachControl(canvas, true);
      var light = new BABYLON.HemisphericLight("light1", new BABYLON.Vector3(0, 1, 0), scene);

      //mohit
      let instanceCounti = jQuery("#instanceCounti").val(); //17
      let instanceCountl = jQuery("#instanceCountl").val(); //12
      let instanceCountu = jQuery("#instanceCountu").val(); //3
      var msgarr = jQuery("#msgarr").val();
      var f_color = jQuery("#colorHidden").val();
      var f_type = jQuery("#model").val();
      var squere = jQuery("#squere").val();
      scene.clearColor = BABYLON.Color4(0.5, 0.8, 0.6, 0.8);
      light.intensity = 1;
      rotarfance = jQuery('#rotarfance').val();





      var updateins = 0;
      let value = 99;
      var position = 0;

      if (scene_custom != '') {
        scene_custom.dispose();
      }
      data_id = 0;

      var Vælgform = jQuery('input#post').val();




      for (var index = 0; index < instanceCounti; index++) {

        z = 0;
        jQuery.each(JSON.parse(msgarr), function (keys, values) {
          //console.log(z);
          values.heights = Math.ceil(values.heights);
          if (f_color == "black" && f_type == "v22x130x6") {
            if (rotarfance == 0) {
              row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/heimdal_blackgrey_22x130/heimdal_blackgrey_22x130_" + values.heights + ".glb";
            } else {

              row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/heimdal_blackgrey_22x130_rotate/heimdal_blackgrey_22x130_" + values.heights + "_rotate.glb";
            }

          } else if (f_color == "black" && f_type == "v22x200x6") {
            if (rotarfance == 0) {
              row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/heimdal_blackgrey_22x200/heimdal_blackgrey_22x200_" + values.heights + ".glb";
            } else {

              row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/heimdal_blackgrey_22x200_rotate/heimdal_blackgrey_22x200_" + values.heights + "_rotate.glb";
            }
          }
          else if (f_color == "black" && f_type == "v22x300x6") {
            if (rotarfance == 0) {
              row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/heimdal_blackgrey_22x300/heimdal_blackgrey_22x300_" + values.heights + ".glb";
            } else {

              row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/heimdal_blackgrey_22x300_rotate/heimdal_blackgrey_22x300_" + values.heights + "_rotate.glb";
            }
          }
          else if (f_color == "hardwood" && f_type == "v22x130x6") {

            if (rotarfance == 0) {
              row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/heimdal_oakhardwood_22x130/heimdal_oakhardwood_22x130_" + values.heights + ".glb";
            } else {

              row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/heimdal_oakhardwood_22x130_rotate/heimdal_oakhardwood_22x130_" + values.heights + "_rotate.glb";
            }
          }

          else if (f_color == "hardwood" && f_type == "v22x200x6") {
            if (rotarfance == 0) {
              row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/heimdal_oakhardwood_22x200/heimdal_oakhardwood_22x200_" + values.heights + ".glb";
            } else {

              row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/heimdal_oakhardwood_22x200_rotate/heimdal_oakhardwood_22x200_" + values.heights + "_rotate.glb";
            }
          }
          else if (f_color == "hardwood" && f_type == "v22x300x6") {
            if (rotarfance == 0) {
              row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/heimdal_oakhardwood_22x300/heimdal_oakhardwood_22x300_" + values.heights + ".glb";
            } else {
              row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/heimdal_oakhardwood_22x300_rotate/heimdal_oakhardwood_22x300_" + values.heights + "_rotate.glb";

            }
          }



          const index_id = index;
          const index_id1 = index;
          const key_val = keys;

          {
            glb_data1 = row_url_1;
          }
          //console.log("glb_data1"+glb_data1);
          var glbdatasplit = glb_data1.split('/');
          const getimagename = glbdatasplit[8];
          const counttt = glbdatasplit[9].split('_').slice(-1);
          url = glbdatasplit.slice(0, -1);
          seturl = url.join('/') + '/';
          filenameee = glbdatasplit[9];

          BABYLON.SceneLoader.ImportMesh("", "", glb_data1, scene, function (newMeshes) {
            var mesh1 = null;
            var mesh1 = newMeshes[1];

            mesh1.isVisible = false;
            var newInstance = mesh1.createInstance("fence_" + key_val + "_" + index_id1);
            flipfance = jQuery('#flipfance').val();
            rotarfance = jQuery('#rotarfance').val();


            if (getimagename == "heimdal_blackgrey_22x130" || getimagename == "heimdal_blackgrey_22x200" || getimagename == "heimdal_blackgrey_22x300" || getimagename == "heimdal_blackgrey_22x130_rotate" || getimagename == "heimdal_blackgrey_22x200_rotate" || getimagename == "heimdal_blackgrey_22x300_rotate") {
              if (flipfance == 0) { } else {
                //alert(flipfance);
                console.log(flipfance);
                newInstance.rotate(new BABYLON.Vector3(0, 0, 2), Math.PI);
              }


            } else if (getimagename == "heimdal_oakhardwood_22x130" || getimagename == "heimdal_oakhardwood_22x200" || getimagename == "heimdal_oakhardwood_22x300" || getimagename == "heimdal_oakhardwood_22x130_rotate" || getimagename == "heimdal_oakhardwood_22x200_rotate" || getimagename == "heimdal_oakhardwood_22x300_rotate") {
              if (flipfance == 0) { } else {
                //alert(flipfance);
                console.log(flipfance);
                newInstance.rotate(new BABYLON.Vector3(0, 2, 0), Math.PI);

              }


              newInstance.position.y = 0.2;
            }

            console.log("getimagename" + getimagename);

            {
              //alert(); 
              if (getimagename == "heimdal_blackgrey_22x130" || getimagename == "heimdal_oakhardwood_22x130")
              //if(getimagename == "heimdal_blackgrey_22x130")
              {
                newInstance.position.x = (index_id1 * 0.128) + fence_space;


              }
              // else if(getimagename == "heimdal_blackgrey_22x200" )
              else if (getimagename == "heimdal_blackgrey_22x200" || getimagename == "heimdal_oakhardwood_22x200") {
                newInstance.position.x = (index_id1 * 0.21);









              }
              // else if(getimagename == "heimdal_blackgrey_22x300")
              else if (getimagename == "heimdal_blackgrey_22x300" || getimagename == "heimdal_oakhardwood_22x300") {
                newInstance.position.x = (index_id1 * 0.31);





              } else if (getimagename == "heimdal_blackgrey_22x130_rotate" || getimagename == "heimdal_oakhardwood_22x130_rotate") {
                newInstance.position.z = (index_id1 * 0.128) + fence_space;

              } else if (getimagename == "heimdal_blackgrey_22x200_rotate" || getimagename == "heimdal_oakhardwood_22x200_rotate") {
                newInstance.position.z = (index_id1 * 0.21);
              } else if (getimagename == "heimdal_blackgrey_22x300_rotate" || getimagename == "heimdal_oakhardwood_22x300_rotate") {
                newInstance.position.z = (index_id1 * 0.31);
              }


              if (getimagename == "heimdal_blackgrey_22x130" || getimagename == "heimdal_oakhardwood_22x130" || getimagename == "heimdal_blackgrey_22x200" || getimagename == "heimdal_oakhardwood_22x200" || getimagename == "heimdal_blackgrey_22x300" || getimagename == "heimdal_oakhardwood_22x300") {
                newInstance.position.z = z;




                if (keys == 0) {
                  newInstance.position.z = 0;
                  if (values.heights == 1) { newInstance.position.z = -2.50; }
                  if (values.heights == 2) { newInstance.position.z = -2.00; }
                  if (values.heights == 3) { newInstance.position.z = -1.50; }
                  if (values.heights == 4) { newInstance.position.z = -0.00; }
                  if (values.heights == 5) { newInstance.position.z = -0.50; }
                  if (values.heights == 6) { newInstance.position.z = 0; }

                } else {

                  if (values.heights == 1) {
                    //newInstance.position.z=-3.50+fence_space+z;
                    newInstance.position.z = 3.50 + fence_space + z;
                  }
                  else if (values.heights == 2) {
                    //newInstance.position.z=-4.00+fence_space+z;	
                    newInstance.position.z = 4.00 + fence_space + z;
                  }
                  else if (values.heights == 3) {
                    //newInstance.position.z=-4.50+fence_space+z;	
                    newInstance.position.z = 4.50 + fence_space + z;
                  }
                  else if (values.heights == 4) {
                    //newInstance.position.z=-5.00+fence_space+z;	
                    newInstance.position.z = 5.00 + fence_space + z;
                  }
                  else if (values.heights == 5) {
                    //newInstance.position.z=-5.50+fence_space+z;	
                    newInstance.position.z = 5.50 + fence_space + z;
                  }
                  else if (values.heights == 6) {
                    newInstance.position.z = z;


                    if (keys >= 2) {
                      //z=newInstance.position.z-6.00+fence_space;
                      z = newInstance.position.z + 6.00 + fence_space;
                      newInstance.position.z = z;
                    } else {
                      //newInstance.position.z=-6.00+fence_space;
                      newInstance.position.z = 6.00 + fence_space;
                      z = newInstance.position.z;
                    }
                  }

                }

              }

              else if (getimagename == "heimdal_blackgrey_22x130_rotate" || getimagename == "heimdal_blackgrey_22x200_rotate" || getimagename == "heimdal_blackgrey_22x300_rotate" || getimagename == "heimdal_oakhardwood_22x130_rotate" || getimagename == "heimdal_oakhardwood_22x200_rotate" || getimagename == "heimdal_oakhardwood_22x300_rotate") {


                newInstance.position.x = z;




                if (keys == 0) {
                  newInstance.position.x = 0;
                  if (values.heights == 1) { newInstance.position.x = -2.50; }
                  if (values.heights == 2) { newInstance.position.x = -2.00; }
                  if (values.heights == 3) { newInstance.position.x = -1.50; }
                  if (values.heights == 4) { newInstance.position.x = -0.00; }
                  if (values.heights == 5) { newInstance.position.x = -0.50; }
                  if (values.heights == 6) { newInstance.position.x = 0; }

                } else {

                  if (values.heights == 1) {
                    //newInstance.position.z=-3.50+fence_space+z;
                    newInstance.position.x = 3.50 + fence_space + z;
                  }
                  else if (values.heights == 2) {
                    //newInstance.position.z=-4.00+fence_space+z;	
                    newInstance.position.x = 4.00 + fence_space + z;
                  }
                  else if (values.heights == 3) {
                    //newInstance.position.z=-4.50+fence_space+z;	
                    newInstance.position.x = 4.50 + fence_space + z;
                  }
                  else if (values.heights == 4) {
                    //newInstance.position.z=-5.00+fence_space+z;	
                    newInstance.position.x = 5.00 + fence_space + z;
                  }
                  else if (values.heights == 5) {
                    //newInstance.position.z=-5.50+fence_space+z;	
                    newInstance.position.x = 5.50 + fence_space + z;
                  }
                  else if (values.heights == 6) {
                    newInstance.position.x = z;


                    if (keys >= 2) {
                      //z=newInstance.position.z-6.00+fence_space;
                      z = newInstance.position.x + 6.00 + fence_space;
                      newInstance.position.x = z;
                    } else {
                      //newInstance.position.z=-6.00+fence_space;
                      newInstance.position.x = 6.00 + fence_space;
                      z = newInstance.position.x;
                    }
                  }

                }




              }





            }
            //not used



            camera.upperBetaLimit = Math.PI / 2;
            camera.lowerRadiusLimit = 4;



          });

          setTimeout(function () {
          }, 1000);
          //z++;	
        });
      }

      if (Vælgform == 'opform2' || Vælgform == 'opform3') {
        var msgarr2 = jQuery("#msgarr2").val();
        for (var index = 0; index < instanceCountl; index++) {

          z = 0;
          jQuery.each(JSON.parse(msgarr2), function (keys, values) {
            //console.log(z);
            if (f_color == "black" && f_type == "v22x130x6") {

              if (rotarfance == 0) {
                console.log("rotarfance0=" + rotarfance);
                row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/heimdal_blackgrey_22x130/heimdal_blackgrey_22x130_" + values.heights + ".glb";
              } else {
                console.log("rotarfance1=" + rotarfance);
                row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/heimdal_blackgrey_22x130_rotate/heimdal_blackgrey_22x130_" + values.heights + "_rotate.glb";
              }

            } else if (f_color == "black" && f_type == "v22x200x6") {
              if (rotarfance == 0) {
                row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/heimdal_blackgrey_22x200/heimdal_blackgrey_22x200_" + values.heights + ".glb";
              } else {

                row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/heimdal_blackgrey_22x200_rotate/heimdal_blackgrey_22x200_" + values.heights + "_rotate.glb";
              }
            }
            else if (f_color == "black" && f_type == "v22x300x6") {
              if (rotarfance == 0) {
                row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/heimdal_blackgrey_22x300/heimdal_blackgrey_22x300_" + values.heights + ".glb";
              } else {

                row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/heimdal_blackgrey_22x300_rotate/heimdal_blackgrey_22x300_" + values.heights + "_rotate.glb";
              }
            }
            else if (f_color == "hardwood" && f_type == "v22x130x6") {

              if (rotarfance == 0) {
                row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/heimdal_oakhardwood_22x130/heimdal_oakhardwood_22x130_" + values.heights + ".glb";
              } else {

                row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/heimdal_oakhardwood_22x130_rotate/heimdal_oakhardwood_22x130_" + values.heights + "_rotate.glb";
              }
            }

            else if (f_color == "hardwood" && f_type == "v22x200x6") {
              if (rotarfance == 0) {
                row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/heimdal_oakhardwood_22x200/heimdal_oakhardwood_22x200_" + values.heights + ".glb";
              } else {

                row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/heimdal_oakhardwood_22x200_rotate/heimdal_oakhardwood_22x200_" + values.heights + "_rotate.glb";
              }
            }
            else if (f_color == "hardwood" && f_type == "v22x300x6") {
              if (rotarfance == 0) {
                row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/heimdal_oakhardwood_22x300/heimdal_oakhardwood_22x300_" + values.heights + ".glb";
              } else {
                row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/heimdal_oakhardwood_22x300_rotate/heimdal_oakhardwood_22x300_" + values.heights + "_rotate.glb";

              }
            }



            const index_id = index;
            const index_id1 = index;

            const index_id_row2 = index;
            const key_val = keys;

            {
              glb_data1 = row_url_1;
            }
            //console.log("glb_data1"+glb_data1);
            var glbdatasplit = glb_data1.split('/');
            const getimagename = glbdatasplit[8];
            const counttt = glbdatasplit[9].split('_').slice(-1);
            url = glbdatasplit.slice(0, -1);
            seturl = url.join('/') + '/';
            filenameee = glbdatasplit[9];

            BABYLON.SceneLoader.ImportMesh("", "", glb_data1, scene, function (newMeshes) {
              var mesh1 = null;
              var mesh1 = newMeshes[1];

              mesh1.isVisible = false;
              var newInstance = mesh1.createInstance("fence_form2_" + key_val + "_" + index_id1);
              flipfance = jQuery('#flipfance').val();


              if (getimagename == "heimdal_blackgrey_22x130" || getimagename == "heimdal_blackgrey_22x200" || getimagename == "heimdal_blackgrey_22x300" || getimagename == "heimdal_blackgrey_22x130_rotate" || getimagename == "heimdal_blackgrey_22x200_rotate" || getimagename == "heimdal_blackgrey_22x300_rotate") {
                if (flipfance == 0) { } else {
                  //alert(flipfance);
                  newInstance.rotate(new BABYLON.Vector3(0, 0, 2), Math.PI);
                }

              } else if (getimagename == "heimdal_oakhardwood_22x130" || getimagename == "heimdal_oakhardwood_22x200" || getimagename == "heimdal_oakhardwood_22x300" || getimagename == "heimdal_oakhardwood_22x130_rotate" || getimagename == "heimdal_oakhardwood_22x200_rotate" || getimagename == "heimdal_oakhardwood_22x300_rotate") {
                if (flipfance == 0) { } else {
                  //alert(flipfance);
                  newInstance.rotate(new BABYLON.Vector3(0, 2, 0), Math.PI);

                }

                newInstance.position.y = 0.2;
              }

              console.log("getimagename" + getimagename);

              {
                //alert(); 
                if (getimagename == "heimdal_blackgrey_22x130" || getimagename == "heimdal_oakhardwood_22x130")
                //if(getimagename == "heimdal_blackgrey_22x130")
                {
                  // alert(instanceCounti+index_id_row2);
                  newInstance.position.x = ((parseInt(instanceCounti) + index_id_row2) * 0.128) + fence_space;


                }
                // else if(getimagename == "heimdal_blackgrey_22x200" )
                else if (getimagename == "heimdal_blackgrey_22x200" || getimagename == "heimdal_oakhardwood_22x200") {
                  newInstance.position.x = ((parseInt(instanceCounti) + index_id_row2) * 0.21);









                }
                // else if(getimagename == "heimdal_blackgrey_22x300")
                else if (getimagename == "heimdal_blackgrey_22x300" || getimagename == "heimdal_oakhardwood_22x300") {
                  newInstance.position.x = ((parseInt(instanceCounti) + index_id_row2) * 0.31);





                } else if (getimagename == "heimdal_blackgrey_22x130_rotate" || getimagename == "heimdal_oakhardwood_22x130_rotate") {
                  //newInstance.position.z = (index_id1*0.128)+fence_space;
                  newInstance.position.z = ((parseInt(instanceCounti) + index_id_row2) * 0.128) + fence_space;

                } else if (getimagename == "heimdal_blackgrey_22x200_rotate" || getimagename == "heimdal_oakhardwood_22x200_rotate") {
                  newInstance.position.z = ((parseInt(instanceCounti) + index_id_row2) * 0.21);
                } else if (getimagename == "heimdal_blackgrey_22x300_rotate" || getimagename == "heimdal_oakhardwood_22x300_rotate") {
                  newInstance.position.z = ((parseInt(instanceCounti) + index_id_row2) * 0.31);
                }


                if (getimagename == "heimdal_blackgrey_22x130" || getimagename == "heimdal_oakhardwood_22x130" || getimagename == "heimdal_blackgrey_22x200" || getimagename == "heimdal_oakhardwood_22x200" || getimagename == "heimdal_blackgrey_22x300" || getimagename == "heimdal_oakhardwood_22x300") {
                  newInstance.position.z = z;




                  if (keys == 0) {
                    newInstance.position.z = 0;
                    if (values.heights == 1) { newInstance.position.z = -2.50; }
                    if (values.heights == 2) { newInstance.position.z = -2.00; }
                    if (values.heights == 3) { newInstance.position.z = -1.50; }
                    if (values.heights == 4) { newInstance.position.z = -0.00; }
                    if (values.heights == 5) { newInstance.position.z = -0.50; }
                    if (values.heights == 6) { newInstance.position.z = 0; }


                  } else {

                    if (values.heights == 1) {
                      //newInstance.position.z=-3.50+fence_space+z;
                      newInstance.position.z = 3.5 + fence_space + z;
                    }
                    else if (values.heights == 2) {
                      //newInstance.position.z=-4.00+fence_space+z;	
                      newInstance.position.z = 4 + fence_space + z;
                    }
                    else if (values.heights == 3) {
                      //newInstance.position.z=-4.50+fence_space+z;	
                      newInstance.position.z = 4.5 + fence_space + z;
                    }
                    else if (values.heights == 4) {
                      //newInstance.position.z=-5.00+fence_space+z;	
                      newInstance.position.z = 5 + fence_space + z;
                    }
                    else if (values.heights == 5) {
                      //newInstance.position.z=-5.50+fence_space+z;	

                      newInstance.position.z = 5.50 + fence_space + z;


                    }
                    else if (values.heights == 6) {
                      newInstance.position.z = z;


                      if (keys >= 2) {
                        //z=newInstance.position.z -6.00+fence_space;
                        z = newInstance.position.z + 6.00 + fence_space;
                        newInstance.position.z = z;
                      } else {
                        //newInstance.position.z= -6.00+fence_space;
                        newInstance.position.z = 6.00 + fence_space;
                        z = newInstance.position.z;
                      }
                    }

                  }

                }
                else if (getimagename == "heimdal_blackgrey_22x130_rotate" || getimagename == "heimdal_blackgrey_22x200_rotate" || getimagename == "heimdal_blackgrey_22x300_rotate" || getimagename == "heimdal_oakhardwood_22x130_rotate" || getimagename == "heimdal_oakhardwood_22x200_rotate" || getimagename == "heimdal_oakhardwood_22x300_rotate") {


                  newInstance.position.x = z;




                  if (keys == 0) {
                    newInstance.position.x = 0;
                    if (values.heights == 1) { newInstance.position.x = -2.50; }
                    if (values.heights == 2) { newInstance.position.x = -2.00; }
                    if (values.heights == 3) { newInstance.position.x = -1.50; }
                    if (values.heights == 4) { newInstance.position.x = -0.00; }
                    if (values.heights == 5) { newInstance.position.x = -0.50; }
                    if (values.heights == 6) { newInstance.position.x = 0; }

                  } else {

                    if (values.heights == 1) {
                      //newInstance.position.z=-3.50+fence_space+z;
                      newInstance.position.x = 3.50 + fence_space + z;
                    }
                    else if (values.heights == 2) {
                      //newInstance.position.z=-4.00+fence_space+z;	
                      newInstance.position.x = 4.00 + fence_space + z;
                    }
                    else if (values.heights == 3) {
                      //newInstance.position.z=-4.50+fence_space+z;	
                      newInstance.position.x = 4.50 + fence_space + z;
                    }
                    else if (values.heights == 4) {
                      //newInstance.position.z=-5.00+fence_space+z;	
                      newInstance.position.x = 5.00 + fence_space + z;
                    }
                    else if (values.heights == 5) {
                      //newInstance.position.z=-5.50+fence_space+z;	
                      newInstance.position.x = 5.50 + fence_space + z;
                    }
                    else if (values.heights == 6) {
                      newInstance.position.x = z;


                      if (keys >= 2) {
                        //z=newInstance.position.z-6.00+fence_space;
                        z = newInstance.position.x + 6.00 + fence_space;
                        newInstance.position.x = z;
                      } else {
                        //newInstance.position.z=-6.00+fence_space;
                        newInstance.position.x = 6.00 + fence_space;
                        z = newInstance.position.x;
                      }
                    }

                  }




                }

              }
              //not used



              camera.upperBetaLimit = Math.PI / 2;
              camera.lowerRadiusLimit = 4;



            });

            setTimeout(function () {
            }, 1000);
            //z++;	
          });
        }
      }

      if (Vælgform == 'opform3') {
        var msgarr3 = jQuery("#msgarr3").val();
        for (var index = 0; index < instanceCountu; index++) {

          z = 0;
          jQuery.each(JSON.parse(msgarr3), function (keys, values) {
            //console.log(z);
            if (f_color == "black" && f_type == "v22x130x6") {

              if (rotarfance == 0) {
                console.log("rotarfance0=" + rotarfance);
                row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/heimdal_blackgrey_22x130/heimdal_blackgrey_22x130_" + values.heights + ".glb";
              } else {
                console.log("rotarfance1=" + rotarfance);
                row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/heimdal_blackgrey_22x130_rotate/heimdal_blackgrey_22x130_" + values.heights + "_rotate.glb";
              }

            } else if (f_color == "black" && f_type == "v22x200x6") {
              if (rotarfance == 0) {
                row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/heimdal_blackgrey_22x200/heimdal_blackgrey_22x200_" + values.heights + ".glb";
              } else {

                row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/heimdal_blackgrey_22x200_rotate/heimdal_blackgrey_22x200_" + values.heights + "_rotate.glb";
              }
            }
            else if (f_color == "black" && f_type == "v22x300x6") {
              if (rotarfance == 0) {
                row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/heimdal_blackgrey_22x300/heimdal_blackgrey_22x300_" + values.heights + ".glb";
              } else {

                row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/heimdal_blackgrey_22x300_rotate/heimdal_blackgrey_22x300_" + values.heights + "_rotate.glb";
              }
            }
            else if (f_color == "hardwood" && f_type == "v22x130x6") {

              if (rotarfance == 0) {
                row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/heimdal_oakhardwood_22x130/heimdal_oakhardwood_22x130_" + values.heights + ".glb";
              } else {

                row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/heimdal_oakhardwood_22x130_rotate/heimdal_oakhardwood_22x130_" + values.heights + "_rotate.glb";
              }
            }

            else if (f_color == "hardwood" && f_type == "v22x200x6") {
              if (rotarfance == 0) {
                row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/heimdal_oakhardwood_22x200/heimdal_oakhardwood_22x200_" + values.heights + ".glb";
              } else {

                row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/heimdal_oakhardwood_22x200_rotate/heimdal_oakhardwood_22x200_" + values.heights + "_rotate.glb";
              }
            }
            else if (f_color == "hardwood" && f_type == "v22x300x6") {
              if (rotarfance == 0) {
                row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/heimdal_oakhardwood_22x300/heimdal_oakhardwood_22x300_" + values.heights + ".glb";
              } else {
                row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/heimdal_oakhardwood_22x300_rotate/heimdal_oakhardwood_22x300_" + values.heights + "_rotate.glb";

              }
            }



            const index_id = index;
            const index_id1 = index;
            const key_val = keys;


            {
              glb_data1 = row_url_1;
            }
            //console.log("glb_data1"+glb_data1);
            var glbdatasplit = glb_data1.split('/');
            const getimagename = glbdatasplit[8];
            const counttt = glbdatasplit[9].split('_').slice(-1);
            url = glbdatasplit.slice(0, -1);
            seturl = url.join('/') + '/';
            filenameee = glbdatasplit[9];

            BABYLON.SceneLoader.ImportMesh("", "", glb_data1, scene, function (newMeshes) {
              var mesh1 = null;
              var mesh1 = newMeshes[1];

              mesh1.isVisible = false;
              var newInstance = mesh1.createInstance("fence_form3_" + key_val + "_" + index_id1);
              flipfance = jQuery('#flipfance').val();


              if (getimagename == "heimdal_blackgrey_22x130" || getimagename == "heimdal_blackgrey_22x200" || getimagename == "heimdal_blackgrey_22x300" || getimagename == "heimdal_blackgrey_22x130_rotate" || getimagename == "heimdal_blackgrey_22x200_rotate" || getimagename == "heimdal_blackgrey_22x300_rotate") {
                if (flipfance == 0) { } else {
                  //alert(flipfance);
                  newInstance.rotate(new BABYLON.Vector3(0, 0, 2), Math.PI);
                }

              } else if (getimagename == "heimdal_oakhardwood_22x130" || getimagename == "heimdal_oakhardwood_22x200" || getimagename == "heimdal_oakhardwood_22x300" || getimagename == "heimdal_oakhardwood_22x130_rotate" || getimagename == "heimdal_oakhardwood_22x200_rotate" || getimagename == "heimdal_oakhardwood_22x300_rotate") {
                if (flipfance == 0) { } else {
                  //alert(flipfance);
                  newInstance.rotate(new BABYLON.Vector3(0, 2, 0), Math.PI);

                }

                newInstance.position.y = 0.2;
              }

              console.log("getimagename" + getimagename);

              {
                //alert(); 
                if (getimagename == "heimdal_blackgrey_22x130" || getimagename == "heimdal_oakhardwood_22x130")
                //if(getimagename == "heimdal_blackgrey_22x130")
                {
                  newInstance.position.x = ((parseInt(instanceCounti) + parseInt(instanceCountl) + index_id1) * 0.128) + fence_space;


                }
                // else if(getimagename == "heimdal_blackgrey_22x200" )
                else if (getimagename == "heimdal_blackgrey_22x200" || getimagename == "heimdal_oakhardwood_22x200") {
                  newInstance.position.x = ((parseInt(instanceCounti) + parseInt(instanceCountl) + index_id1) * 0.21);









                }
                // else if(getimagename == "heimdal_blackgrey_22x300")
                else if (getimagename == "heimdal_blackgrey_22x300" || getimagename == "heimdal_oakhardwood_22x300") {
                  newInstance.position.x = ((parseInt(instanceCounti) + parseInt(instanceCountl) + index_id1) * 0.31);





                }
                else if (getimagename == "heimdal_blackgrey_22x130_rotate" || getimagename == "heimdal_oakhardwood_22x130_rotate") {
                  newInstance.position.z = ((parseInt(instanceCounti) + parseInt(instanceCountl) + index_id1) * 0.128) + fence_space;

                } else if (getimagename == "heimdal_blackgrey_22x200_rotate" || getimagename == "heimdal_oakhardwood_22x200_rotate") {
                  newInstance.position.z = ((parseInt(instanceCounti) + parseInt(instanceCountl) + index_id1) * 0.21);
                } else if (getimagename == "heimdal_blackgrey_22x300_rotate" || getimagename == "heimdal_oakhardwood_22x300_rotate") {
                  newInstance.position.z = ((parseInt(instanceCounti) + parseInt(instanceCountl) + index_id1) * 0.31);
                }


                if (getimagename == "heimdal_blackgrey_22x130" || getimagename == "heimdal_oakhardwood_22x130" || getimagename == "heimdal_blackgrey_22x200" || getimagename == "heimdal_oakhardwood_22x200" || getimagename == "heimdal_blackgrey_22x300" || getimagename == "heimdal_oakhardwood_22x300") {
                  newInstance.position.z = z;




                  if (keys == 0) {
                    newInstance.position.z = 0;
                    if (values.heights == 1) { newInstance.position.z = -2.50; }
                    if (values.heights == 2) { newInstance.position.z = -2.00; }
                    if (values.heights == 3) { newInstance.position.z = -1.50; }
                    if (values.heights == 4) { newInstance.position.z = -0.00; }
                    if (values.heights == 5) { newInstance.position.z = -0.50; }
                    if (values.heights == 6) { newInstance.position.z = 0; }


                  } else {

                    if (values.heights == 1) {
                      //newInstance.position.z=-3.50+fence_space+z;
                      newInstance.position.z = 3.5 + fence_space + z;
                    }
                    else if (values.heights == 2) {
                      //newInstance.position.z=-4.00+fence_space+z;	
                      newInstance.position.z = 4 + fence_space + z;
                    }
                    else if (values.heights == 3) {
                      //newInstance.position.z=-4.50+fence_space+z;	
                      newInstance.position.z = 4.5 + fence_space + z;
                    }
                    else if (values.heights == 4) {
                      //newInstance.position.z=-5.00+fence_space+z;	
                      newInstance.position.z = 5 + fence_space + z;
                    }
                    else if (values.heights == 5) {
                      //newInstance.position.z=-5.50+fence_space+z;	

                      newInstance.position.z = 5.50 + fence_space + z;


                    }
                    else if (values.heights == 6) {
                      newInstance.position.z = z;


                      if (keys >= 2) {
                        //z=newInstance.position.z -6.00+fence_space;
                        z = newInstance.position.z + 6.00 + fence_space;
                        newInstance.position.z = z;
                      } else {
                        //newInstance.position.z= -6.00+fence_space;
                        newInstance.position.z = 6.00 + fence_space;
                        z = newInstance.position.z;
                      }
                    }

                  }

                }
                else if (getimagename == "heimdal_blackgrey_22x130_rotate" || getimagename == "heimdal_blackgrey_22x200_rotate" || getimagename == "heimdal_blackgrey_22x300_rotate" || getimagename == "heimdal_oakhardwood_22x130_rotate" || getimagename == "heimdal_oakhardwood_22x200_rotate" || getimagename == "heimdal_oakhardwood_22x300_rotate") {


                  newInstance.position.x = z;




                  if (keys == 0) {
                    newInstance.position.x = 0;
                    if (values.heights == 1) { newInstance.position.x = -2.50; }
                    if (values.heights == 2) { newInstance.position.x = -2.00; }
                    if (values.heights == 3) { newInstance.position.x = -1.50; }
                    if (values.heights == 4) { newInstance.position.x = -0.00; }
                    if (values.heights == 5) { newInstance.position.x = -0.50; }
                    if (values.heights == 6) { newInstance.position.x = 0; }

                  } else {

                    if (values.heights == 1) {
                      //newInstance.position.z=-3.50+fence_space+z;
                      newInstance.position.x = 3.50 + fence_space + z;
                    }
                    else if (values.heights == 2) {
                      //newInstance.position.z=-4.00+fence_space+z;	
                      newInstance.position.x = 4.00 + fence_space + z;
                    }
                    else if (values.heights == 3) {
                      //newInstance.position.z=-4.50+fence_space+z;	
                      newInstance.position.x = 4.50 + fence_space + z;
                    }
                    else if (values.heights == 4) {
                      //newInstance.position.z=-5.00+fence_space+z;	
                      newInstance.position.x = 5.00 + fence_space + z;
                    }
                    else if (values.heights == 5) {
                      //newInstance.position.z=-5.50+fence_space+z;	
                      newInstance.position.x = 5.50 + fence_space + z;
                    }
                    else if (values.heights == 6) {
                      newInstance.position.x = z;


                      if (keys >= 2) {
                        //z=newInstance.position.z-6.00+fence_space;
                        z = newInstance.position.x + 6.00 + fence_space;
                        newInstance.position.x = z;
                      } else {
                        //newInstance.position.z=-6.00+fence_space;
                        newInstance.position.x = 6.00 + fence_space;
                        z = newInstance.position.x;
                      }
                    }

                  }




                }

              }
              //not used



              camera.upperBetaLimit = Math.PI / 2;
              camera.lowerRadiusLimit = 4;



            });

            setTimeout(function () {
            }, 1000);
            //z++;	
          });
        }
      }




      scene.debugLayer.show({
        embedMode: true,
        //embedMode: false,
      });
      //scene.debugLayer.show();



      return scene;

    };
    //fencecolor

    const scene = createScene(); //Call the createScene function
    // Register a render loop to repeatedly render the scene

    engine.runRenderLoop(function () {
      scene.render();
    });



    // Watch for browser/canvas resize events
    window.addEventListener("resize", function () {
      engine.resize();


    });
    jQuery("ul li.sidebar_calc_box1,.sidebar_calc_box2,.sidebar_calc_box3,.sidebar_calc_box4,.sidebar_calc_box5").click(function () {
      scene.dispose();
      custom_mesh = '';
      custom_button = '';
      //custom_advancedTexturee.dispose();
      row1_array = [];
      row1_array1 = [];
      row2_array = [];
      row2_array1 = [];
      row3_array = [];
      row3_array1 = [];
      row4_array = [];
      row4_array1 = [];
      var custom_type = 'fence';
      color1 = [];
      color2 = [];
      color3 = [];
      color4 = [];
      custom_height_image1 = [];
      custom_height_image2 = [];
      custom_height_image3 = [];
      custom_height_image4 = [];
      jQuery("#instanceCounti").val('0');
      jQuery("#instanceCountl").val('0');
      jQuery("#instanceCountu").val('0');
      jQuery("#squere").val('0');
      jQuery("#fencetype").val('');


    });

    jQuery("ul li.sidebar_calc_box6").click(function () {
      scene.dispose();
      custom_mesh = '';
      custom_button = '';
      //custom_advancedTexturee.dispose();
      row1_array = [];
      row1_array1 = [];
      row2_array = [];
      row2_array1 = [];
      row3_array = [];
      row3_array1 = [];
      row4_array = [];
      row4_array1 = [];
      var custom_type = 'fence';
      color1 = [];
      color2 = [];
      color3 = [];
      color4 = [];
      custom_height_image1 = [];
      custom_height_image2 = [];
      custom_height_image3 = [];
      custom_height_image4 = [];
      jQuery("#fencetype").val('');

    });



  }


  jQuery("#nulstil").click(function () {

    setTimeout(function () {

      location.reload();

    }, 500);



  });



</script>


<script>





  if (jQuery(window).width() < 767) {
    jQuery(".desktop-vo").find(".renderCanvas").removeAttr('id');
    jQuery(".desktop-vo").find("#printpdf").removeAttr('id');
    jQuery(".desktop-vo").find("#fuldskaerm").removeAttr('id');
    jQuery(".desktop-vo").find("#nulstil").removeAttr('id');
    jQuery(".desktop-vo").find("#addtocart").removeAttr('id');
    jQuery(".desktop-vo").find("#testdemo").removeAttr('id');
    jQuery(".desktop-vo").find("#testroter").removeAttr('id');
    //jQuery('.renderCanvas').css('heights','350px');
    // change functionality for smaller screens
  } else {
    jQuery(".modal-vo").find(".renderCanvas").removeAttr('id');
    jQuery(".modal-vo").find("#printpdf").removeAttr('id');
    jQuery(".modal-vo").find("#fuldskaerm").removeAttr('id');
    jQuery(".modal-vo").find("#nulstil").removeAttr('id');
    jQuery(".modal-vo").find("#addtocart").removeAttr('id');
    jQuery(".modal-vo").find("#testdemo").removeAttr('id');
    jQuery(".modal-vo").find("#testroter").removeAttr('id');
    //jQuery(".desktop-vo").find(".renderCanvas").removeAttr('id');
    // document.body.style.overflow = 'hidden';
  }


  //jQuery('.custom_glb_type').change(function(){

  //});



  jQuery('.renderCanvas').hover(function () {
    if (jQuery(window).width() < 767) {
      //jQuery('.renderCanvas').css('heights','350px');
      // change functionality for smaller screens
    } else {
      document.body.style.overflow = 'hidden';
    }

  }, function () {
    document.body.style.overflow = 'scroll';
  });



  jQuery("#fuldskaerm").click(function () {
    if (jQuery(window).width() > 767) {
      jQuery(".resizeing").css("width", "0px");
      jQuery(".resizeing").css("min-width", "0px");
      jQuery(".fullwidth").css("width", "100%");
      jQuery(".renderCanvas").css("position", "absolute");
      jQuery("html, body").animate({ scrollTop: 180 });
      jQuery(".minimizebutton").show();
    }
  });

  jQuery(".minimizebutton").click(function () {
    jQuery(".resizeing").css("width", "35%");
    jQuery(".resizeing").css("min-width", "588px");
    jQuery(".fullwidth").css("width", "65%");
    jQuery(".renderCanvas").css("position", "");

    jQuery(".minimizebutton").hide();
  });
  jQuery('body').on('mouseover', '#renderCanvas', function () {
    jQuery('body, html').css('overflow', 'hidden');
  }).on('mouseout', '#renderCanvas', function () {
    jQuery('body, html').css('overflow', 'auto');
  });
</script>{"id":2095,"date":"2021-07-22T06:56:46","date_gmt":"2021-07-22T06:56:46","guid":{"rendered":"https:\/\/kirkedal.se\/?page_id=2095"},"modified":"2021-07-22T07:01:38","modified_gmt":"2021-07-22T07:01:38","slug":"beregn-terrasse_new","status":"publish","type":"page","link":"https:\/\/kirkedal.de\/de\/beregn-terrasse_new\/","title":{"rendered":"beregn-terrasse_new"},"content":{"rendered":"","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-2095","page","type-page","status-publish","hentry","prodpage-classic"],"acf":[],"_links":{"self":[{"href":"https:\/\/kirkedal.de\/de\/wp-json\/wp\/v2\/pages\/2095","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kirkedal.de\/de\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/kirkedal.de\/de\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/kirkedal.de\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kirkedal.de\/de\/wp-json\/wp\/v2\/comments?post=2095"}],"version-history":[{"count":3,"href":"https:\/\/kirkedal.de\/de\/wp-json\/wp\/v2\/pages\/2095\/revisions"}],"predecessor-version":[{"id":2262,"href":"https:\/\/kirkedal.de\/de\/wp-json\/wp\/v2\/pages\/2095\/revisions\/2262"}],"wp:attachment":[{"href":"https:\/\/kirkedal.de\/de\/wp-json\/wp\/v2\/media?parent=2095"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}