<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{height: 200px !important;
    object-fit: contain;}
	#embed-host{
		display: 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;
}

</style>
<style type="text/css">
.modal-header {
	background: #abab04;
}
.bootstrap-dialog-title {
	color: #fff;
	font-weight: 600;
}
.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-text-box h2 {
	font-size:36px;
	font-weight:500;
	color:#000;
	/*margin:40px 0;*/
	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:hover {
	/*border: 3px solid #000;*/
box-shadow: 0px 1px 1px 1px #5a5a5a8f;
}
.vaelg-form ul li img {
	cursor: pointer;
	mix-blend-mode: darken;
}
.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;
}
.cursorpointer {
	cursor: pointer;
}
.id-box-50 {
width: 33.33%;
    float: left;
    display: table;
	mix-blend-mode: darken;
}
.calculator-2 .id-box-50 img {
   /* width: 80%;*/
}
.cursorpointer.fencePostsize.wqs_size1{mix-blend-mode: darken;}
.cursorpointer.topFence{mix-blend-mode: darken;}
.fenceAccessories{mix-blend-mode: darken;border:1px solid #f4f4f4;}
.df-row .w-50 {
	width:100%%;
	
	padding:0px;
}
.dimensioner-form {
	width:100%;
	float:left;
}
.ccb-text .ccb-text-box .indsaet-dimensioner {
   /* padding: 100px 0px 0px 0px;*/
}
.indsaet-dimensioner {
	display: flex;
    align-items: center;
    justify-content: center;
}
.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:5px;
	    
    color: #000;
    font-weight: unset;
}
.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:100%;
	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:0px auto;
	mix-blend-mode: darken;
}


}
@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 30px;
	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;
	padding:0 15px;
	color:#367b11;
	font-weight:400;
	line-height: normal;
}
.button-row {
	width:100%;
	float:left;
	margin-top:40px;
	margin-bottom: 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:0px 0;
	display:table;
}
.tbl_custom_data th, .tbl_custom_data td {
	border-bottom:1px solid #999;
	text-align:left;
	padding:13px 20px;
	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;
}
.w-100{width: 100%;}
 @media screen and (max-width:1800px) {

 	.tilbehorr{
 		    /*width: 223px !important;
 		    background-color: #fff;*/
 	}
 	.tilbehorr img{
 		    width: 95px;
 		    height: auto !important;
 	}
}

.df-row {
 /*width: 100%;*/
 width: 70%;
 float: left;
 padding: 0 40px;
}
.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;
}
}
@media screen and (max-width:1200px) {
		.te-price span{
		line-height: normal;
	}
.col-8 {
 width: 58%;
}
 .vaelg-form ul li {
 width: 32.23%;
}
.col-4 {
 width: 44%;
}
.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) {
	.te-price span{
		line-height: normal;
	}
 .vaelg-tilbehor-2 {
 float: left;
 width: 100%;
 border: 1px solid #000;
 border-right: none;
 display: inline-block;
 padding: 20px 60px;
 text-align: left;
}
}
@media screen and (max-width:900px) {
.id-box-50 {
 width: 100%;
}
}
 @media screen and (max-width:768px) {
	 .te-price span{
	 	font-size: 36px !important;
	 	    line-height: normal;

	 }
	 .button-row button{
	 	width: 96%;
	 }
}
 @media screen and (max-width:767px) {
 .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%;
}
.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;
}
.df-row {
padding: 0;
}
.vaelg-profil .product_item {
 width: 46% !important;
 margin: 3px 2% !important;
}
.col-md-3.Tilbehør {
 border: 1px solid #ddd;
 padding: 5px;
 margin: 3px 3px 3px 3px;
 width: 47%;
}
}
@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%;
}
}
.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: 1800px)
{
.df-row {
    width: 70%;
    /* width: 100%; */
    float: left;
    padding: 0 9px;
}
}
@media screen and (max-width: 1400px)
{
.df-row {
    padding: 0 6px;
}
}
.df-row.activee .w-50 {
    margin-bottom: 11px;
	display: inline-block;
}
@media screen and (max-width: 1800px)
{
.df-row label {
    font-size: 14px;
    margin-bottom: 2px;
}
}
@media screen and (max-width: 1400px)
{
.df-row .w-50 label {
    font-size: 11px;
}
}
.indsaet-dimensioner_input_wrap .df-row .w-50 {
    width: 100%;
    padding: 0;
}
.dimention {
    width: 21%;
    font-size: 10px;
    margin: 0;
}
.vaelg-top_profil_wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}
@media screen and (max-width: 1400px)
{
.calculator-7 .col-4 {
    min-width: 588px;
}
}
@media screen and (max-width: 1800px)
{
.calculator-7 .col-4 {
    min-width: 588px;
}
}

.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 #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;
}
.ccb-text-box .vaelg-profil {
   /* margin-top: 70px;*/
	display: flex;
    align-items: center;
    justify-content: center;
	margin: 0 auto;
    float: unset;
}
.profile_selection_step_wrap {
    margin: 0 auto;
    float: unset;
}
.profile_selection_step_wrap > .product_item {
   /* padding: 15px;*/
}
.id-box-50 img {
    margin: 0 auto;
}

</style>
<style type="text/css">
.custom_glb_type{
	width: 25%;
	margin-top: 5px !important;
	    margin-bottom: 0;
}
.custom_height{
	width: 25%;	
	    /*padding: 15px !important;*/
	    margin: 0;
}
.custom_radio_button{
	display: flex;
    width: 25%;
    float: none;
    margin: auto;
}
.custom_radio_button label{
	margin-left: 5px;
}
.custom_radio_button input{
	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;

}
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:0 auto;
	margin-bottom:4px;
}
@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 30px;
	float:left;
	/*margin:50px 0;*/
}
.vaelg-tilbehor-1-img {
	/*width:33.333%;*/
	width:48%;
	float:left;
	text-align:center;
	margin: 1%;
	border:1px solid #e1e1e1;
}
.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%;*/
	width:100%;
	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;
	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;
}

.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;
}

.wqs_div{
	    float: left;
	    height: 300px;
	    /*width: 300px;*/
	    padding: 15px;
	    border: 1px solid #817e7e;
	    margin: 2px;
	   /* background: #fff;*/
	}
	.ccb-text-box .vaelg-profil{
		   /* margin-top: 70px;*/
	}
	
.profile_selection_step_wrap{    margin: 0 auto;
    float: unset;}
	
.stolper_selection_step_wrap > ul {display: flex;
  align-items: center;
  justify-content: center;}
 .stolper_selection_step_wrap > ul > li{display: flex;
  align-items: center;
  justify-content: center;border-color: #e1e1e1;
 	
    height: 280px;
    width: 400px;
 
  }
 .profile_selection_step_wrap > .product_item{/*padding: 15px;*/}
 .vaelg-top_profil_wrap{display: flex;
  align-items: center;
  justify-content: center;}
  .vaelg-top_profil_wrap .wqs_div{border:1px solid #e1e1e1;}
 .btn_beregn_vaelg_tilbehor_step{text-align:center;padding-top: 60px;}
 .btn_beregn_vaelg_tilbehor_step{
 	width: 75%;
 }
 .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 #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;
	}
	.renderCanvas{
		height: 800px;
	}
	.stk{
		    height: 33px;
	   
	      border: 1px solid #ddd;
	    border-left: none;
	    background: #fff;
	    text-align: center;
	    line-height: 2;
	    width: 29px;
	    float: left;
	    border-top-right-radius: 6px;
	    border-bottom-right-radius: 6px;
	}
	.stokdiv input{
		width: 28%;height: 33px;border: 1px solid #ddd;float: left;
	}
	.stokdiv{
		  position: absolute;
	    right: -60px;
	    top: 34px;
	    width: 45%;
	    height: 33px;
	}
		.vaelg-tilbehor-2 .form-control {
				    height: 35px;
				    border-radius: 0;
				    border: 1px solid #777;
				    background: #fff;
				    float: left;
				    margin: 0px;
				    width: 50%;
				    border-top-left-radius: 4px;
    				border-bottom-left-radius: 4px;
				}
				.vaelg-tilbehor-2 .w-70 {
					    width: 100%;
					    padding: 0;
					}
					.vaelg-tilbehor-2 .w-70 span {
					    height: 35px;
					    border-radius: 0;
					    float: left;
					    border: 1px solid #777;
					    border-left: none;
					    background: #fff;
					    text-align: center;
					    line-height: 35px;
					    width: 25%;
					    border-top-right-radius: 4px;
					    border-bottom-right-radius: 4px;
					    background: #f4f4f4;
					}
					p.magic-optn {
					    padding-top: 5px;
					    padding-bottom: 5px;
					    padding-left: 5px;
					    background-color: #fff;
					    border: 1px solid #e1e1e1;
					}
					.magic-select-gup {
					    padding-top: 50px;
					    padding-bottom: 13px;
					        width: 75%;
					}
					  .calculator-6 .calculator-contact-box .ccb-text-box{
					    	/*margin: 22px 5px 14px 285px;*/
					    }
					    .btn_custom_bereng{float: unset;
    background: #fff;
    border: 1px solid #E1E1E1!important;
    padding: 6px 8px 7px 8px;
    width: 68%;
    border-radius: 0px;
    font-weight: 700;}
    .calculator-2 .id-box-50 img{
    	   /* width: 80%;*/
    }
    .all-data-list-finel{padding: 0px 60px 0 58px;}
    #Acc1s{display: none;}
#Acc3s{display: none;}
#Alu_led_80x80s{display: none;}
#T_clips_til_bort_40x50s{display: none;}
#gift-wrap-option1{
	position: fixed;
    top: 50%!important;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 500px;
}
	@media screen and (min-width:2560px) {
	.df-row label {
 font-size: 18px;}
 .dimensioner-form {}
 .calculator-7 .col-4{
		min-width: 588px;
	}
}
/*@media screen and (min-width:1800px) {
	.df-row label {
 font-size: 10px;}
 .dimensioner-form {}
}*/
 @media screen and (max-width:1800px) {
 	.stokdiv input{
 		width: 45%;
 	}
 	.stokdiv{
 		right: -33px;
 	}
 	.wqs_div{
	    float: left;
	   height: auto;
	    width: 250px;}
.df-row label {
 font-size: 14px;
 margin-bottom: 2px;
}
.df-row {
	width: 70%;
 /*width: 100%;*/
 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;
}
.ccb-list .ccb-list-box ul{
	padding: 60px;
}
.calculator-6 .calculator-contact-box .ccb-text-box {
    /*margin: 22px 5px 14px 200px;*/
}
.ccb-list .ccb-list-box ul{
	    padding: 60px 60px 0 60px;
}
.ccb-list .ccb-list-box ul.all-data-list-finel{
	       padding: 0px 60px 0 60px;
}
.calculator-7 .col-4{
		min-width: 588px;
	}
}
@media screen and (max-width:1400px) {
	.stokdiv{
		right: -22px;
		top: 15px;
	}
	.df-row {
    
    padding: 0 6px;
}
	.df-row .w-50 {
	
	padding: 6px;
}
.df-row .w-50 label{
	font-size: 11px;
}
.ccb-list .ccb-list-box ul {
    padding: 60px 0px 0 0px;
}
.ccb-list .ccb-list-box ul.all-data-list-finel{
	    padding: 0px 49px 0 49px;
}
.ccb-text-box .stolper_selection_step_wrap{
	    width: 80%;
    margin: auto;
}
.stolper_selection_step_wrap > ul > li{
	height: 224px;
}
.cursurpointers{
	    width: 60%;
}
#Acc1s{display: none;}
#Acc3s{display: none;}
#Alu_led_80x80s{display: none;}
#T_clips_til_bort_40x50s{display: none;}
.calculator-6 .calculator-contact-box .ccb-text-box{
	/*margin: 22px 5px 14px 170px;*/
}
.vaelg-tilbehor-2 .form-control{border: 1px solid #ddd;}
.vaelg-tilbehor-2 .w-70 span{border: 1px solid #ddd;}
.calculator-7 .col-4{
		min-width: 588px;
	}
}

@media screen and (max-width:1200px) {
	.wqs_div{
	    float: left;
	    height: 160px;
	    width: 200px;}
.col-8 {
 width: 58%;
}
 .vaelg-form ul li {
 /*width: 32.23%;*/
 width: 48%;
}
.col-4 {
 width: 44%;
}
.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;
}
.indsaet-dimensioner .id-box-50{
		width: 100%;
	}
	.df-row{
		width: 36%;
	}
	.id-box-50 img {
 	   margin: 14px auto;
	}
	.ccb-list .ccb-list-box ul{
		padding: 48px 29px 0 29px;
	}
	.ccb-list .ccb-list-box ul.all-data-list-finel{
	    padding: 0px 29px 0 29px;
	}
	.calculator-3 .vaelg-profil .id-box-50{
		width: 49.33%;
	}
	.calculator-4 .calculator-contact-box .ccb-text-box h2{
		margin: 0;
    padding: 38px;
	}
	.ccb-text-box .stolper_selection_step_wrap{
		width: 61%;
	}
	.calculator-4 .stolper_selection_step_wrap > ul > li{    height: 185px;}
	.calculator-6 .calculator-contact-box .ccb-text-box {
    margin: 22px 5px 14px 126px;
}
.vaelg-tilbehor-2{border: 1px solid #ddd !important;}
.btn_beregn_vaelg_tilbehor_step{width: 100%;}
.btn_beregn_vaelg_tilbehor_step{    text-align: inherit;
	padding-top: 45px;
    margin-bottom: 8px;
}
p.magic-optn{padding-top: 0px;
    padding-bottom: 0px;
    padding-left: 4px;}
    .magic-select-gup{width: 88%;}
    .calculator-7 .col-4{
		min-width: 588px;
	}
}
@media screen and (max-width:1150px) {
	.df-row .form-control{
		    width: 60%;
	}
	.df-row span{
		    width: 15%;
	}
	.stolper_selection_step_wrap > ul > li{
		height: 50%;
    width: 50%;
	}
	.calculator-7 .col-4{
		min-width: 588px;
	}
}
@media screen and (max-width:1100px) {
	.wqs_div{
	    float: left;
	    height: 170px;
	    width: 200px;}
 .vaelg-tilbehor-2 {
 float: left;
 width: 100%;
 border: 1px solid #000;
 border-right: none;
 display: inline-block;
 padding: 20px 60px;
 text-align: left;
}
.vaelg-tilbehor-2 {
    border: 1px solid #f4f4f4 !important;
    padding: 0px 139px 0px 0px;
}
.custom-tilberor{
	    border: 1px solid #ddd;padding: 12px;
    text-align: center;
}
.vaelg-tilbehor-2 .w-70 {float: none;
    display: table;
    margin: auto;
    width: auto;}
    .vaelg-tilbehor-2 .w-70 input{    width: 75%;}
    p.magic-optn {
    padding-top: 5px;
    padding-bottom: 5px;
    padding-left: 5px;
}
.magic-select-gup{    width: 100%;}
.calculator-7 .col-4{
		min-width: 588px;
	}
}
@media screen and (max-width:1024px) {
	.indsaet-dimensioner .id-box-50{
		width: 100%;
	}
	.calculator-7 .col-4{
		min-width: 588px;
	}

}
@media screen and (max-width:900px) {
	.cursurpointers{
		max-width: 66%;
	}
	.stokdiv{
		    right: -8px;
		    top: 15px;
	}
	.stk{
		    height: 23px;
		    font-size: 10px;
		    line-height: 20px;
	}
	.stokdiv input{
		width: 45%;
    height: 23px;
	}
	.stolper_selection_step_wrap > ul > li{display: flex;
  align-items: center;
  justify-content: center;border-color: #e1e1e1;
 	
    height: 50%;
    width: 50%;
 
  }
	.te-price span{
		font-size: 36px;
   		 line-height: normal;
	}
	.wqs_div {
    float: left;
    height: 150px;
    width: 154px;
}
.id-box-50 {
 width: 100%;
}
.calculator-6 .calculator-contact-box .ccb-text-box{
	margin: 0 auto;
}
.vaelg-tilbehor-2{
	    padding: 3px 12px 0px 0px;
}
}
 @media screen and (max-width:767px) {
.renderCanvas{
		height: 350px;
	}
	.mouse_gest{
	display:none;	
	}
 	.button-row #printpdf {
	    width: 98%;
	    float: left;
	    margin: 0px 1%;
	    background: #FFF;
	    border: none;
	    padding: 15px 0;
	    font-size: 16px;
	    box-shadow: 0 6px 5px #dfdfdf;
	}
	.button-row #fuldskaerm {
	    width: 98%;
	    float: left;
	    margin: 7px 1%;
	    background: #FFF;
	    border: none;
	    padding: 15px 0;
	    font-size: 16px;
	    box-shadow: 0 6px 5px #dfdfdf;
	}
	.button-row #nulstil {
	    width: 98%;
	    float: left;
	    margin: 0px 1%;
	    background: #FFF;
	    border: none;
	    padding: 15px 0;
	    font-size: 16px;
	    box-shadow: 0 6px 5px #dfdfdf;
	}
	.custom-tilberor{border: none;}
 .col-4 {
 width: 100%;
 display: block;
}
.col-8 {
 width: 100%;
}
.row, .thumbnails {
 margin-left: 0;
 margin: 0;
}
.vaelg-form ul li {
 width: 31.23%;
}
.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-box.calculator-7{
	 display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    -moz-box-orient: vertical;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    /* optional */
    -webkit-box-align: start;
    -moz-box-align: start;
    -ms-flex-align: start;
    -webkit-align-items: flex-start;
    align-items: flex-start;
}
.calculator-contact-box.desktop-vo{-webkit-box-ordinal-group: 2;
    -moz-box-ordinal-group: 2;
    -ms-flex-order: 2;
    -webkit-order: 2;
    order: 2;}
  
.calculator-box.calculator-7 .tbl_custom_data{-webkit-box-ordinal-group: 1;
    -moz-box-ordinal-group: 1;
    -ms-flex-order: 1;
    -webkit-order: 1;
    order: 1;}

.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%;
}
.calculator-box.calculator-3 .id-box-50 {
 width: 50%;
}
.vaelg-tilbehor-1-img {
 width: 48%;
 float: left;
 text-align: center;
}
.vaelg-tilbehor-2{
	padding: 16px 18px;
    margin: 11px 0px 0px 0px;
    border: 1px solid #d7d7d7 !important;
}
.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;
}
}
@media screen and (max-width:600px) {}
.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;
}
.cursurpointer {
	cursor: pointer;
}
@media screen and (max-width:450px) {
.wqs_div {
    float: left;
    height: 96%;
    width: 96%;
    padding: 3px;
    border: 1px solid #817e7e;
    margin: 7px;
    background: #fff;
}
}
body::-webkit-scrollbar {
  display: none;
}
.calculator-box .col-4 h2 {
    display: none;
}
.calculator-box.calculator-7 .calculator-contact-box .ccb-text-box{
	margin: auto;
    width: 100%;
    display: table;
	}
.vaelg-tilbehor.col-md-12 {
    /*margin-top: 70px;*/
}

.fenceAccessories{width: auto;
    max-height: 200px;}
	
	
@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;}
}
.ccb-list .ccb-list-box ul {
   
    margin-bottom: 15px;
    margin-top: 15px;
}
</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"/>
 <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script type="text/javascript">



var c_color="";
var stolpestorrelse_color='';
    var ready_for_pdf = false;
    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 form_lengths = [];
    var form_heights = [];
    var selected_form_id = "";
    var corners_cnt =0;
    var widthT = 0;
    var pointCounter = 0;
    var map_init = false;
    var switch_map_val=0;

    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>
<div id="map_div" style="height: 800px;display:none;">
  <input id="wqs_control_segment" name="wqs_control_segment" type="hidden" value="" />
  <input id="color" type="hidden" value="" />
  <input id="model" type="hidden" value="" />
  <input id="topmodel" type="hidden" value="" />
  <input id="post" type="hidden" value="" />
  <input id="led" type="hidden" value="" />
  <input id="skruer" type="hidden" value="" />
  <input id="postsize" type="hidden" value="" />
  <input id="endekap" type="hidden" value="" />
   <input type="hidden" id="fencetype" name="fencetype" value=""/>
  <!-- HIDDEN INPUT TYPE TOTAL-->
  <input id="fencetype1" name="fencetype1" type="hidden" value="" />
  <!-- HIDDEN INPUT TYPE topprofile-->
  <input id="topprofiletype1" name="topprofiletype1" type="hidden" value="" />
  <!-- HIDDEN INPUT TYPE postsize-->
  <input id="postsize1" name="postsize1" type="hidden" value="" />
  <!-- 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">
            <ul>
              <li data_id="1"><img src="https://kirkedal.de/wp-content/images/form1_1.jpg" alt="" title=""></li>
              <li data_id="2"><img src="https://kirkedal.de/wp-content/images/form2_2.jpg" alt="" title=""></li>
              <li data_id="3"><img src="https://kirkedal.de/wp-content/images/form3_3.jpg" alt="" title=""></li>
              <li data_id="4"><img src="https://kirkedal.de/wp-content/images/form4_4.jpg" alt="" title=""></li>
            <!--  <li data_id="5"><img src="https://kirkedal.de/wp-content/images/opform2_2.png" alt="" title=""></li>
              <li data_id="6"><img src="https://kirkedal.de/wp-content/images/opform3_3.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 / Støjhegn</span> <img src="https://kirkedal.de/wp-content/uploads/2021/01/copenhagen-1.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/2021/01/copenhagen-1.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 Støjbatt</span> <img src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
            <li><span>5. Vælg Lameller</span> <img src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
            <li><span>6. Vælg Topskinne</span> <img src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
            <li><span>7. Vælg 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" id='accordion' 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="form1">
                  <div class="w-50 " >
                    <label>Side A - Højde </label>
                    <!--<input type="text" class="form-control" name="Højde" id="Højde">-->
                    <select id="height_0"  class="form-control" >
                      <option value="1.84">1,84</option>
                    </select>
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Side A - Længde </label>
                    <input id="length_0" class="form-control"  type="number" value="" />
                    <span>mtr</span> </div>
                </div>
                <div class="df-row" id="form2_2" style="display:none;">
                  <input class="hidPost" type="hidden" value="form2">
                  <div class="w-50 ">
                    <label>Side A - Højde</label>
                    <select id="height_0" class="form-control" >
                      <option value="1.84">1,84</option>
                    </select>
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Side A - Længde</label>
                    <input id="length_0" class="form-control" type="number" value="" />
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Side B - Højde</label>
                    <select id="height_1" class="form-control">
                      <option value="1.84">1,84</option>
                    </select>
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Side B - Længde</label>
                    <input id="length_1" class="form-control" type="number" value="" />
                    <span>mtr</span> </div>
                </div>
                <div class="df-row" id="form3_3" style="display:none;">
                  <input class="hidPost" type="hidden" value="form3" />
                  <div class="w-50 ">
                    <label>Side A - Højde</label>
                    <select id="height_0" class="form-control">
                      <option value="1.84">1,84</option>
                    </select>
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Side A - Længde</label>
                    <input id="length_0" class="form-control" type="number" value="" />
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Side B - Højde</label>
                    <select id="height_1" class="form-control">
                      <option value="1.84">1,84</option>
                    </select>
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Side B - Længde</label>
                    <input id="length_1"class="form-control" type="number" value="" />
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Side C - Højde</label>
                    <select id="height_2" class="form-control">
                      <option value="1.84">1,84</option>
                    </select>
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Side C - Længde</label>
                    <input id="length_2" class="form-control"  type="number" value="" />
                    <span>mtr</span> </div>
                </div>
                <div class="df-row" id="form4_4" style="display:none;">
                  <input class="hidPost" type="hidden" value="form4">
                  <div class="w-50 ">
                    <label>Side A - Højde</label>
                    <select id="height_0" class="form-control">
                      <option value="1.84">1,84</option>
                    </select>
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Side A - Længde</label>
                    <input id="length_0" class="form-control" type="number" value="" />
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Side B - Højde</label>
                    <select id="height_1" class="form-control">
                      <option value="1.84">1,84</option>
                    </select>
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Side B - Længde</label>
                    <input id="length_1"class="form-control" type="number" value="" />
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Side C - Højde</label>
                    <select id="height_2" class="form-control">
                      <option value="1.84">1,84</option>
                    </select>
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Side C - Længde</label>
                    <input id="length_2"class="form-control" type="number" value="" />
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Side D - Højde</label>
                    <select id="height_3" class="form-control">
                      <option value="1.84">1,84</option>
                    </select>
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Side D - Længde</label>
                    <input id="length_3" class="form-control" type="number" value="" />
                    <span>mtr</span> </div>
                </div>
                <div class="df-row" id="form5_5" style="display:none;">
                  <input class="hidPost" type="hidden" value="opform2">
                  <div class="w-50 ">
                    <label>Side A - Højde</label>
                    <select id="height_0" class="form-control">
                      <option value="1.84">1,84</option>
                    </select>
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Side A - Længde</label>
                    <input id="length_0" class="form-control" type="number" value="" />
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Side B - Højde</label>
                    <select id="height_1" class="form-control">
                      <option value="1.84">1,84</option>
                    </select>
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Side B - Længde</label>
                    <input id="length_1" class="form-control" type="number" value="" />
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Side C - Højde</label>
                    <select id="height_2" class="form-control">
                      <option value="1.84">1,84</option>
                    </select>
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Side C - Længde</label>
                    <input id="length_2" class="form-control" type="number" value="" />
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Side D - Højde</label>
                    <select id="height_3" class="form-control" >
                      <option value="1.84">1,84</option>
                    </select>
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Side D - Længde</label>
                    <input id="length_3" class="form-control" type="number" value="" />
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Højde for part E</label>
                    <select id="height_4" class="form-control">
                      <option value="1.84">1,84</option>
                    </select>
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Længde for part E</label>
                    <input id="length_4" class="form-control" type="number" value="" />
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Højde for part F</label>
                    <select id="height_5" class="form-control">
                      <option value="1.84">1,84</option>
                    </select>
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Længde for part F</label>
                    <input id="length_5" class="form-control" type="number" value="" />
                    <span>mtr</span> </div>
                </div>
                <div class="df-row" id="form6_6" style="display:none;">
                  <input class="hidPost" type="hidden" value="opform3">
                  <div class="w-50 ">
                    <label>Side A - Højde</label>
                    <select id="height_0" class="form-control">
                      <option value="1.84">1,84</option>
                    </select>
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Side A - Længde</label>
                    <input id="length_0" class="form-control" type="number" value="" />
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Side B - Højde</label>
                    <select id="height_1" class="form-control">
                      <option value="1.84">1,84</option>
                    </select>
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Side B - Længde</label>
                    <input id="length_1" class="form-control" type="number" value="" />
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Side C - Højde</label>
                    <select id="height_2"  class="form-control">
                      <option value="1.84">1,84</option>
                    </select>
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Side C - Længde</label>
                    <input id="length_2" class="form-control"  type="number" value="" />
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Side D - Højde</label>
                    <select id="height_3" class="form-control" >
                      <option value="1.84">1,84</option>
                    </select>
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Side D - Længde</label>
                    <input id="length_3" class="form-control" type="number" value="" />
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Højde for part E</label>
                    <select id="height_4" class="form-control"  >
                      <option value="1.84">1,84</option>
                    </select>
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Længde for part E</label>
                    <input id="length_4" class="form-control"  type="number" value="" />
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Højde for part F</label>
                    <select id="height_5" class="form-control" >
                      <option value="1.84">1,84</option>
                    </select>
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Længde for part F</label>
                    <input id="length_5" class="form-control"  type="number" value="" />
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Højde for part G</label>
                    <input id="height_6" class="form-control"  type="number" value="" />
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Længde for part G</label>
                    <input id="length_6" class="form-control"  type="number" value="" />
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Højde for part H</label>
                    <input id="height_7" class="form-control"  type="number" value="" />
                    <span>mtr</span> </div>
                  <div class="w-50 ">
                    <label>Længde for part H</label>
                    <input id="length_7" class="form-control"  type="number" value="" />
                    <span>mtr</span> </div>
                </div>
              </div>
            </div>
          </div>
         <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 class="col-4">
      <div class="ccb-list">
        <div class="ccb-list-box">
          <h2>DIT VALG</h2>
          <ul>
            <li class="active-list"><span>1. Serie / Støjhegn</span> <img src="https://kirkedal.de/wp-content/uploads/2021/01/copenhagen-1.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 Støjbatt</span> <img src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
            <li><span>5. Vælg Lameller</span> <img src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
            <li><span>6. Vælg Topskinne</span> <img src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
            <li><span>7. Vælg 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="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 Støjbatt</h2>
          <div class="row vaelg-profil col-md-12  profile_selection_step_wrap">
            <div class="id-box-50 product_item" style=""> <img class="fenceImg cursorpointer" src="https://kirkedal.de/wp-content/uploads/2020/12/stoejbatt_cph.jpg" alt="" title="" width="80%" style="margin: 0 auto; margin-bottom: 4px; width: 65%;">
              <input class="hidFence" type="hidden" value="Copenhagen" />
              <input class="hidColor" type="hidden" value="Black" />
              <p style="text-align:center;">Copenhagen støjbatt</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 / Støjhegn</span> <img src="https://kirkedal.de/wp-content/uploads/2021/01/copenhagen-1.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 Støjbatt</span> <img src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
            <li><span>5. Vælg Lameller</span> <img src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
            <li><span>6. Vælg Topskinne</span> <img src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
            <li><span>7. Vælg 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 Lameller</h2>
          <div class="row vaelg-profil col-md-12 vaelg-top_profil_wrap">
            <div class="col-md-4 product_item"> <img class="cursorpointer fencePostsize wqs_size1 w-100"  src="https://kirkedal.de/wp-content/uploads/2020/04/lameller_cph-300x300.jpg" alt="" title="" style="margin: 0 auto; margin-bottom: 4px;">
              <input class="hidPostsize" type="hidden" value="100x100mm"  />
              <p style="text-align:center;">Copenhagen Galvaniserede lameller</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 / Støjhegn</span> <img src="https://kirkedal.de/wp-content/uploads/2021/01/copenhagen-1.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 Støjbatt</span> <img src="https://kirkedal.de/wp-content/uploads/2021/07/vaelg-profil-1.jpg" alt="" title=""></li>
            <li><span>5. Vælg Lameller</span> <img src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
            <li><span>6. Vælg Topskinne</span> <img src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
            <li><span>7. Vælg 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-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 Topskinne</h2>
          <div class="vaelg-profil col-md-8  row vaelg-top_profil_wrap">
            <div class="col-md-4 product_item"> <img class="w-100 cursorpointer topFence" src="https://kirkedal.de/wp-content/uploads/2020/04/topprofil_cph-300x300.jpg" alt="" title="" style="margin: 0 auto; margin-bottom: 4px;">
              <input class="hidTop" type="hidden" value="K340x120mm">
              <p style="text-align:center;">Copenhagen topskinne</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 / Støjhegn</span> <img src="https://kirkedal.de/wp-content/uploads/2021/01/copenhagen-1.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 Støjbatt</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>5. Vælg Lameller</span> <img src="https://kirkedal.de/wp-content/uploads/2021/07/vaelg-stolpestorrelse2.jpg" alt="" title=""></li>
            <li><span>6. Vælg Topskinne</span> <img src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
            <li><span>7. Vælg 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>
.chekacc input {
					margin-right: 5px;
    width: 20px;
    height: 20px;
   /* display: none;*/
}
       
	   .chekacc {
    text-align: end;
}
</style>
<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="vaelg-tilbehor col-md-12 " style="padding:0">
            <div class="tilbehorr product_item " style="margin: 0 auto; width: 33.33%;"> 
            <div style=" " class="chekacc"><input id="Acc1" style="" name="Acc1" type="checkbox"></div>
            <img class="w-100 cursorpointer fenceAccessories" dataid="acc1" datakey="0" style="cursor: pointer; height: 350px;margin: 0 auto;" src="https://kirkedal.de/wp-content/uploads/2020/06/Kirkedal-Rep-sort-pulverlak.jpg" alt="">
              <input class="hidAccessories" type="hidden" value="acc1">
              <label style="display: block; text-align: center;" for="Acc1">Rep. maling sort. </label>
              <label style="display: block; text-align: center;" for="Acc1">Vælg</label>
              
               <input id="Acc1val" style="width: 130px; height: 40px;margin: auto; display: block;" name="Acc1val" type="number">
            </div>
            <div class="vaelg-tilbehor-3 col-md-8 " style="padding:0"> <p style="text-align: center;margin: 4px 0;opacity: 0.8;padding:0;font-size:14px; 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: 8px 11px 11px 10px;
    width: 140px;
    border-radius: 0px;
    font-weight: 700; font-size: 14px;">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 / Støjhegn</span> <img src="https://kirkedal.de/wp-content/uploads/2021/01/copenhagen-1.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 Støjbatt</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>5. Vælg Lameller</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>6. Vælg Topskinne</span> <img src="https://kirkedal.de/wp-content/uploads/2021/07/vaelg-topprofil.jpg" alt="" title=""></li>
            <li class="Vælgtilbehor"><span>7. Vælg tilbehør</span> <img style="display:none;" 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 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 / Støjhegn</span> <img src="https://kirkedal.de/wp-content/uploads/2021/01/copenhagen-1.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 Støjbatt</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>5. Vælg Lameller</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>6. Vælg Topskinne</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>7. Vælg 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%;
}

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

 tr.frist-tr{
  background-color: #dddddd;
}
</style>
          <div class="total-tab-finel">
      <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 style="display: none;">
          <td data-label="Beskrivelse">Højde<br />
          <span id="length1_sku"></span>
          </td>
          <td data-label="Antal"><input id="length1" style="width: 100px;" name="length1" readonly="readonly" type="hidden" />
            <span id="length1html"></span><br />
            <span id="length1_rate"></span> EUR
            </td>
          
          <td style="text-align: right;" data-label="Total"><span id="length1_total"></span> EUR</td>
        </tr>
        <tr style="display: none;">
          <td data-label="Beskrivelse">Længde<br /><span id="width1_sku"></span></td>
          <td data-label="Antal"><input id="width1" style="width: 100px;" name="width1" readonly="readonly" type="hidden" />
            <span id="width1html"></span><br /><span id="width1_rate"></span> EUR</td>
          
          <td style="text-align: right;" data-label="Total"><span id="width1_total"></span> EUR</td>
        </tr>
        
        
        <tr>
          <td data-label="Beskrivelse">Støjbatt<br /><span id="fence1_sku"></span> </td>
          <td data-label="Antal"><input id="fence1" style="width: 100px;" name="fence1" readonly="readonly" type="hidden" />
            <span id="fence1html"></span> stk. a <span id="gettotal" style="display:none"></span> 
            <script>
                        function printtotal(){
                            document.getElementById( 'gettotal' ).innerHTML = document.getElementById( 'fencetype1' ).value;}

                    </script><br /><span id="fence1_rate"></span> </td>
        
          <td style="text-align: right;" data-label="Total"><span id="fence1_total"></span> </td>
        </tr>
        
        
        <tr>
          <td data-label="Beskrivelse">Topskinne<br /><span id="top1_sku"></span></td>
          <td data-label="Antal"><input id="top1" style="width: 100px;" name="top1" readonly="readonly" type="hidden" />
            <span id="top1html"></span>  stk. a <span id="gettopprofile"></span> 
            <script>
                        function topprofile(){
                            //document.getElementById( 'gettopprofile' ).innerHTML = document.getElementById( 'topprofiletype1' ).value.replace('mm',' mm');
												}

                    </script><br /><span id="top1_rate"></span> </td>
         
          <td style="text-align: right;" data-label="Total"><span id="top1_total"></span> </td>
        </tr>
        <tr>
          <td data-label="Beskrivelse">Start/Slut Stolper<br /><span id="slutstolpe1_sku"></span></td>
          <td data-label="Antal"><input id="slutstolpe1" style="width: 100px;" name="slutstolpe1" readonly="readonly" type="hidden" />
            <span id="slutstolpe1html"></span>  stk. a <span id="getk200aa"></span><br /><span id="slutstolpe1_rate"></span> </td>
         
          <td style="text-align: right;" data-label="Total"><span id="slutstolpe1_total"></span> </td>
        </tr>
        <tr id="postid">
          <td data-label="Beskrivelse">Midtstolpe<br /><span id="post1_sku"></span></td>
          <td data-label="Antal"><input id="post1" style="width: 100px;" name="post1" readonly="readonly" type="hidden" />
            <span id="post1html"></span>  stk. a <span id="getk201aa"></span><br /><span id="post1_rate"></span> </td>
          
          <td style="text-align: right;" data-label="Total"><span id="post1_total"></span> </td>
        </tr>
        <tr>
          <td data-label="Beskrivelse">Lameller<br /><span id="Lameller_sku"></span></td>
          <td data-label="Antal"><input id="Lameller" style="width: 100px;" name="Lameller" readonly="readonly" type="hidden" />
            <span id="Lamellerhtml"></span>  stk. a <span id="getk201ss" style="display:none;">Lameller</span><br /><span id="Lameller_rate"></span> </td>
         
          <td style="text-align: right;" data-label="Total"><span id="Lameller_total"></span> </td>
        </tr>
        <tr>
          <td data-label="Beskrivelse">Hjørnestolpe<br /><span id="stolpe1_sku"></span></td>
          <td data-label="Antal"><input id="stolpe1" style="width: 100px;" name="stolpe1" readonly="readonly" type="hidden" />
            <span id="stolpe1html"></span>  stk. a <span id="getk202" style="display:none;"></span><br /><span id="stolpe1_rate"></span> </td>
          
          <td style="text-align: right;" data-label="Total"><span id="stolpe1_total"></span> </td>
        </tr>
        <tr>
          <td data-label="Beskrivelse">Stolpe 45°<br /><span id="stolpe2_sku"></span></td>
          <td data-label="Antal"><input id="stolpe2" style="width: 100px;" name="stolpe2" readonly="readonly" type="hidden" />
            <span id="stolpe2html"></span>  stk. a K14 <br /><span id="stolpe2_rate"></span> </td>
         
          <td style="text-align: right;" data-label="Total"><span id="stolpe2_total"></span> </td>
        </tr>
        <tr class="wqs_condition" style="display: none;">
          <td data-label="Beskrivelse">Alu Design stolpe<br /><span id="alu_design_stlope_sku"></span></td>
          <td data-label="Antal"><input id="alu_design_stlope" style="width: 100px;" name="alu_design_stlope" readonly="readonly" type="hidden" value="" />
            <span id="alu_design_stlopehtml"></span>  stk. a K100 <br /><span id="alu_design_stlope_rate"></span> </td>
         
          <td style="text-align: right;" data-label="Total"><span id="alu_design_stlope_total"></span> </td>
        </tr>
        <tr>
          <td data-label="Beskrivelse">Alu Design Stolpefod<br /><span id="alu_design_stolpefod_sku"></span></td>
          <td data-label="Antal"><input id="alu_design_stolpefod" style="width: 100px;" name="alu_design_stolpefod" readonly="readonly" type="hidden" />
            <span id="alu_design_stolpefodhtml"></span>  stk. a 120x80x60 mm </td>
          
          <td style="text-align: right;" data-label="Total"><span id="alu_design_stolpefod_total"></span> </td>
        </tr>
        <tr  class="acc1_cnt_hide">
          <td data-label="Beskrivelse">Rep. maling sort.<br /><span id="acc1_cnt_sku"></span> </td>
          <td data-label="Antal"><input id="acc1_cnt" style="width: 100px;" name="acc1_cnt" readonly="readonly" type="hidden" />
            <span id="acc1_cnthtml"></span>  stk. a  <br /><span id="acc1_cnt_rate"></span> </td>
          
          <td style="text-align: right;" data-label="Total"><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 id="acc3_cnt" style="width: 100px;" name="acc3_cnt" readonly="readonly" type="hidden" />
            <span id="acc3_cnthtml"></span>  stk. a 750 ml <br /><span id="acc3_cnt_rate"></span> </td>
         
          <td style="text-align: right;" data-label="Total"><span id="acc3_cnt_total"></span> </td>
        </tr>
        <tr >
          <td style="    font-weight: 800;">Total</td>
          <td colspan="4" style="text-align: right;font-weight: 800;"><input id="total" style="width: 100px;" name="total" readonly="readonly" type="hidden" />
            <span id="total_fix"></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/hegn1.php" method="post" name="form">
      <input type="hidden" name="product_img" id="product_img" value="">
      <input type="hidden" name="form_img" id="form_img" value="">
      <div class="hidden_pdf_data"> </div>
      <!-- <div class="height_with_info">
      </div>-->
      
      <input type="hidden" name="datablade_img1" id="datablade_img1" value="">
      <input type="hidden" name="datablade_link1" id="datablade_link1" value="">
      <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 id="wqs_alu_pro" name="wqs_alu_pro" type="hidden" value="" />
      <input id="wqs_alu_pro_col" name="wqs_alu_pro_col" type="hidden" value="" />
      <input id="wqs_alu_pro_col_count" name="wqs_alu_pro_col_count" type="hidden" value="" />
      <input id="wqs_alu_pro_top" name="wqs_alu_pro_top" type="hidden" value="" />
      <input id="wqs_bundskinne_color" name="wqs_bundskinne_color" type="hidden" value="" />
      <input id="pdfhojde" name="pdfhojde" type="hidden" value="" />
      <input id="pdflangde" name="pdflangde" type="hidden" value="" />
      <input id="pdfprofil" name="pdfprofil" type="hidden" value="" />
      <input id="pdftopprofil" name="pdftopprofil" type="hidden" value="" />
      <input id="pdfstartslut" name="pdfstartslut" type="hidden" value="" />
      <input id="pdfkirkedalstolpe" name="pdfkirkedalstolpe" type="hidden" value="" />
      <input id="pdfhjornestolpe" name="pdfhjornestolpe" type="hidden" value="" />
      <input id="pdfk14stolpe" name="pdfk14stolpe" type="hidden" value="" />
      <input id="pdfstolpetykkelse" name="pdfstolpetykkelse" type="hidden" value="" />
      <input id="pdfskruer" name="pdfskruer" type="hidden" value="" />
      <input id="pdfskrue1" name="pdfskrue1" type="hidden" value="" />
      <input id="pdfendekap" name="pdfendekap" type="hidden" value="" />
      <input id="pdftopklods" name="pdftopklods" type="hidden" value="" />
      <input id="pdfpowersupply" name="pdfpowersupply" type="hidden" value="" />
      <input id="pdfled" name="pdfled" type="hidden" value="" />
      <input id="pdffarve" name="pdffarve" type="hidden" value="" />
      <input id="pdftotal" name="pdftotal" type="hidden" value="" />
      <input id="pdftypeprofil" name="pdftypeprofil" type="hidden" value="" />
      <input id="pdftypetopprofile" name="pdftypetopprofile" type="hidden" value="" />
      <input id="pdftypepostsize" name="pdftypepostsize" type="hidden" value="" />
      <input id="pdftypeendekaptype" name="pdftypeendekaptype" type="hidden" value="" />
      <input id="pdf_acc1_cnt" name="pdf_acc1_cnt" type="hidden" value="" />
      <input id="pdf_acc2_cnt" name="pdf_acc2_cnt" type="hidden" value="" />
      <input id="pdf_acc3_cnt" name="pdf_acc3_cnt" type="hidden" value="" />
      <input id="pdf_acc4_cnt" name="pdf_acc4_cnt" type="hidden" value="" />
      <input id="pdf_lameller_cnt" name="pdf_lameller_cnt" type="hidden" value="" />
      <input id="pdf_profil_color" name="pdf_profil_color" type="hidden" value="" />
      <input id="pdf_topprofil_color" name="pdf_topprofil_color" type="hidden" value="" />
      <input id="pdf_k5_color" name="pdf_k5_color" type="hidden" value="" />
      <input id="pdf_k6_color" name="pdf_k6_color" type="hidden" value="" />
      <input id="pdf_k7_color" name="pdf_k7_color" type="hidden" value="" />
      <input id="pdf_k14_color" name="pdf_k14_color" type="hidden" value="" />
      <input id="pdf_skruer1_color" name="pdf_skruer1_color" type="hidden" value="" />
      <input id="pdf_skruer2_color" name="pdf_skruer2_color" type="hidden" value="" />
      <input id="pdf_endekap_color" name="pdf_endekap_color" type="hidden" value="" />
      <input id="pdf_topklods_color" name="pdf_topklods_color" type="hidden" value="" />
      <input type="hidden" name="pdf_product_id" id="pdf_product_id" value=""/>
      <input type="hidden" name="pdf_topprofil_id" id="pdf_topprofil_id" value=""/>
            <input type="hidden" name="pdf_topklods_id" id="pdf_topklods_id" value=""/>
      <input type="hidden" name="pdf_lameller_id" id="pdf_lameller_id" value=""/>
      <input type="hidden" name="pdf_slutstolpe_id" id="pdf_slutstolpe_id" value=""/>
      <input type="hidden" name="pdf_kirkedalstolpe_id" id="pdf_kirkedalstolpe_id" value=""/>
      <input type="hidden" name="pdf_power_supply_id" id="pdf_power_supply_id" value=""/>
      <input type="hidden" name="pdf_led_id" id="pdf_led_id" value=""/>
            <input type="hidden" name="pdf_skruer1_id" id="pdf_skruer1_id" value=""/>
            <input type="hidden" name="pdf_skruer2_id" id="pdf_skruer2_id" value=""/>
            <input type="hidden" name="pdf_endekap_id" id="pdf_endekap_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="hidden" name="pdf_montageklaeb" id="pdf_montageklaeb" value=""/>
      <input type="hidden" name="pdf_montageklaeb_id" id="pdf_montageklaeb_id" value=""/>
      <input type="hidden" name="pdf_aluStolpefod" id="pdf_aluStolpefod" value=""/>
      <input type="hidden" name="pdf_k200_id" id="pdf_k200_id" value=""/>
      <input type="hidden" name="pdf_k201_id" id="pdf_k201_id" value=""/>
      <input type="hidden" name="pdf_k202_id" id="pdf_k202_id" value=""/>
      <input type="submit" id="print_submit" value="Print/Send beregningen" style="display: none;" onClick="pdf1()" />
      <input type="button" id="add_to_cartt" value="Tilføj indkøbskurven" onclick="add_to_cart()" style="display:none;" />
    </form>
    <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 pdf1(){
            profil_color = jQuery("#profil_color").val().toLowerCase();

              var profils = {
								//    K1s:{product_id:1694,variations:{black:1697,white:1698}},
									//K1s:{product_id:1694,variations:{black:1697}},
									K1s:{product_id:1131,variations:{black:1322}},
									//K1:{product_id:9,variations:{black:19,coffee:20,dark_teak:21,grey:22,light_teak:23,red:24,white:25}},
									K1:{product_id:1122,variations:{black:1307,coffee:20,dark_teak:21,grey:1306,light_teak:23,red:24,white:1305}},
									K2:{product_id:1123,variations:{black:1312,coffee:62,dark_teak:63,grey:1311,light_teak:65,red:66,white:1310}},
									//K3:{product_id:70,variations:{black:71,coffee:72,dark_teak:1049,grey:74,light_teak:75,red:76,white:77}},
									K3:{product_id:70,variations:{coffee:72,dark_teak:1049,grey:74,light_teak:75,red:76,white:77}},
									K4:{product_id:88,variations:{black:90,coffee:91,dark_teak:92,grey:93,light_teak:94,red:95,white:96}},
									//K5:{product_id:118,variations:{black:120,coffee:121,dark_teak:129,grey:123,light_teak:124,red:125,white:126}},
									K5:{product_id:118,variations:{coffee:121,dark_teak:129,grey:123,light_teak:124,red:125,white:126}},
									//K6:{product_id:134,variations:{black:136,coffee:137,dark_teak:138,grey:139,light_teak:140,red:141,white:142}},
									K6:{product_id:134,variations:{coffee:137,dark_teak:138,grey:139,light_teak:140,red:141,white:142}},
									ALU:{product_id:1139,variations:{black:2513,coffee:2514,dark_teak:2519,grey:2515,light_teak:2516,red:2517,white:2518}},
									//K7:{product_id:150,variations:{black:157,coffee:152,dark_teak:153,grey:158,light_teak:154,red:155,white:159}},
									K7:{product_id:150,variations:{coffee:152,dark_teak:153,grey:158,light_teak:154,red:155,white:159}},
									//K14:{product_id:800,variations:{black:801,coffee:802,dark_teak:803,grey:804,light_teak:805,red:806,white:807}},
									K14:{product_id:800,variations:{coffee:802,dark_teak:803,grey:804,light_teak:805,red:806,white:807}},
									//K81:{product_id:160,variations:{black:173,coffee:169,dark_teak:170,grey:174,light_teak:171,red:172,white:175}},
									K81:{product_id:160,variations:{coffee:169,dark_teak:170,grey:174,light_teak:171,red:172,white:175}},
									//K82:{product_id:160,variations:{black:166,coffee:161,dark_teak:163,grey:168,light_teak:164,red:165,white:167}},
									K82:{product_id:160,variations:{coffee:161,dark_teak:163,grey:168,light_teak:164,red:165,white:167}},
									K200:{product_id:1220,variations:{2570:1342,2238:1343,1906:1344}},
									K201:{product_id:1221,variations:{2570:1346,2238:1347,1906:1348}},
									K202:{product_id:1222,variations:{2570:1349,2238:1350,1906:1351}}
								};
                 // var profil_id = profils[jQuery("input#model").val()].product_id;
							    var profil_id = 1292;
                //var profil_variation_id = profils[jQuery("input#model").val()].variations[profil_color];
									var profil_variation_id = '';
                  console.log(profil_variation_id);
                  //alert(profil_variation_id);
                  jQuery("#pdf_product_id").val(profil_id);
									//alert("hello");

                  var top_profil_variation_id = 0;
                  if (jQuery("#top1").val() != 0) {
                      top_profil_id = 1291;
											top_profil_variation_id = '';
                  }
										
                  jQuery("#pdf_topprofil_id").val(top_profil_id);
			            jQuery("#pdf_profil_color").val(jQuery("#profil_color").val());
    							jQuery("#pdf_topprofil_color").val('Black');
                  jQuery("#pdf_k5_color").val('Black');
                  jQuery("#pdf_k6_color").val('Black');
                  jQuery("#pdf_k7_color").val('Black');
                  jQuery("#pdf_k14_color").val('Black');
                  jQuery("#pdf_skruer1_color").val('Black');

                  jQuery("#pdf_skruer2_color").val('Black');
                  jQuery("#pdf_endekap_color").val('Black');
                  jQuery("#pdf_topklods_color").val('Black');

                  if(jQuery('#wqs_control_segment').val()=='set'){
                      jQuery("#wqs_alu_pro").val('set');
                      jQuery("#wqs_alu_pro_col").val(jQuery("#alu_color").val());
                      jQuery("#wqs_bundskinne_color").val(jQuery("#bundskinne_color").val());
                      jQuery("#wqs_alu_pro_top").val(jQuery("#alu_bundskinne").val());
                  }else if(jQuery('#wqs_control_segment').val()=='unset'){
                      jQuery("#wqs_alu_pro").val('unset');
                  }
                      jQuery("#pdf_acc1_cnt").val(jQuery("#acc1_cnt").val());
											jQuery("#pdf_lameller_cnt").val(jQuery("#Lameller").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());
	                    document.getElementById('pdfhojde').value = document.getElementById("length1").value;

                      document.getElementById('pdflangde').value =
                          document.getElementById("width1").value;

                      document.getElementById('pdfprofil').value =
                          document.getElementById("fence1").value;

                      document.getElementById('pdftopprofil').value =
                          document.getElementById("top1").value;

                      document.getElementById('pdfstartslut').value =
                          document.getElementById("slutstolpe1").value;

                      document.getElementById('pdfkirkedalstolpe').value =
                          document.getElementById("post1").value;

                      document.getElementById('pdfhjornestolpe').value =
                          document.getElementById("stolpe1").value;

                      document.getElementById('pdfk14stolpe').value =
                          document.getElementById("stolpe2").value;
                    //document.getElementById('pdffarve').value = document.getElementById("farve1").value;
                      document.getElementById('pdftotal').value =
                          document.getElementById("total").value;

                      document.getElementById( 'pdftypeprofil' ).value =
                          document.getElementById( 'fencetype1' ).value;

                      document.getElementById( 'pdftypetopprofile' ).value =
                          document.getElementById( 'topprofiletype1' ).value;

                      document.getElementById( 'pdftypepostsize' ).value =
                          document.getElementById( 'postsize1' ).value;

                      jQuery('#wqs_alu_pro_col_count').val(jQuery("#alu_design_stlope").val());

                      document.getElementById( 'pdftypeendekaptype' ).value = document.getElementById( 'endekaptype1' ).value;
                  }
		      </script>
    </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>
            </div>
              <p style="text-align: center;margin: 4px 0;opacity: 0.8;padding:0;font-size:14px; margin-top:10px;display:inline-block;">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("li.down-arrow-list").click(function(){

  	jQuery(".all-data-list-finel").toggle();	
  	});
  </script>
  <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="col-8 fullwidth">
      <div class="ccb-text">
        <div class="ccb-text-box d3d-width">
          <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">
            <canvas class="renderCanvas" id="renderCanvas" touch-action="none" style=" width: 100% !important; "></canvas>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <style type="text/css">
  	 .tbl_custom_data span {
    padding: 0 0;
    font-size: 14px;
}
  </style>
  <script>
						 function resizetextbox(){
							jQuery("#tbl_custom_data input").each(function(){
								var txt_val=jQuery(this).val().length;
								//alert(txt_val);
								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();
								nStr=price_valtxt.replace('.',',')
								//jQuery(this).text(price_valtxt.replace('.',','));										
								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;"  cellspacing="0" cellpadding="5" >
    <tr>
      <td style="padding-left: 20px; width: 500px;"><select id="profil_color" style="width: 150px;" name="profil_color1" onChange="set_colors()">
          <option selected="selected" value="Black">Black</option>
          <option value="Grey">Grey</option>
          <option value="White">White</option>
        </select>
        Vælg farve til profil
        <input id="submitBtn1" style="background-color: #51ae51; color: #fffdfd; border-radius: 2px; float: right;" type="button" value="Opdater beregning"></td>
    </tr>
    <tr>
      <td style="padding-left: 20px;"><select style="width: 150px;" name="topprofil_color">
          <option selected="selected" value="Black">Black</option>
        </select>
        Vælg farve til topprofil, stolper og tilbehør </td>
    </tr>
    <tr class="wqs_condition" style="display: none;">
      <td style="padding-left: 20px;"><select id="alu_color" style="width: 150px;" name="alu_color">
          <option value="alu">Alu</option>
          <option selected="selected" value="black">Antrazit/Black</option>
        </select></td>
    </tr>
    <tr class="wqs_condition_2" style="display: none;">
      <td style="padding-left: 20px;"><input id="alu_bundskinne_hidd" name="alu_bundskinne_hidd" type="hidden" value="">
        <select id="bundskinne_color" style="width: 150px;" name="bundskinne_color">
          <option value="alu">Alu</option>
          <option selected="selected" value="black">Antrazit/Black</option>
        </select></td>
    </tr>
  </table>
  <div class="tbl_custom_data" style="display:none">
    <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 style="display: none;">
          <td data-label="Beskrivelse">Højde</td>
          <td data-label="Antal"><input id="length1" style="width: 100px;" name="length1" readonly="readonly" type="hidden" />
            <span id="length1html"></span></td>
          <td data-label="Varenr."><span id="length1_sku"></span></td>
          <td data-label="Pris pr. stk."><span id="length1_rate"></span> </td>
          <td data-label="Total"><span id="length1_total"></span> </td>
        </tr>
        <tr style="display: none;">
          <td data-label="Beskrivelse">Længde</td>
          <td data-label="Antal"><input id="width1" style="width: 100px;" name="width1" readonly="readonly" type="hidden" />
            <span id="width1html"></span></td>
          <td data-label="Varenr."><span id="width1_sku"></span></td>
          <td data-label="Pris pr. stk."><span id="width1_rate"></span> </td>
          <td data-label="Total"><span id="width1_total"></span> </td>
        </tr>
        <tr>
          <td data-label="Beskrivelse">støjbatt </td>
          <td data-label="Antal"><input id="fence1" style="width: 100px;" name="fence1" readonly="readonly" type="hidden" />
            <span id="fence1html"></span> stk. a <span id="gettotal" style="display:none"></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">Topskinne</td>
          <td data-label="Antal"><input id="top1" style="width: 100px;" name="top1" readonly="readonly" type="hidden" />
            <span id="top1html"></span>  stk. a <span id="gettopprofile"></span> 
            <script>
                        function topprofile(){
                            //document.getElementById( 'gettopprofile' ).innerHTML = document.getElementById( 'topprofiletype1' ).value.replace('mm',' mm');
												}

                    </script></td>
          <td data-label="Varenr."><span id="top1_sku"></span></td>
          <td data-label="Pris pr. stk."><span id="top1_rate"></span> </td>
          <td data-label="Total"><span id="top1_total"></span> </td>
        </tr>
        <tr>
          <td data-label="Beskrivelse">Start/Slut Stolper</td>
          <td data-label="Antal"><input id="slutstolpe1" style="width: 100px;" name="slutstolpe1" readonly="readonly" type="hidden" />
            <span id="slutstolpe1html"></span>  stk. a <span id="getk200aa"></span></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 id="postid">
          <td data-label="Beskrivelse">Midtstolpe</td>
          <td data-label="Antal"><input id="post1" style="width: 100px;" name="post1" readonly="readonly" type="hidden" />
            <span id="post1html"></span>  stk. a <span id="getk201aa"></span></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">lameller</td>
          <td data-label="Antal"><input id="Lameller" style="width: 100px;" name="Lameller" readonly="readonly" type="hidden" />
            <span id="Lamellerhtml"></span>  stk. a <span id="getk201ss" style="display:none;">Lameller</span></td>
          <td data-label="Varenr."><span id="Lameller_sku"></span></td>
          <td data-label="Pris pr. stk."><span id="Lameller_rate"></span> </td>
          <td data-label="Total"><span id="Lameller_total"></span> </td>
        </tr>
        <tr>
          <td data-label="Beskrivelse">Hjørnestolpe</td>
          <td data-label="Antal"><input id="stolpe1" style="width: 100px;" name="stolpe1" readonly="readonly" type="hidden" />
            <span id="stolpe1html"></span>  stk. a <span id="getk202" style="display:none;"></span></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">Stolpe 45°</td>
          <td data-label="Antal"><input id="stolpe2" style="width: 100px;" name="stolpe2" readonly="readonly" type="hidden" />
            <span id="stolpe2html"></span>  stk. a K14 </td>
          <td data-label="Varenr."><span id="stolpe2_sku"></span></td>
          <td data-label="Pris pr. stk."><span id="stolpe2_rate"></span> </td>
          <td data-label="Total"><span id="stolpe2_total"></span> </td>
        </tr>
        <tr class="wqs_condition" style="display: none;">
          <td data-label="Beskrivelse">Alu Design stolpe</td>
          <td data-label="Antal"><input id="alu_design_stlope" style="width: 100px;" name="alu_design_stlope" readonly="readonly" type="hidden" value="" />
            <span id="alu_design_stlopehtml"></span>  stk. a K100 </td>
          <td data-label="Varenr."><span id="alu_design_stlope_sku"></span></td>
          <td data-label="Pris pr. stk."><span id="alu_design_stlope_rate"></span> </td>
          <td data-label="Total"><span id="alu_design_stlope_total"></span> </td>
        </tr>
        <tr>
          <td data-label="Beskrivelse">Alu Design Stolpefod</td>
          <td data-label="Antal"><input id="alu_design_stolpefod" style="width: 100px;" name="alu_design_stolpefod" readonly="readonly" type="hidden" />
            <span id="alu_design_stolpefodhtml"></span>  stk. a 120x80x60 mm </td>
          <td data-label="Varenr."><span id="alu_design_stolpefod_sku"></span></td>
          <td data-label="Pris pr. stk."><span id="alu_design_stolpefod_rate"></span> </td>
          <td data-label="Total"><span id="alu_design_stolpefod_total"></span> </td>
        </tr>
        <tr  class="acc1_cnt_hide">
          <td data-label="Beskrivelse">Rep. maling sort. </td>
          <td data-label="Antal"><input id="acc1_cnt" style="width: 100px;" name="acc1_cnt" readonly="readonly" type="hidden" />
            <span id="acc1_cnthtml"></span>  stk. a  </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 id="acc3_cnt" style="width: 100px;" name="acc3_cnt" readonly="readonly" type="hidden" />
            <span id="acc3_cnthtml"></span>  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 style="font-weight: 800;">Total</td>
          <td colspan="4" style="text-align: right;    font-weight: 800;"><input id="total" style="width: 100px;" name="total" readonly="readonly" type="hidden" />
            <span id="total_fix"></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>
    <form id="pdf_print_form" action="/beregner_pdf/pdf/hegn1.php" method="post" name="form">
      <input type="hidden" name="product_img" id="product_img" value="">
      <input type="hidden" name="form_img" id="form_img" value="">
      <div class="hidden_pdf_data"> </div>
      <!-- <div class="height_with_info">
      </div>-->
      
      <input type="hidden" name="datablade_img1" id="datablade_img1" value="">
      <input type="hidden" name="datablade_link1" id="datablade_link1" value="">
      <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 id="wqs_alu_pro" name="wqs_alu_pro" type="hidden" value="" />
      <input id="wqs_alu_pro_col" name="wqs_alu_pro_col" type="hidden" value="" />
      <input id="wqs_alu_pro_col_count" name="wqs_alu_pro_col_count" type="hidden" value="" />
      <input id="wqs_alu_pro_top" name="wqs_alu_pro_top" type="hidden" value="" />
      <input id="wqs_bundskinne_color" name="wqs_bundskinne_color" type="hidden" value="" />
      <input id="pdfhojde" name="pdfhojde" type="hidden" value="" />
      <input id="pdflangde" name="pdflangde" type="hidden" value="" />
      <input id="pdfprofil" name="pdfprofil" type="hidden" value="" />
      <input id="pdftopprofil" name="pdftopprofil" type="hidden" value="" />
      <input id="pdfstartslut" name="pdfstartslut" type="hidden" value="" />
      <input id="pdfkirkedalstolpe" name="pdfkirkedalstolpe" type="hidden" value="" />
      <input id="pdfhjornestolpe" name="pdfhjornestolpe" type="hidden" value="" />
      <input id="pdfk14stolpe" name="pdfk14stolpe" type="hidden" value="" />
      <input id="pdfstolpetykkelse" name="pdfstolpetykkelse" type="hidden" value="" />
      <input id="pdfskruer" name="pdfskruer" type="hidden" value="" />
      <input id="pdfskrue1" name="pdfskrue1" type="hidden" value="" />
      <input id="pdfendekap" name="pdfendekap" type="hidden" value="" />
      <input id="pdftopklods" name="pdftopklods" type="hidden" value="" />
      <input id="pdfpowersupply" name="pdfpowersupply" type="hidden" value="" />
      <input id="pdfled" name="pdfled" type="hidden" value="" />
      <input id="pdffarve" name="pdffarve" type="hidden" value="" />
      <input id="pdftotal" name="pdftotal" type="hidden" value="" />
      <input id="pdftypeprofil" name="pdftypeprofil" type="hidden" value="" />
      <input id="pdftypetopprofile" name="pdftypetopprofile" type="hidden" value="" />
      <input id="pdftypepostsize" name="pdftypepostsize" type="hidden" value="" />
      <input id="pdftypeendekaptype" name="pdftypeendekaptype" type="hidden" value="" />
      <input id="pdf_acc1_cnt" name="pdf_acc1_cnt" type="hidden" value="" />
      <input id="pdf_acc2_cnt" name="pdf_acc2_cnt" type="hidden" value="" />
      <input id="pdf_acc3_cnt" name="pdf_acc3_cnt" type="hidden" value="" />
      <input id="pdf_acc4_cnt" name="pdf_acc4_cnt" type="hidden" value="" />
      <input id="pdf_lameller_cnt" name="pdf_lameller_cnt" type="hidden" value="" />
      <input id="pdf_profil_color" name="pdf_profil_color" type="hidden" value="" />
      <input id="pdf_topprofil_color" name="pdf_topprofil_color" type="hidden" value="" />
      <input id="pdf_k5_color" name="pdf_k5_color" type="hidden" value="" />
      <input id="pdf_k6_color" name="pdf_k6_color" type="hidden" value="" />
      <input id="pdf_k7_color" name="pdf_k7_color" type="hidden" value="" />
      <input id="pdf_k14_color" name="pdf_k14_color" type="hidden" value="" />
      <input id="pdf_skruer1_color" name="pdf_skruer1_color" type="hidden" value="" />
      <input id="pdf_skruer2_color" name="pdf_skruer2_color" type="hidden" value="" />
      <input id="pdf_endekap_color" name="pdf_endekap_color" type="hidden" value="" />
      <input id="pdf_topklods_color" name="pdf_topklods_color" type="hidden" value="" />
      <input type="hidden" name="pdf_product_id" id="pdf_product_id" value=""/>
      <input type="hidden" name="pdf_topprofil_id" id="pdf_topprofil_id" value=""/>
            <input type="hidden" name="pdf_topklods_id" id="pdf_topklods_id" value=""/>
      <input type="hidden" name="pdf_lameller_id" id="pdf_lameller_id" value=""/>
      <input type="hidden" name="pdf_slutstolpe_id" id="pdf_slutstolpe_id" value=""/>
      <input type="hidden" name="pdf_kirkedalstolpe_id" id="pdf_kirkedalstolpe_id" value=""/>
      <input type="hidden" name="pdf_power_supply_id" id="pdf_power_supply_id" value=""/>
      <input type="hidden" name="pdf_led_id" id="pdf_led_id" value=""/>
            <input type="hidden" name="pdf_skruer1_id" id="pdf_skruer1_id" value=""/>
            <input type="hidden" name="pdf_skruer2_id" id="pdf_skruer2_id" value=""/>
            <input type="hidden" name="pdf_endekap_id" id="pdf_endekap_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="hidden" name="pdf_montageklaeb" id="pdf_montageklaeb" value=""/>
      <input type="hidden" name="pdf_montageklaeb_id" id="pdf_montageklaeb_id" value=""/>
      <input type="hidden" name="pdf_aluStolpefod" id="pdf_aluStolpefod" value=""/>
      <input type="hidden" name="pdf_k200_id" id="pdf_k200_id" value=""/>
      <input type="hidden" name="pdf_k201_id" id="pdf_k201_id" value=""/>
      <input type="hidden" name="pdf_k202_id" id="pdf_k202_id" value=""/>
      <input type="submit" id="print_submit" value="Print/Send beregningen" style="display: none;" />
      <input type="button" id="add_to_cartt" value="Tilføj indkøbskurven" onclick="add_to_cart()" style="display:none;" />
    </form>
    <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 pdf1(){
            profil_color = jQuery("#profil_color").val().toLowerCase();

              var profils = {
								//    K1s:{product_id:1694,variations:{black:1697,white:1698}},
									//K1s:{product_id:1694,variations:{black:1697}},
									K1s:{product_id:1131,variations:{black:1322}},
									//K1:{product_id:9,variations:{black:19,coffee:20,dark_teak:21,grey:22,light_teak:23,red:24,white:25}},
									K1:{product_id:1122,variations:{black:1307,coffee:20,dark_teak:21,grey:1306,light_teak:23,red:24,white:1305}},
									K2:{product_id:1123,variations:{black:1312,coffee:62,dark_teak:63,grey:1311,light_teak:65,red:66,white:1310}},
									//K3:{product_id:70,variations:{black:71,coffee:72,dark_teak:1049,grey:74,light_teak:75,red:76,white:77}},
									K3:{product_id:70,variations:{coffee:72,dark_teak:1049,grey:74,light_teak:75,red:76,white:77}},
									K4:{product_id:88,variations:{black:90,coffee:91,dark_teak:92,grey:93,light_teak:94,red:95,white:96}},
									//K5:{product_id:118,variations:{black:120,coffee:121,dark_teak:129,grey:123,light_teak:124,red:125,white:126}},
									K5:{product_id:118,variations:{coffee:121,dark_teak:129,grey:123,light_teak:124,red:125,white:126}},
									//K6:{product_id:134,variations:{black:136,coffee:137,dark_teak:138,grey:139,light_teak:140,red:141,white:142}},
									K6:{product_id:134,variations:{coffee:137,dark_teak:138,grey:139,light_teak:140,red:141,white:142}},
									ALU:{product_id:1139,variations:{black:2513,coffee:2514,dark_teak:2519,grey:2515,light_teak:2516,red:2517,white:2518}},
									//K7:{product_id:150,variations:{black:157,coffee:152,dark_teak:153,grey:158,light_teak:154,red:155,white:159}},
									K7:{product_id:150,variations:{coffee:152,dark_teak:153,grey:158,light_teak:154,red:155,white:159}},
									//K14:{product_id:800,variations:{black:801,coffee:802,dark_teak:803,grey:804,light_teak:805,red:806,white:807}},
									K14:{product_id:800,variations:{coffee:802,dark_teak:803,grey:804,light_teak:805,red:806,white:807}},
									//K81:{product_id:160,variations:{black:173,coffee:169,dark_teak:170,grey:174,light_teak:171,red:172,white:175}},
									K81:{product_id:160,variations:{coffee:169,dark_teak:170,grey:174,light_teak:171,red:172,white:175}},
									//K82:{product_id:160,variations:{black:166,coffee:161,dark_teak:163,grey:168,light_teak:164,red:165,white:167}},
									K82:{product_id:160,variations:{coffee:161,dark_teak:163,grey:168,light_teak:164,red:165,white:167}},
									K200:{product_id:1220,variations:{2570:1342,2238:1343,1906:1344}},
									K201:{product_id:1221,variations:{2570:1346,2238:1347,1906:1348}},
									K202:{product_id:1222,variations:{2570:1349,2238:1350,1906:1351}}
								};
                 // var profil_id = profils[jQuery("input#model").val()].product_id;
							    var profil_id = 1292;
                //var profil_variation_id = profils[jQuery("input#model").val()].variations[profil_color];
									var profil_variation_id = '';
                  console.log(profil_variation_id);
                  //alert(profil_variation_id);
                  jQuery("#pdf_product_id").val(profil_id);
									//alert("hello");

                  var top_profil_variation_id = 0;
                  if (jQuery("#top1").val() != 0) {
                      top_profil_id = 1291;
											top_profil_variation_id = '';
                  }
										
                  jQuery("#pdf_topprofil_id").val(top_profil_id);
			            jQuery("#pdf_profil_color").val(jQuery("#profil_color").val());
    							jQuery("#pdf_topprofil_color").val('Black');
                  jQuery("#pdf_k5_color").val('Black');
                  jQuery("#pdf_k6_color").val('Black');
                  jQuery("#pdf_k7_color").val('Black');
                  jQuery("#pdf_k14_color").val('Black');
                  jQuery("#pdf_skruer1_color").val('Black');

                  jQuery("#pdf_skruer2_color").val('Black');
                  jQuery("#pdf_endekap_color").val('Black');
                  jQuery("#pdf_topklods_color").val('Black');

                  if(jQuery('#wqs_control_segment').val()=='set'){
                      jQuery("#wqs_alu_pro").val('set');
                      jQuery("#wqs_alu_pro_col").val(jQuery("#alu_color").val());
                      jQuery("#wqs_bundskinne_color").val(jQuery("#bundskinne_color").val());
                      jQuery("#wqs_alu_pro_top").val(jQuery("#alu_bundskinne").val());
                  }else if(jQuery('#wqs_control_segment').val()=='unset'){
                      jQuery("#wqs_alu_pro").val('unset');
                  }
                      jQuery("#pdf_acc1_cnt").val(jQuery("#acc1_cnt").val());
											jQuery("#pdf_lameller_cnt").val(jQuery("#Lameller").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());
	                    document.getElementById('pdfhojde').value = document.getElementById("length1").value;

                      document.getElementById('pdflangde').value =
                          document.getElementById("width1").value;

                      document.getElementById('pdfprofil').value =
                          document.getElementById("fence1").value;

                      document.getElementById('pdftopprofil').value =
                          document.getElementById("top1").value;

                      document.getElementById('pdfstartslut').value =
                          document.getElementById("slutstolpe1").value;

                      document.getElementById('pdfkirkedalstolpe').value =
                          document.getElementById("post1").value;

                      document.getElementById('pdfhjornestolpe').value =
                          document.getElementById("stolpe1").value;

                      document.getElementById('pdfk14stolpe').value =
                          document.getElementById("stolpe2").value;
                    //document.getElementById('pdffarve').value = document.getElementById("farve1").value;
                      document.getElementById('pdftotal').value =
                          document.getElementById("total").value;

                      document.getElementById( 'pdftypeprofil' ).value =
                          document.getElementById( 'fencetype1' ).value;

                      document.getElementById( 'pdftypetopprofile' ).value =
                          document.getElementById( 'topprofiletype1' ).value;

                      document.getElementById( 'pdftypepostsize' ).value =
                          document.getElementById( 'postsize1' ).value;

                      jQuery('#wqs_alu_pro_col_count').val(jQuery("#alu_design_stlope").val());

                      document.getElementById( 'pdftypeendekaptype' ).value = document.getElementById( 'endekaptype1' ).value;
                  }
		      </script> 
  </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 src="https://kirkedal.de/wp-content/uploads/2021/07/show-3d.jpg" alt="" title=""> </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 / Støjhegn</span> <img src="https://kirkedal.de/wp-content/uploads/2021/01/copenhagen-1.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 Støjbatt</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>5. Vælg Lameller</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>6. Vælg Topskinne</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>7. Vælg 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="printt">Print/Send beregningen</button>
            <button type="button" id="addtocart" style="display:none;">Tilføj indkøbskurven</button>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<div class="calculator-box calculator-8" style="display:none">
  <div class="calculator-contact-box">
    <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 / Støjhegn</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>
          <th data-label="Varenr."> 1826497</th>
          <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>
          <th data-label="Varenr."> 1826497</th>
          <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>
          <th data-label="Varenr."> 1826497</th>
          <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>
          <th data-label="Varenr."> 1826497</th>
          <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>
          <th data-label="Varenr."> 1826497</th>
          <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>
          <th data-label="Varenr."> 1826497</th>
          <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>
          <th data-label="Varenr."> 1826497</th>
          <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>
<script>
jQuery(document).ready(function(){

	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('.ccb-list-box').find('.sidebar_calc_box1 img').attr('src',vaelgform);
				jQuery('#form_img').val(vaelgform);
				velgformdata_id = jQuery(this).attr('data_id');
				console.log(velgformdata_id);
				row = velgformdata_id;
				row_set = velgformdata_id;
				jQuery(".dimensioner-form .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");		
					}
				else if(velgformdata_id == '5'){
					jQuery(".dimensioner-form #form5_5").show();			
					jQuery(".dimensioner-form #form5_5").addClass("activee");			
					}
				else if(velgformdata_id == '6'){
					jQuery(".dimensioner-form #form6_6").show();			
					jQuery(".dimensioner-form #form6_6").addClass("activee");		
					}
		jQuery('.calculator-box').hide();
		jQuery('.calculator-box.calculator-2').show();
	});

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

		jQuery(".dimensioner-form .activee input[type=number]").each(function() {
				
			jQuery(this).css("border","1px solid #ccc");
			 jQuery(this).css("border","1px solid #ccc");
                  if (jQuery(this).val() == "")
                  {
                      all_inputs_filled = false;
                      jQuery(this).css("border","1px solid red");
                  }
                  else
                  {
                      if (jQuery(this).attr("id").indexOf("height_")>=0) form_heights.push(jQuery(this).val().replace(',','.'));
                      if (jQuery(this).attr("id").indexOf("length_")>=0) form_lengths.push(jQuery(this).val().replace(',','.'));
                  }
					i++;
		});

		jQuery(".dimensioner-form .activee select").each(function(){
        		console.log(jQuery(this).val());
            jQuery(this).css("border","1px solid #ccc");
            if (jQuery(this).val() == "")
            {
              //  all_inputs_filled = false;
                //jQuery(this).css("border","1px solid red");
            }
            else
            {

            if (jQuery(this).attr("id").indexOf("height_")>=0) form_heights.push(jQuery(this).val().replace(',','.'));
              
            }
        });
		
		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_heights, function( key, value ) {
								
									
									
										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_heights);
					jQuery(".sidebar_calc_box2").find('span').attr("form_lengths",form_lengths);
					jQuery(".sidebar_calc_box2").find('span').attr("form_lengthss",form_lengths.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();

    			//Vælgform = jQuery(".dimensioner-form .activee .hidPost").val();
//					console.log(form_heights);
//					console.log(form_lengths);
//					console.log(Vælgform);
//					 jQuery('#post').val(Vælgform);
//					jQuery(".sidebar_calc_box2").find('span').attr("form_heights",form_heights);
//					jQuery(".sidebar_calc_box2").find('span').attr("form_lengths",form_lengths);
//					jQuery(".sidebar_calc_box2").find('span').attr("Vælgform",Vælgform);
//					if (all_inputs_filled)
//          {
//    					jQuery('.calculator-box').hide();
//							jQuery(this).parent('.calculator-box').next('.calculator-box').show();      	
//          }
		
		
	});
	jQuery('.calculator-box.calculator-3 .product_item').click(function(){
			Vælgprofil=jQuery(this).find('img').attr('src');
			hidFence = jQuery(".hidFence").val();
			hidColor = jQuery(".hidColor").val();
			jQuery(".sidebar_calc_box3").find('img').attr('src',Vælgprofil);
			jQuery(".sidebar_calc_box3").find('img').attr('hidFence',hidFence);
			jQuery(".sidebar_calc_box3").find('img').attr('hidColor',hidColor);
			console.log(hidFence);
			console.log(hidColor);
			jQuery(".cal_top_img1_wrap img").attr('src',Vælgprofil);
			jQuery("#product_img").val(Vælgprofil);
			if (hidFence=="K1s") {
        	jQuery("#profil_color").parent('td').hide();
        }
      jQuery('input#model').val(hidFence);

		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');
		 colorval = jQuery(this).find('img').attr('color_val');
		  if( colorval !=""){stolpestorrelse_color =colorval;}
		 hidPostsize = jQuery(this).find('input').val();
		 jQuery('#postsize').val(hidPostsize);
		 jQuery(".sidebar_calc_box4").find('img').attr('src',postsize_img);
		 jQuery(".sidebar_calc_box4").find('img').attr('color_val',colorval);
		 jQuery(".sidebar_calc_box4").find('img').attr('hidPostsize',hidPostsize);
		 jQuery('#getk200' ).text('K5');
    jQuery('#getk201' ).text('K6');
    jQuery('#getk202' ).text('K7');

    jQuery('#pdf_k200_id' ).val('K5');
    jQuery('#pdf_k201_id' ).val('K6');
    jQuery('#pdf_k202_id' ).val('K7');
    var hidLedOptions = '<option value="No">Nej</option><option value="Yes">LED</option>';
		jQuery('#hidLed').html(hidLedOptions);
		jQuery('#Alu_led_80x80').parents("td").hide();
		jQuery('#wqs_control_segment').val('unset');
		jQuery('.wqs_condition').css('display','none');

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

		 topprofil = jQuery(this).find('img').attr('src');
		 hidtop = jQuery(".hidTop").val();
		 console.log(hidtop);
		  jQuery('#topmodel').val(hidtop);
		 jQuery(".sidebar_calc_box5").find('img').attr('src',topprofil);
		 jQuery(".sidebar_calc_box5").find('img').attr('hidtop',hidtop);

		jQuery('.calculator-box').hide();
		jQuery('.calculator-box.calculator-6').show();
	});
	accs ={};
	jQuery('.calculator-box.calculator-6 .product_item input#Acc1val').on("change",function(){
	jQuery("#Acc1").prop("checked");
	acc_val= jQuery(this).val();	
	jQuery(".sidebar_calc_box6").find('img').attr('acc_val',acc_val);
	});
	jQuery('.calculator-box.calculator-6 .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(this).css('border', '1px solid #f4f4f4');
			jQuery(this).find('.chekacc input[type="checkbox"]').prop( "checked", false );
		    accs[acckey] = '';
		  }
		 
		  else {
		    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_box6").find('img').attr('src',accessories);
		//jQuery(".sidebar_calc_box7").find('img').attr('led',magicradio);
		jQuery(".sidebar_calc_box6").find('img').attr('acc',acc);
		jQuery(".sidebar_calc_box6").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();
		
		console.log(jQuery(".magic-radio").val());

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


		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;
                    }
                }
            }
        }

            $("#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("#pdf_print_form").on("submit", function(e){
            if (jQuery("#pdf_product_name").val() == "")
            {
                e.preventDefault();

                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("#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();
        }


			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);

        }

        

		jQuery(".btn_beregn").click(function(){
			jQuery('.all-data-list-finel').hide();
 				    var len=jQuery('input#length').val();
 				    widthT = '';
            var w=widthT;
            var mod=jQuery('input#post').val();
            var tmod=jQuery('input#topmodel').val();
            var pst=jQuery('input#post').val();
            var Vælgprofil=jQuery('input#model').val();
            //var Vælgfarve=jQuery('input#hidColor').val();
            var Vælgfarve='Black';
            var wqs_jprofil_color = jQuery('#profil_color').val();
            var wqs_jalupro_color = jQuery('#alu_color').val();
            var wqs_jbundskinne_color = jQuery('#bundskinne_color').val();
            var Vælgform=jQuery('input#post').val();
            var Vælgtopprofil=jQuery('input#topmodel').val();
            var Vælgstolpe=jQuery('input#postsize').val();
            var Vælgstolpe1=pointCounter;
            var Vælgendekap=jQuery('input#endekap').val();
            var length=jQuery('input#length').val();
            var width=widthT;
            width = jQuery("input#fWidth").val();
            var led=jQuery('#hidLed').val();
            var coord_text = jQuery("#coordinates").text();
            var map_length = 0;
            if (coord_text.length>10 && !jQuery("#switchMap").is(":checked"))
            {
                var str_pos = coord_text.indexOf("Total:");
                if (str_pos>=0)
                {
                    coord_text = coord_text.substring(str_pos+6,coord_text.indexOf("m,"));
                    coord_text = coord_text.replace("m2","");
                    map_length = coord_text.replace(/ /g,"");
                }
            }

            var accessories = [];
            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");
			
			acc_val = jQuery(".sidebar_calc_box6").find('img').attr('acc_val');									
												
				/*for datablade image and link*/
					if(Vælgstolpe == "100x100mm"){
																				
						jQuery("#datablade_link").attr('href','https://kirkedal.de/wp-content/uploads/2016/08/Kirkedal-Datablad-Copenhagen-St%C3%B8jhegn-2.korr_.pdf');	
																				
						jQuery("#datablade_img").attr('src','https://kirkedal.de/wp-content/uploads/2016/08/Kirkedal_Komposit_Hegn.png');
						jQuery("#datablade_img1").val('https://kirkedal.de/wp-content/uploads/2016/08/Kirkedal_Komposit_Hegn.png');
						jQuery("#datablade_link1").val('https://kirkedal.de/wp-content/uploads/2016/08/Kirkedal-Datablad-Copenhagen-St%C3%B8jhegn-2.korr_.pdf');
							
					}else{
						jQuery("#datablade_link").attr('href','https://kirkedal.de/wp-content/uploads/2018/04/TreeTops_Kirkedal-Datablad-ALU-DESIGN.pdf');	
						jQuery("#datablade_img").attr('src','https://kirkedal.de/wp-content/uploads/2016/08/Produktinfo_ALU.png');
						jQuery("#datablade_img1").val('https://kirkedal.de/wp-content/uploads/2016/08/Produktinfo_ALU.png');
						jQuery("#datablade_link1").val('https://kirkedal.de/wp-content/uploads/2018/04/TreeTops_Kirkedal-Datablad-ALU-DESIGN.pdf');
					}
				/**/
				
				
				//for alu led
				if (jQuery("#Alu_led_80x80").is(":checked")) accessories.push("alu_led_80x80");

        var lengths = [];
        jQuery(".dimensioner-form .activee [id*=length_]").each(function()
        {
            lengths.push(jQuery(this).val());
        });
        
        var heights = [];
        jQuery(".dimensioner-form .activee [id*=height_]").each(function()
        {
            heights.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(heights);
				jQuery(".dimensioner-form .activee [id*=height_]").each( function() {
					value = jQuery(this).val();
					if(value !=""){
						//alert(key+'--'+value+'-height:'+lengths[key]);
						height_width_str=height_width_str+'Side '+sideindex[side_cnt]+'-H:'+value+'m - B:'+lengths[side_cnt]+'m<br/>';
						pdf_hidden_data=pdf_hidden_data+'<input type="hidden" name="height_with_data[]" value="Side '+sideindex[side_cnt]+'-H:'+value+'m - B:'+lengths[side_cnt]+'m"/>'
						side_cnt++;
					}
				});
				jQuery('.hidden_pdf_data').html(pdf_hidden_data);
				jQuery('.height_with_info').html(height_width_str);
corners_cnt = 0;
points_cnt = 0;
				switchMap = 'true';
        if (corners_cnt <0) corners_cnt = 0;
        if (points_cnt <0) points_cnt = 0; var dataString='&stolpestorrelse_color='+stolpestorrelse_color+'&wqs_jprofil_color='+wqs_jprofil_color+'&wqs_jalupro_color='+wqs_jalupro_color+'&wqs_jbundskinne_color='+wqs_jbundskinne_color +'&width='+width+'&Vælgprofil='+Vælgprofil+'&Vælgfarve='+Vælgfarve +'&Vælgform='+Vælgform+'&led='+led+'&Vælgtopprofil='+Vælgtopprofil+'&Vælgstolpe='+Vælgstolpe+'&Vælgendekap='+Vælgendekap+ '&switchMap='+switchMap+'&map_length='+map_length+"&corners_cnt="+corners_cnt+"&points_cnt="+points_cnt+"&lengths="+lengths.toString()+"&heights="+heights.toString()+"&form_lengths="+form_lengths.join()+"&form_heights="+form_heights.join(); if (accessories.length>0) dataString += "&accessories="+accessories.toString();
if(acc_val == "")
{
	dataString += "&acc_val=1";
}else{
dataString += "&acc_val="+acc_val;
}
				jQuery(".ajax_loader_wrap").addClass('active');
				
				 jQuery.ajax({

                          type: "POST",
                          dataType: 'json',
                          url:"/wp-content/calculation1_new.php",
                         data: dataString,
                         success: function(msg)
                        {
                       console.log("hello");
												console.log(msg[33][0]);
												
												console.log(msg[33][0]['Profil_rate']);
												jQuery(".ajax_loader_wrap").removeClass('active');
                      /*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);*/
                                                    
                      for(var inc = 0; inc<34; inc++){
													
                        if(msg[inc]<0 && inc != 33){ msg[inc]=0; } }
													console.log(msg[33][0]);
                        jQuery('#length1').val(msg[0]);
                        jQuery('#length1html').html(msg[0]);
                        jQuery('#width1').val(msg[1]);
                        jQuery('#width1html').html(msg[1]);
                        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[33][0]['Profil_rate']));
												jQuery('#fence1_sku').text("DB "+msg[33][0]['Profil_sku']);
												
												jQuery('#fence1_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['Profil_total_rate']));
                        jQuery('#top1').val(msg[3]);
                        jQuery('#top1html').html(msg[3]);
						
												jQuery('#top1_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['Topprofil_rate']));
												jQuery('#top1_sku').text("DB "+msg[33][0]['Topprofil_sku']);
												
												jQuery('#top1_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['Topprofil_total_rate']));
                      if(jQuery('#wqs_control_segment').val()=='set'){
                          jQuery('#post1').val(' ');
                          jQuery('#alu_design_stlope').val(msg[4]);
                          jQuery('#alu_design_stlopehtml').html(msg[4]);
                          jQuery('#postsizetype1').val('80x80mm');
						  
													jQuery('#alu_design_stlope_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['Kirkedal_Stolper_rate']));
													jQuery('#alu_design_stlope_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['Kirkedal_Stolper_total_rate']));
													
													jQuery('#alu_design_stlope_sku').text("DB "+msg[33][0]['Kirkedal_Stolper_sku']);
													
                          }else if(jQuery('#wqs_control_segment').val()=='unset'){
                          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[33][0]['Kirkedal_Stolper_rate']));
													jQuery('#post1_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['Kirkedal_Stolper_total_rate']));
													 
													jQuery('#post1_sku').text("DB "+msg[33][0]['Kirkedal_Stolper_sku']);
													jQuery('#pdf_kirkedalstolpe_id').val(1289);
													
													
													jQuery('#Lameller').val(msg[33][0]['Lameller_cost']);
													jQuery('#Lamellerhtml').html(msg[33][0]['Lameller_cost']);
													
													jQuery('#Lameller_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['Lameller_rate']));
													
													jQuery('#Lameller_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['Lameller_total_rate']));
													jQuery('#Lameller_sku').text("DB "+msg[33][0]['Lameller_sku']);
													
													jQuery('#pdf_lameller_id').val(1293);
													
													
													
													
													
                          jQuery('#alu_design_stlope').val(' ');
                          jQuery('#postsizetype1').val(msg[18]); }
                          jQuery('#led1').val(msg[5]);
						  
													jQuery('#led1_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['led_rate']));
													
													jQuery('#led1_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['led_total_rate']));
													jQuery('#led1_sku').text("DB "+msg[33][0]['led_sku']);
												
                          jQuery('#total').val(msg[6]);
                          jQuery('#total_fix').html(msg[6]);
                          jQuery('#totaltotl').html(msg[6]);
                          jQuery('#totaltotl2').html(msg[6]);
												
                          if(msg[18]=='80x80mm') {
													var showhides = jQuery('#hidLed option:selected').val();
													if(showhides=='LED Alu' ||showhides=='LED Alu Black')
													{
														jQuery("#led1").parents("tr").show();	
													}
													else{
														jQuery("#led1").parents("tr").hide();
													}
                          jQuery("#top1").parents("tr").hide();
                          jQuery("#slutstolpe1").parents("tr").hide();
                          jQuery("#post1").parents("tr").hide();
                          jQuery('#stolpe1').parents("tr").hide();
                          jQuery('#stolpe2').parents("tr").hide();
                          jQuery("#topskruer1").parents("tr").hide();
                          jQuery("#topskruer1").val('');
                          jQuery("#skruer1").parents("tr").hide();
                          jQuery("#skruer1").val("");//Umid
													console.log("hihihihhi");
                          jQuery("#power1").parents("tr").hide();
                                                        
                          //jQuery('#alu_hide_topskruer1').hide();
                          //jQuery('#alu_hide_skruer1').hide();
                          jQuery('#alu_hide_endekap1').hide();
                          jQuery('#alu_hide_topklods1').hide();
                          jQuery(".wqs_condition_2").show();
                          jQuery('#alu_bundskinne').val(msg[12]);
						 
													jQuery('#alu_bundskinne_rate').text( new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['endekap_rate']));
													
													jQuery('#alu_bundskinne_total').text( new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['endekap_total_rate']));
													jQuery('#alu_bundskinne_sku').text("DB "+msg[33][0]['endekap_sku']);
													
                          jQuery('#alu_montageklaeb').val(msg[28]);
						   
													jQuery('#alu_montageklaeb_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['montageklaeb_rate']));
													
													jQuery('#alu_montageklaeb_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['montageklaeb_total_rate']));
													jQuery('#alu_montageklaeb_sku').text("DB "+msg[33][0]['montageklaeb_sku']);
													
													jQuery('#alu_design_stolpefod').parents("tr").show();
												if(msg[31] != 0){
													 jQuery('#alu_design_stolpefod').val(msg[4]);
													 jQuery('#alu_design_stolpefodhtml').html(msg[4]);
													 
													 jQuery('#alu_design_stolpefod_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['alu_design_stolpefod_rate']));
													 
													jQuery('#alu_design_stolpefod_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['alu_design_stolpefod_total_rate']));
													jQuery('#alu_design_stolpefod_sku').text("DB "+msg[33][0]['alu_design_stolpefod_sku']);
													 jQuery('#pdf_aluStolpefod').val(msg[4]);
													}else{
														jQuery('#alu_design_stolpefod').val(msg[31]);
													    jQuery('#pdf_aluStolpefod').val(msg[31]);
													}
											} else if (msg[18]=='2x80x80mm') {
                      	jQuery("#top1").parents("tr").hide();
                      } else
                      {
                          jQuery("#top1").parents("tr").show();
                          jQuery("#slutstolpe1").parents("tr").show();
                          jQuery("#post1").parents("tr").show();
                          jQuery('#stolpe1').parents("tr").show();
                          jQuery('#stolpe2').parents("tr").show();
                          jQuery("#topskruer1").parents("tr").show();
                          jQuery("#skruer1").parents("tr").show();
                          jQuery("#power1").parents("tr").show();
                          jQuery("#led1").parents("tr").show();
                          jQuery('#endekap1').val(msg[12]);
						 
													jQuery('#endekap1_rate').text( new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['endekap_rate']));
													 
													jQuery('#endekap1_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['endekap_total_rate']));
													jQuery('#endekap1_sku').text("DB "+msg[33][0]['endekap_sku']);

                          jQuery('#alu_hide_endekap1').show();
                          jQuery('#alu_hide_topklods1').show();

                          jQuery('#skruer1').val(msg[7]);
						  
													jQuery('#skruer1_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['skruer_rate']));
													
													jQuery('#skruer1_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['skruer_total_rate']));
													jQuery('#skruer1_sku').text("DB "+msg[33][0]['skruer_sku']);
                          jQuery(".wqs_condition_2").hide();
                          jQuery('#alu_bundskinne').val('');
                          jQuery('#alu_montageklaeb').val('');
													
													jQuery('#alu_design_stolpefod').parents("tr").hide();
													jQuery('#pdf_aluStolpefod').val(0);
                            }
                          jQuery('#stolpe1').val(msg[8]);
                           jQuery('#stolpe1html').html(jQuery('#stolpe1').val());
                          
												if(msg[8] == 0 || msg[8] == ""){jQuery('#stolpe1').parents("tr").hide();}else{jQuery('#stolpe1').parents("tr").show()}
												
													jQuery('#stolpe1_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['stolpe90_rate']));
													
													jQuery('#stolpe1_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['stolpe90_total_rate']));
													jQuery('#stolpe1_sku').text("DB "+msg[33][0]['stolpe90_sku']);
												
                                                    jQuery('#slutstolpe1').val(msg[9]);
                                                    jQuery('#slutstolpe1html').html(msg[9]);
												if(msg[9] == 0 || msg[9] == ""){
													jQuery('#slutstolpe1').parents("tr").hide();
													}else{
														jQuery('#slutstolpe1').parents("tr").show();
														jQuery('#pdf_slutstolpe_id').val(1288);
														}
												
													jQuery('#slutstolpe1_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['Start_Slut_Stolper_rate']));
													
													jQuery('#slutstolpe1_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['Start_Slut_Stolper_total_rate']));
													jQuery('#slutstolpe1_sku').text("DB "+msg[33][0]['Start_Slut_Stolper_sku']);
												
                                                    jQuery('#topklods1').val(msg[10]);
												if(msg[10] == 0 || msg[10] == ""){jQuery('#topklods1').parents("tr").hide();}else{jQuery('#topklods1').parents("tr").show()}
												
													jQuery('#topklods1_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['topklods_rate']));
													
													jQuery('#topklods1_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['topklods_total_rate']));
													jQuery('#topklods1_sku').text("DB "+msg[33][0]['topklods_sku']);
												
                          jQuery('#topskruer1').val(msg[11]);
												if(msg[11] == 0 || msg[11] == ""){jQuery('#topskruer1').parents("tr").hide();}else{jQuery('#topskruer1').parents("tr").show()}
												
												jQuery('#topskruer1_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['topskruer_rate']));
												
												jQuery('#topskruer1_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['topskruer_total_rate']));
												jQuery('#topskruer1_sku').text("DB "+msg[33][0]['topskruer_sku']);

                      if(jQuery('#alu_bundskinne_hidd').val()=='set'){
                          //jQuery('#endekap1').val(' ');
                          jQuery('#alu_bundskinne').val(msg[12]); 
											if(msg[12] == 0 || msg[12] == ""){jQuery('#alu_bundskinne').parents("tr").hide();}else{jQuery('#alu_bundskinne').parents("tr").show()}
											
											jQuery('#alu_bundskinne_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['endekap_rate']));
											
											jQuery('#alu_bundskinne_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['endekap_total_rate']));
											jQuery('#alu_bundskinne_sku').text("DB "+msg[33][0]['endekap_sku']);
											
										}															
                        else if(
                            jQuery('#alu_bundskinne_hidd').val()=='unset'){
                            //jQuery('#endekap1').val(msg[12]);
                            jQuery('#alu_bundskinne').val(' ');
                        }
                  if (Vælgendekap == "bundskinne"){
                    jQuery('#alu_bundskinne').val(msg[12]);
									if(msg[12] == 0 || msg[12] == ""){jQuery('#alu_bundskinne').parents("tr").hide();}else{jQuery('#alu_bundskinne').parents("tr").show()}
									
										jQuery('#alu_bundskinne_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['endekap_rate']));
										
										jQuery('#alu_bundskinne_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['endekap_total_rate']));
										jQuery('#alu_bundskinne_sku').text("DB "+msg[33][0]['endekap_sku']);
									}
                                                    jQuery('#power1').val(msg[13]);
								if(msg[13] == 0 || msg[13] == ""){jQuery('#power1').parents("tr").hide();}else{jQuery('#power1').parents("tr").show()}
								
										jQuery('#power1_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['power_rate']));
										
										jQuery('#power1_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['power_total_rate']));
										jQuery('#power1_sku').text("DB "+msg[33][0]['power_sku']);
												
                    jQuery('#fencetype1').val(msg[14]);
								if(msg[14] == 0 || msg[14] == ""){jQuery('#fencetype1').parents("tr").hide();}else{jQuery('#fencetype1').parents("tr").show()}
                    jQuery('#topprofiletype1').val(msg[15]);
								if(msg[15] == 0 || msg[15] == ""){jQuery('#topprofiletype1').parents("tr").hide();}else{jQuery('#topprofiletype1').parents("tr").show()}
                    jQuery('#farve1').val(msg[16]);
								if(msg[16] == 0 || msg[16] == ""){jQuery('#farve1').parents("tr").hide();}else{jQuery('#farve1').parents("tr").show()}
                    jQuery('#postsize1').val(msg[17]);
								if(msg[17] == 0 || msg[17] == ""){jQuery('#postsize1').parents("tr").hide();}else{jQuery('#postsize1').parents("tr").show()}
                    jQuery('#endekaptype1').val(msg[19]);
								if(msg[19] == 0 || msg[19] == ""){jQuery('#endekaptype1').parents("tr").hide();}else{jQuery('#endekaptype1').parents("tr").show()}
                    jQuery('#acc1_cnt').val(msg[20]);
                    jQuery('#acc1_cnthtml').html(msg[20]);

								if(msg[20] == 0 || msg[20] == "" || msg[20] === "undefined"){
								
									jQuery('.acc1_cnt_hide').hide();
									jQuery('#acc1_cnt').parents("tr").hide();
								}else{
									jQuery('#acc1_cnt').parents("tr").show();
								}														
										jQuery('#acc1_cnt_sku').text("DB "+msg[33][0]['acc1_sku']);
										
										jQuery('#acc1_cnt_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[21]));
										
								//if(msg[21] == 0 || msg[21] == ""){jQuery('#acc1_cnt_rate').parents("tr").hide();}else{jQuery('#acc1_cnt_rate').parents(	"tr").show()}
								
								acc1_tot = (msg[20]*msg[21]).toFixed(2);
								jQuery('#acc1_cnt_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(acc1_tot));
								
		                jQuery('#acc2_cnt').val(msg[22]);
								if(msg[22] == 0 || msg[22] == ""){jQuery('#acc2_cnt').parents("tr").hide();}else{jQuery('#acc2_cnt').parents("tr").show()}
                jQuery('#acc3_cnt_rate').text("DB "+msg[33][0]['acc3_sku']);
								jQuery('#acc3_cnt').val(msg[24]);
								jQuery('#acc3_cnthtml').html(msg[24]);
								if(msg[24] == 0 || msg[24] == ""){jQuery('#acc3_cnt').parents("tr").hide();}else{jQuery('#acc3_cnt').parents("tr").show()}
								
								jQuery('#acc3_cnt_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[25]));
								
								acc3_tot = (msg[24]*msg[25]).toFixed(2);
								jQuery('#acc3_cnt_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(acc3_tot));
                jQuery('#acc4_cnt').val(msg[26]);
								if(msg[26] == 0 || msg[26] == ""){jQuery('#acc4_cnt').parents("tr").hide();}else{jQuery('#acc4_cnt').parents("tr").show()}
                var post1 = parseInt(jQuery("#post1").val());
                var stolpe1 = 0;
                var stolpe2=0;
                jQuery("[id*=select_corner]").each(function() {
                    if (jQuery(this).val()=="180") post1++;
                    if (jQuery(this).val()=="90")
                        stolpe1++;
                    if (jQuery(this).val()=="45") stolpe2++; });
                if(jQuery('#wqs_control_segment').val()=='set'){
                    jQuery('#post1').val(''); }
                else if(jQuery('#wqs_control_segment').val()=='unset'){ jQuery('#post1').val(post1); }
                if (switch_map_val == 1)
                jQuery('#stolpe1').val(stolpe1);
              	jQuery('#stolpe2').val(stolpe2);
              	jQuery('#stolpe1html').html(jQuery('#stolpe1').val());
              	jQuery('#stolpe2html').html(stolpe2);
							if(stolpe2 == 0 || stolpe2 == ""){jQuery('#stolpe2').parents("tr").hide();}else{jQuery('#stolpe2').parents("tr").show()}
							if(msg[20] == 0 || msg[20] == ""){
									jQuery('.acc1_cnt_hide').hide();
								}
								if(jQuery("#post1").val() == '0'){
										jQuery("#postid").hide();
								}
								
									jQuery('#stolpe2_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['stolpe45_rate']));
									
									jQuery('#stolpe2_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['stolpe45_total_rate']));
 									jQuery('#stolpe2_sku').text("DB "+msg[33][0]['stolpe45_sku']);
                  printtotal();
                  topprofile();
                  postsize();
                  endekaptype();
                  pdf1();
                  remove_zeroes();
									resizetextbox();
									jQuery('.calculator-box').hide();
									jQuery('.calculator-box.calculator-7').show();
									
									
									/*3d code*/
									  fencerowh = jQuery("#fencetype").val();
									  if(fencerowh == ''){
				  	  		vælgform= jQuery(".sidebar_calc_box3").find('img').attr('hidcolor');
				  	  		myJsonString={};
							var cnt_main=0;
			  	  		jQuery.each(msg[34],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(myJsonString);
				  	  	}else{
										//fencetypee = jQuery("#fencetype").val();
										//console.log(JSON.parse(fencetypee));
			
									}
									console.log("16msg="+msg[16]);
               msg[16]='Black';
			   if(msg[16] == 'grey'){
				  	  		jQuery('.custom_glb_type').val('gray');
				  	  		//myJsonString = {};
				  	  		
				  	  	jQuery.each(msg[34],function(index,value){
				  		
				  	  			if(row_set == '1'){
	                        			jQuery("#instanceCounti").val(value.length);
	                            		jQuery("#instanceCountl").val('0');
	                            		jQuery("#instanceCountu").val('0');
	                            		jQuery("#squere").val('0');
	                            		
	                            		//row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1 (1).glb";
	                            		row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil__SilverStolpe/round_I_GLB_silver_grey_v05_"+ value.heights +".glb";
	                            		if(value.heights > 13){
	                            			row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil__SilverStolpe/round_I_GLB_silver_grey_v05_13.glb";
	                            		}
	                            		row_url_2 = '';
	                            		row_url_3 = '';
	                            		row_url_4 = '';

                            		}
								else if(row_set == '2'){

	                            		jQuery("#instanceCountu").val('0');
	                            		jQuery("#squere").val('0');
                            			if(index == '0'){
	                            		jQuery("#instanceCounti").val(value.length);
	                            		//row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1 (1).glb";
	                            		row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil__SilverStolpe/round_I_GLB_silver_grey_v05_"+ value.heights +".glb";
	                            		if(value.heights > 13){
	                            			row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil__SilverStolpe/round_I_GLB_silver_grey_v05_13.glb";
	                            		}
	                            	}else if(index == '1'){
	                            		jQuery("#instanceCountl").val(value.length);
	                            		//row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1 (1).glb";
	                            		row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil__SilverStolpe/round_I_GLB_silver_grey_v05_"+ value.heights +".glb";
	                            		if(value.heights > 13){
	                            			row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil__SilverStolpe/round_I_GLB_silver_grey_v05_13.glb";
	                            		}
                            		}
	                            		jQuery("#instanceCountu").val('0');
	                            		row_url_3 = '';
                            		}
								else if(row_set == '3'){
                            			jQuery("#instanceCountu").val('0');
	                            		
                            			if(index == '0'){
                            			jQuery("#instanceCounti").val(value.length);
                            			//row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
	                            		row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil__SilverStolpe/round_I_GLB_silver_grey_v05_"+ value.heights +".glb";
	                            		if(value.heights > 13){
	                            			row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil__SilverStolpe/round_I_GLB_silver_grey_v05_13.glb";
	                            		}
                            			}else if(index == '1'){
	                            		jQuery("#instanceCountl").val(value.length);
	                            		//row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_11.glb";
	                            		row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil__SilverStolpe/round_I_GLB_silver_grey_v05_"+ value.heights +".glb";

	                            		if(value.heights > 13){
	                            			
	                            			row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil__SilverStolpe/round_I_GLB_silver_grey_v05_13.glb";
	                            		}
                            			}else if(index == '2'){

	                            		jQuery("#instanceCountu").val(value.length);
	                            		//row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
	                            		row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil__SilverStolpe/round_I_GLB_silver_grey_v05_"+ value.heights +".glb";
	                            		if(value.heights > 13){
	                            			row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil__SilverStolpe/round_I_GLB_silver_grey_v05_13.glb";
	                            		}
                            			}
	                            		
                            		}
								else if(row_set == '4'){
                            			if(index == '0'){
                            			jQuery("#instanceCounti").val(value.length);
                            			//row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
	                            		row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil__SilverStolpe/round_I_GLB_silver_grey_v05_"+ value.heights +".glb";
		                            		if(value.heights > 13){
		                            			row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil__SilverStolpe/round_I_GLB_silver_grey_v05_13.glb";
		                            		}
                            			}else if(index == '1'){
	                            		jQuery("#instanceCountl").val(value.length);
	                            		//row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
	                            		row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil__SilverStolpe/round_I_GLB_silver_grey_v05_"+ value.heights +".glb";

	                            		if(value.heights > 13){
	                            			row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil__SilverStolpe/round_I_GLB_silver_grey_v05_13.glb";
	                            		}
                            			}else if(index == '2'){

	                            		jQuery("#instanceCountu").val(value.length);
	                            		//row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
	                            		row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil__SilverStolpe/round_I_GLB_silver_grey_v05_"+ value.heights +".glb";
	                            		if(value.heights > 13){
	                            			row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil__SilverStolpe/round_I_GLB_silver_grey_v05_13.glb";
	                            		}
                            			}else if(index == '3'){
                            				jQuery("#squere").val(value.length);
	                            		row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil__SilverStolpe/round_I_GLB_silver_grey_v05_"+ value.heights +".glb";
	                            		//row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
	                            		if(value.heights > 13){
	                            			row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil__SilverStolpe/round_I_GLB_silver_grey_v05_13.glb";
	                            		}
                            			}
                            		}
				  	  });

				  	  }else if(msg[16] == 'alublack'){
				  	  	jQuery('.custom_glb_type').val('black');
				  	  	jQuery.each(msg[34],function(index,value){
				  	  	console.log(value);
				  	  			if(row_set == '1'){
	                        			jQuery("#instanceCounti").val(value.length);
	                            		jQuery("#instanceCountl").val('0');
	                            		jQuery("#instanceCountu").val('0');
	                            		jQuery("#squere").val('0');
	                            		
	                            		//row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1 (1).glb";
	                            		row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_SilverStolpe/blackwood_round_silver_I_GLB_V05_"+ value.heights +".glb";
	                            		if(value.heights > 13){
	                            			row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_SilverStolpe/blackwood_round_silver_I_GLB_V05_13.glb";
	                            		}
	                            		row_url_2 = '';
	                            		row_url_3 = '';
	                            		row_url_4 = '';

                            		}else if(row_set == '2'){

	                            		jQuery("#instanceCountu").val('0');
	                            		jQuery("#squere").val('0');
                            			if(index == '0'){
	                            		jQuery("#instanceCounti").val(value.length);
	                            		//row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1 (1).glb";
	                            		row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_SilverStolpe/blackwood_round_silver_I_GLB_V05_"+ value.heights +".glb";
	                            		if(value.heights > 13){
	                            			row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_SilverStolpe/blackwood_round_silver_I_GLB_V05_13.glb";
	                            		}
	                            		}else if(index == '1'){
	                            		jQuery("#instanceCountl").val(value.length);
	                            		//row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1 (1).glb";
	                            		row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_SilverStolpe/blackwood_round_silver_I_GLB_V05_"+ value.heights +".glb";
	                            		if(value.heights > 13){
	                            			row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_SilverStolpe/blackwood_round_silver_I_GLB_V05_13.glb";
	                            		}
                            			}
	                            		jQuery("#instanceCountu").val('0');
	                            		row_url_3 = '';
                            		}else if(row_set == '3'){
                            			jQuery("#instanceCountu").val('0');
	                            		
                            			if(index == '0'){
                            			jQuery("#instanceCounti").val(value.length);
                            			//row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
	                            		row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_SilverStolpe/blackwood_round_silver_I_GLB_V05_"+ value.heights +".glb";
	                            		if(value.heights > 13){
	                            			row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_SilverStolpe/blackwood_round_silver_I_GLB_V05_13.glb";
	                            		}
                            			}else if(index == '1'){
	                            		jQuery("#instanceCountl").val(value.length);
	                            		//row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_11.glb";
	                            		row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_SilverStolpe/blackwood_round_silver_I_GLB_V05_"+ value.heights +".glb";

	                            		if(value.heights > 13){
	                            			
	                            			row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_SilverStolpe/blackwood_round_silver_I_GLB_V05_13.glb";
	                            		}
                            			}else if(index == '2'){

	                            		jQuery("#instanceCountu").val(value.length);
	                            		//row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
	                            		row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_SilverStolpe/blackwood_round_silver_I_GLB_V05_"+ value.heights +".glb";
	                            		if(value.heights > 13){
	                            			row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_SilverStolpe/blackwood_round_silver_I_GLB_V05_13.glb";
	                            		}
                            			}
	                            		
                            		}else if(row_set == '4'){
                            			if(index == '0'){
                            			jQuery("#instanceCounti").val(value.length);
                            			//row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
	                            		row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_SilverStolpe/blackwood_round_silver_I_GLB_V05_"+ value.heights +".glb";
		                            		if(value.heights > 13){
		                            			row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_SilverStolpe/blackwood_round_silver_I_GLB_V05_13.glb";
		                            		}
                            			}else if(index == '1'){
	                            		jQuery("#instanceCountl").val(value.length);
	                            		//row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
	                            		row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_SilverStolpe/blackwood_round_silver_I_GLB_V05_"+ value.heights +".glb";

	                            		if(value.heights > 13){
	                            			row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_SilverStolpe/blackwood_round_silver_I_GLB_V05_13.glb";
	                            		}
                            			}else if(index == '2'){

	                            		jQuery("#instanceCountu").val(value.length);
	                            		//row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
	                            		row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_SilverStolpe/blackwood_round_silver_I_GLB_V05_"+ value.heights +".glb";
	                            		if(value.heights > 13){
	                            			row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_SilverStolpe/blackwood_round_silver_I_GLB_V05_13.glb";
	                            		}
                            			}else if(index == '3'){
                            				jQuery("#squere").val(value.length);
	                            		row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_SilverStolpe/blackwood_round_silver_I_GLB_V05_"+ value.heights +".glb";
	                            		//row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
	                            		if(value.heights > 13){
	                            			row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_SilverStolpe/blackwood_round_silver_I_GLB_V05_13.glb";
	                            		}
                            			}
                            		}
				  	  });

			  	  }
				  		else if(msg[16] == 'greyblack'){
			  	  	 	jQuery('.custom_glb_type').val('gray');
			  	  	jQuery.each(msg[34],function(index,value){
			  	  		if(row_set == '1'){
	                        			jQuery("#instanceCounti").val(value.length);
	                            		jQuery("#instanceCountl").val('0');
	                            		jQuery("#instanceCountu").val('0');
	                            		jQuery("#squere").val('0');
	                            		
	                            		//row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1 (1).glb";
	                            		row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil_BlackStolpe/round_I_GLB_black_grey_v05_"+ value.heights +".glb";
	                            		if(value.heights > 13){
	                            			row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil_BlackStolpe/round_I_GLB_black_grey_v05_13.glb";
	                            		}
	                            		row_url_2 = '';
	                            		row_url_3 = '';
	                            		row_url_4 = '';

                            		}else if(row_set == '2'){

	                            		jQuery("#instanceCountu").val('0');
	                            		jQuery("#squere").val('0');
                            			if(index == '0'){
	                            		jQuery("#instanceCounti").val(value.length);
	                            		//row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1 (1).glb";
	                            		row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil_BlackStolpe/round_I_GLB_black_grey_v05_"+ value.heights +".glb";
	                            		if(value.heights > 13){
	                            			row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil_BlackStolpe/round_I_GLB_black_grey_v05_13.glb";
	                            		}
	                            		}else if(index == '1'){
	                            		jQuery("#instanceCountl").val(value.length);
	                            		//row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1 (1).glb";
	                            		row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil_BlackStolpe/round_I_GLB_black_grey_v05_"+ value.heights +".glb";
	                            		if(value.heights > 13){
	                            			row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil_BlackStolpe/round_I_GLB_black_grey_v05_13.glb";
	                            		}
                            			}
	                            		jQuery("#instanceCountu").val('0');
	                            		row_url_3 = '';
                            		}else if(row_set == '3'){
                            			jQuery("#instanceCountu").val('0');
	                            		
                            			if(index == '0'){
                            			jQuery("#instanceCounti").val(value.length);
                            			//row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
	                            		row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil_BlackStolpe/round_I_GLB_black_grey_v05_"+ value.heights +".glb";
	                            		if(value.heights > 13){
	                            			row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil_BlackStolpe/round_I_GLB_black_grey_v05_13.glb";
	                            		}
                            			}else if(index == '1'){
	                            		jQuery("#instanceCountl").val(value.length);
	                            		//row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_11.glb";
	                            		row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil_BlackStolpe/round_I_GLB_black_grey_v05_"+ value.heights +".glb";

	                            		if(value.heights > 13){
	                            			
	                            			row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil_BlackStolpe/round_I_GLB_black_grey_v05_13.glb";
	                            		}
                            			}else if(index == '2'){

	                            		jQuery("#instanceCountu").val(value.length);
	                            		//row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
	                            		row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil_BlackStolpe/round_I_GLB_black_grey_v05_"+ value.heights +".glb";
	                            		if(value.heights > 13){
	                            			row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil_BlackStolpe/round_I_GLB_black_grey_v05_13.glb";
	                            		}
                            			}
	                            		
                            		}else if(row_set == '4'){
                            			if(index == '0'){
                            			jQuery("#instanceCounti").val(value.length);
                            			//row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
	                            		row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil_BlackStolpe/round_I_GLB_black_grey_v05_"+ value.heights +".glb";
		                            		if(value.heights > 13){
		                            			row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil_BlackStolpe/round_I_GLB_black_grey_v05_13.glb";
		                            		}
                            			}else if(index == '1'){
	                            		jQuery("#instanceCountl").val(value.length);
	                            		//row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
	                            		row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil_BlackStolpe/round_I_GLB_black_grey_v05_"+ value.heights +".glb";

	                            		if(value.heights > 13){
	                            			row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil_BlackStolpe/round_I_GLB_black_grey_v05_13.glb";
	                            		}
                            			}else if(index == '2'){

	                            		jQuery("#instanceCountu").val(value.length);
	                            		//row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
	                            		row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil_BlackStolpe/round_I_GLB_black_grey_v05_"+ value.heights +".glb";
	                            		if(value.heights > 13){
	                            			row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil_BlackStolpe/round_I_GLB_black_grey_v05_13.glb";
	                            		}
                            			}else if(index == '3'){
                            				jQuery("#squere").val(value.length);
	                            		row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil_BlackStolpe/round_I_GLB_black_grey_v05_"+ value.heights +".glb";
	                            		//row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
	                            		if(value.heights > 13){
	                            			row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil_BlackStolpe/round_I_GLB_black_grey_v05_13.glb";
	                            		}
                            			}
                            		}

			  	  	});
			  	  }
				       else if(msg[16] == 'Black'){
			  	  		jQuery('.custom_glb_type').val('black');
				  	  	jQuery.each(msg[34],function(index,value){
				  	  	console.log("hii"+value);
				  	  			if(row_set == '1'){
	                        			jQuery("#instanceCounti").val(value.length);
	                            		jQuery("#instanceCountl").val('0');
	                            		jQuery("#instanceCountu").val('0');
	                            		jQuery("#squere").val('0');
	                            		
	                            		//row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1 (1).glb";
	                            		row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe/blackwood_round_black_I_GLB_V05_"+ value.heights +".glb";
	                            		if(value.heights > 13){
	                            			row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe1/copenhagen.glb";
											//row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/copenhagen/copenhagen.glb";
											
	                            		}
	                            		row_url_2 = '';
	                            		row_url_3 = '';
	                            		row_url_4 = '';

                            		}else if(row_set == '2'){

	                            		jQuery("#instanceCountu").val('0');
	                            		jQuery("#squere").val('0');
                            			if(index == '0'){
	                            		jQuery("#instanceCounti").val(value.length);
	                            		//row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1 (1).glb";
	                            		row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe/blackwood_round_black_I_GLB_V05_"+ value.heights +".glb";
	                            		if(value.heights > 13){
	                            			row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe1/copenhagen.glb";
											//row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/copenhagen/copenhagen.glb";
	                            		}
	                            	}else if(index == '1'){
	                            		jQuery("#instanceCountl").val(value.length);
	                            		//row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1 (1).glb";
	                            		row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe/blackwood_round_black_I_GLB_V05_"+ value.heights +".glb";
	                            		if(value.heights > 13){
	                            			row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe1/copenhagen.glb";
											//row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/copenhagen/copenhagen.glb";
	                            		}
                            		}
	                            		jQuery("#instanceCountu").val('0');
	                            		row_url_3 = '';
                            		}else if(row_set == '3'){
                            			jQuery("#instanceCountu").val('0');
	                            		
                            			if(index == '0'){
                            			jQuery("#instanceCounti").val(value.length);
                            			//row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
	                            		row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe/blackwood_round_black_I_GLB_V05_"+ value.heights +".glb";
	                            		if(value.heights > 13){
	                            			row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe1/copenhagen.glb";
											//row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/copenhagen/copenhagen.glb";
	                            		}
                            			}else if(index == '1'){
	                            		jQuery("#instanceCountl").val(value.length);
	                            		//row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_11.glb";
	                            		row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe/blackwood_round_black_I_GLB_V05_"+ value.heights +".glb";

	                            		if(value.heights > 13){
	                            			
	                            			row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe1/copenhagen.glb";
											//row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/copenhagen/copenhagen.glb";
	                            		}
										
                            			}else if(index == '2'){

	                            		jQuery("#instanceCountu").val(value.length);
	                            		//row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
	                            		row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe/blackwood_round_black_I_GLB_V05_"+ value.heights +".glb";
	                            		if(value.heights > 13){
	                            			row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe1/copenhagen.glb";
											//row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/copenhagen/copenhagen.glb";
	                            		}
                            			}
	                            		
                            		}else if(row_set == '4'){
                            			if(index == '0'){
                            			jQuery("#instanceCounti").val(value.length);
                            			//row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
	                            		row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe/blackwood_round_black_I_GLB_V05_"+ value.heights +".glb";
		                            		if(value.heights > 13){
		                            			row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe1/copenhagen.glb";
												//row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/copenhagen/copenhagen.glb";
		                            		}
                            			}else if(index == '1'){
	                            		jQuery("#instanceCountl").val(value.length);
	                            		//row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
	                            		row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe/blackwood_round_black_I_GLB_V05_"+ value.heights +".glb";

	                            		if(value.heights > 13){
	                            			row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe1/copenhagen.glb";
											//row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/copenhagen/copenhagen.glb";
	                            		}
                            			}else if(index == '2'){

	                            		jQuery("#instanceCountu").val(value.length);
	                            		//row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
	                            		row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe/blackwood_round_black_I_GLB_V05_"+ value.heights +".glb";
	                            		if(value.heights > 13){
	                            			row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe1/copenhagen.glb";
											//row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/copenhagen/copenhagen.glb";
	                            		}
                            			}else if(index == '3'){
                            				jQuery("#squere").val(value.length);
	                            		row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe/blackwood_round_black_I_GLB_V05_"+ value.heights +".glb";
	                            		//row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
	                            		if(value.heights > 13){
	                            			row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe1/copenhagen.glb";
											//row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/copenhagen/copenhagen.glb";
	                            		}
                            			}
                            		}
				  	  });

				  	  }
				  	  fencerowheight = jQuery("#fencetype").val();
				  	  if(fencerowheight != ''){
				   		 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('.active-list.sidebar_calc_box2').click(function(){
		jQuery('.calculator-box').hide();jQuery('.calculator-box.calculator-2').show();
	});
	jQuery('.active-list.sidebar_calc_box3').click(function(){
		jQuery('.calculator-box').hide();jQuery('.calculator-box.calculator-3').show();
	});
	jQuery('.active-list.sidebar_calc_box4').click(function(){
		jQuery('.calculator-box').hide();jQuery('.calculator-box.calculator-4').show();
	});
	jQuery('.active-list.sidebar_calc_box5').click(function(){
		jQuery('.calculator-box').hide();jQuery('.calculator-box.calculator-5').show();
	});
	jQuery('.active-list.sidebar_calc_box6').click(function(){
		jQuery('.calculator-box').hide();jQuery('.calculator-box.calculator-6').show();
	});
	jQuery('.active-list.sidebar_calc_box7').click(function(){
		jQuery('.calculator-box').hide();jQuery('.calculator-box.calculator-7').show();
	});
	
	
	
});






 function add_to_cart()
        {
            var profil_color = "";
            var topprofil_color = "";
            var k5_color = "";
            var k6_color = "";
            var k7_color = "";
            var k14_color = "";
            var alu_product1 = "";
            var alu_product2 = "";

            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('#wqs_control_segment').val()=='set'){
                if (jQuery("#alu_color").val() == "" || jQuery("#alu_color").val() == 'undefined')
                {
                    alert("Please select color");
                    jQuery("#alu_color").focus();
                    return false;
                }
            }else if(jQuery('#wqs_control_segment').val()=='unset'){
                if (jQuery("#k6_color").val() == "" || jQuery("#k6_color").val() == 'undefined')
                {
                    alert("Please select color");
                    jQuery("#k6_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;
            }
            profil_color = jQuery("#profil_color").val();
			
            topprofil_color = jQuery("#topprofil_color").val();
            k5_color = jQuery("#k5_color").val();

            if(jQuery('#wqs_control_segment').val()=='set'){
                alu_product1 = jQuery("#alu_color").val();
            }else if(jQuery('#wqs_control_segment').val()=='unset'){
                k6_color = jQuery("#k6_color").val();
            }

            k7_color = jQuery("#k7_color").val();
            k14_color = jQuery("#k14_color").val();
            skruer1_color = jQuery("#skruer1_color").val();
            skruer2_color = jQuery("#skruer2_color").val();
            endekap_color = jQuery("#endekap_color").val();
            topklods_color = jQuery("#topklods_color").val();
            k200_id = jQuery("#pdf_k200_id").val();
            //alert(k200_id);
            var profils = {
            //    K1s:{product_id:1694,variations:{black:1697,white:1698}},
				//K1s:{product_id:1694,variations:{black:1697}},
				K1s:{product_id:1131,variations:{black:1322}},
                //K1:{product_id:9,variations:{black:19,coffee:20,dark_teak:21,grey:22,light_teak:23,red:24,white:25}},
				K1:{product_id:1122,variations:{black:1307,coffee:20,dark_teak:21,grey:1306,light_teak:23,red:24,white:1305}},
                K2:{product_id:1123,variations:{black:1312,coffee:62,dark_teak:63,grey:1311,light_teak:65,red:66,white:1310}},
               // K3:{product_id:70,variations:{black:71,coffee:72,dark_teak:1049,grey:74,light_teak:75,red:76,white:77}},
			    K3:{product_id:70,variations:{coffee:72,dark_teak:1049,grey:74,light_teak:75,red:76,white:77}},
                K4:{product_id:88,variations:{black:90,coffee:91,dark_teak:92,grey:93,light_teak:94,red:95,white:96}},
                //K5:{product_id:118,variations:{black:120,coffee:121,dark_teak:129,grey:123,light_teak:124,red:125,white:126}},
				K5:{product_id:118,variations:{coffee:121,dark_teak:129,grey:123,light_teak:124,red:125,white:126}},
                //K6:{product_id:134,variations:{black:136,coffee:137,dark_teak:138,grey:139,light_teak:140,red:141,white:142}},
				K6:{product_id:134,variations:{coffee:137,dark_teak:138,grey:139,light_teak:140,red:141,white:142}},
                ALU:{product_id:2391,variations:{black:2513,coffee:2514,dark_teak:2519,grey:2515,light_teak:2516,red:2517,white:2518}},
                //K7:{product_id:150,variations:{black:157,coffee:152,dark_teak:153,grey:158,light_teak:154,red:155,white:159}},
				K7:{product_id:150,variations:{coffee:152,dark_teak:153,grey:158,light_teak:154,red:155,white:159}},
                //K14:{product_id:800,variations:{black:801,coffee:802,dark_teak:803,grey:804,light_teak:805,red:806,white:807}},
				K14:{product_id:800,variations:{coffee:802,dark_teak:803,grey:804,light_teak:805,red:806,white:807}},
                //K81:{product_id:160,variations:{black:173,coffee:169,dark_teak:170,grey:174,light_teak:171,red:172,white:175}},
				K81:{product_id:160,variations:{coffee:169,dark_teak:170,grey:174,light_teak:171,red:172,white:175}},
                //K82:{product_id:160,variations:{black:166,coffee:161,dark_teak:163,grey:168,light_teak:164,red:165,white:167}},
				K82:{product_id:160,variations:{coffee:161,dark_teak:163,grey:168,light_teak:164,red:165,white:167}},
                K200:{product_id:1220,variations:{2570:1342,2238:1343,1906:1344}},
                K201:{product_id:1221,variations:{2570:1346,2238:1347,1906:1348}},
                K202:{product_id:1222,variations:{2570:1349,2238:1350,1906:1351}}
            };
           // var profil_id = profils[jQuery("input#model").val()].product_id;
			 var profil_id = 1292;
            //var profil_variation_id = profils[jQuery("input#model").val()].variations[jQuery("#farve1").val().toLowerCase().replace(" ","_")];
            //var profil_variation_id = profils[jQuery("input#model").val()].variations[profil_color];
			var profil_variation_id = '';
            var top_profil_id = 0;
            var top_profil_variation_id = 0;
            if (jQuery("#top1").val() != 0) {
                //top_profil_id = profils[jQuery("input#topmodel").val().replace("40x120mm", "")].product_id;
				top_profil_id = 1291;
                top_profil_variation_id = '';
            }
            var start_slut_id = start_slut_variation_id = 0;
			start_slut_id = 1288;
                start_slut_variation_id = '';
            /*if (k200_id=='K200') {
                start_slut_id = profils["K200"].product_id;
                start_slut_variation_id = profils["K200"].variations[2570];
            } else {
                start_slut_id = profils["K5"].product_id;
                start_slut_variation_id = profils["K5"].variations[k5_color];
            }*/

            if(jQuery('#wqs_control_segment').val()=='set'){
                var kirkedal_id = profils["ALU"].product_id;
                //var kirkedal_variation_id = profils["K6"].variations[jQuery("#farve1").val().toLowerCase().replace(" ","_")];
                var kirkedal_variation_id = profils["ALU"].variations[alu_product1];
            }else if(jQuery('#wqs_control_segment').val()=='unset'){
                var kirkedal_id = kirkedal_variation_id = 0;

                if (k200_id=='K200') {
                    kirkedal_id = profils["K201"].product_id;
                    kirkedal_variation_id = profils["K201"].variations[2570];
                } else {
                    kirkedal_id = profils["K6"].product_id;
                    //var kirkedal_variation_id = profils["K6"].variations[jQuery("#farve1").val().toLowerCase().replace(" ","_")];
                    kirkedal_variation_id = profils["K6"].variations[k6_color];
                }

            }
            if (jQuery("#alu_design_stlope").val()!="" && jQuery("#alu_design_stlope").val() !="0")
            {
                var kirkedal_id = 0;
                if (jQuery("#alu_color").val() == "alu") kirkedal_id = 1139;
                if (jQuery("#alu_color").val() == "black") kirkedal_id = 1140;
                var kirkedal_variation_id = 0;
            }
			
			
			

            var hornestolper_id = hornestolper_variation_id = 0;

            if (k200_id=='K200') {
                hornestolper_id = profils["K202"].product_id;
                hornestolper_variation_id = profils["K202"].variations[2570];
            } else {
                hornestolper_id = profils["K7"].product_id;
                //var hornestolper_variation_id = profils["K7"].variations[jQuery("#farve1").val().toLowerCase().replace(" ","_")];
                hornestolper_variation_id = profils["K7"].variations[k7_color];
            }
                
            var k14stolper_id = profils["K14"].product_id;
            //var k14stolper_variation_id = profils["K14"].variations[jQuery("#farve1").val().toLowerCase().replace(" ","_")];
            var k14stolper_variation_id = profils["K14"].variations[k14_color];
            var skruer1_id = profils["K81"].product_id;
            //var skruer1_variation_id = profils["K81"].variations[jQuery("#farve1").val().toLowerCase().replace(" ","_")];
           // var skruer1_variation_id = 173;
		    var skruer1_variation_id = 0;
            var skruer2_id = profils["K82"].product_id;
            //var skruer2_variation_id = profils["K82"].variations[jQuery("#farve1").val().toLowerCase().replace(" ","_")];
           // var skruer2_variation_id = 166;
		    var skruer2_variation_id = 0;
            var bundskinne_product_id = 0;
            if (jQuery("#bundskinne_color").val() == "alu") bundskinne_product_id = 1141;
            if (jQuery("#bundskinne_color").val() == "black") bundskinne_product_id = 1142;
            
            var montageklaeb_product_id = 1151;

            datastring = profil_id+","+profil_variation_id+","+jQuery("#fence1").val();
            datastring += "|"+top_profil_id+","+top_profil_variation_id+","+jQuery("#top1").val();
            datastring += "|"+bundskinne_product_id+",0,"+jQuery("#alu_bundskinne").val();
            datastring += "|"+montageklaeb_product_id+",0,"+jQuery("#alu_montageklaeb").val();
            datastring += "|"+start_slut_id+","+start_slut_variation_id+","+jQuery("#slutstolpe1").val();
            console.log(jQuery("#alu_design_stlope").val());
            /*if(jQuery("#alu_design_stlope").val() != "" & jQuery("#alu_design_stlope").val()!= "0" && jQuery("#alu_design_stlope").val() != " "){
                datastring += "|"+kirkedal_id+","+kirkedal_variation_id+","+jQuery("#alu_design_stlope").val();
            }else {
                if (k200_id=='K200') {
                    kirkedal_id = profils["K201"].product_id;
                    kirkedal_variation_id = profils["K201"].variations[2570];
                } else {
                    kirkedal_id = profils["K6"].product_id;
                    //var kirkedal_variation_id = profils["K6"].variations[jQuery("#farve1").val().toLowerCase().replace(" ","_")];
                    kirkedal_variation_id = profils["K6"].variations[k6_color];
                }
                datastring += "|"+kirkedal_id+","+kirkedal_variation_id+","+jQuery("#post1").val();
            }*/
			kirkedal_id = 1289;
            kirkedal_variation_id ='';
			datastring += "|"+kirkedal_id+","+kirkedal_variation_id+","+jQuery("#post1").val();
			
			Lameller_id = 1293;
           Lameller_id_variation_id = '';
			datastring += "|"+Lameller_id+","+Lameller_id_variation_id+","+jQuery("#Lameller").val();
			
            datastring += "|"+hornestolper_id+","+hornestolper_variation_id+","+jQuery("#stolpe1").val();
            datastring += "|"+k14stolper_id+","+k14stolper_variation_id+","+jQuery("#stolpe2").val();
            datastring += "|"+skruer1_id+","+skruer1_variation_id+","+jQuery("#topskruer1").val();
            datastring += "|"+skruer2_id+","+skruer2_variation_id+","+jQuery("#skruer1").val();
           // var endekap_id = 176;
		    var endekap_id = 0;
            var endekap_cnt = jQuery("#endekap1").val();
            datastring += "|"+endekap_id+",0,"+endekap_cnt;
            //var topklods_id = 180;
			var topklods_id = 0;
            var topklods_cnt = jQuery("#topklods1").val();
            datastring += "|"+topklods_id+",0,"+topklods_cnt;
            var power_id = 182;
            var power_cnt = jQuery("#power1").val();
            datastring += "|"+power_id+",0,"+power_cnt;
            var led_id = 184;
            var led_cnt = jQuery("#led1").val();
            datastring += "|"+led_id+",0,"+led_cnt;
            acc1_id = 1294;
            acc1_var_id1 = 0;
            acc1_var_id2 = 0;
            acc3_id = 1125;
            acc3_var_id1 = 0;
            acc3_var_id2 = 0;
            acc1_cnt = jQuery("#acc1_cnt").val();
            acc2_cnt = jQuery("#acc2_cnt").val();
            acc3_cnt = jQuery("#acc3_cnt").val();
            acc4_cnt = jQuery("#acc4_cnt").val();
            
			if (acc1_cnt!="0" || acc1_cnt!= 'undefined')
            {
                datastring += "|"+acc1_id+","+acc1_var_id1+","+acc1_cnt;
            }
            if (acc2_cnt!="0" || acc2_cnt!= 'undefined')
            {
                datastring += "|"+acc1_id+","+acc1_var_id2+","+acc2_cnt;
            }
            if (acc3_cnt!="0" || acc3_cnt!= 'undefined')
            {
                datastring += "|"+acc3_id+","+acc3_var_id1+","+acc3_cnt;
            }
            if (acc4_cnt!="0" || acc4_cnt!= 'undefined')
            {
                datastring += "|"+acc3_id+","+acc3_var_id2+","+acc4_cnt;
            }
			
			if (jQuery("#alu_design_stolpefod").val()!="" && jQuery("#alu_design_stolpefod").val() !="0")
            {
                var alu_design_stolpefod_id = 1165;
                var alu_design_stolpefod_cnt =  jQuery("#alu_design_stolpefod").val();
                var alu_design_stolpefod_variation_id = 0;
				//datastring += "|"+alu_design_stolpefod_id+","+alu_design_stolpefod_variation_id;
				datastring += "|"+alu_design_stolpefod_id+","+alu_design_stolpefod_variation_id+","+alu_design_stolpefod_cnt;
            }
			
			
			
			
            //return false;
            jQuery.post("/wp-content/add_to_cart.php",{data:datastring},function(result)
            {
                window.location.href="/beregn-copenhagen-stoej-hegn-new/";
            });
        }

</script> 
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyA8atx7IHiqGwW7pIxhDG52G8JAS-Oj1sU&amp;signed_in=false&amp;libraries=geometry,places,drawing"></script> 
<script>

              function postsize(){
                     // document.getElementById( 'getpostsize' ).innerHTML = document.getElementById( 'postsize1' ).value.replace('mm',' mm');
								   }
			    function endekaptype(){}
      </script> 
<script type="text/javascript">
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(){
				jQuery("#print_submit").trigger("click");
		});
      	jQuery("#print").click(function(){
      			jQuery("#print_submit").trigger('click');
      	});
      	jQuery("#printt").click(function(){
      			jQuery("#print_submit").trigger('click');
      	});
      	jQuery("#addtocart").click(function(){
      			jQuery("#add_to_cartt").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");
		});	
		
      </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 = '';
    db = 0;
      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 = [];
		function loadarray1(row1_array1,index){
			data = 0;
			row1_array1.sort();
			row = jQuery.unique(row1_array1);
			jQuery.each(row, function( key, valuee ) {
			if(valuee == index){
				data = parseInt(valuee);
				
			}else if(index > valuee){
				data = parseInt(valuee);
				
		 	 }else if(index < valuee){
		 	 	data = parseInt(valuee);
		 	 	
		 	 }else{
			  	data = parseInt(valuee);
			  
			  }
			});
		return data;
		}
		function loadarray2(row1_array2,index){
			data = 0;
			row1_array2.sort();
			row = jQuery.unique(row1_array2);
			jQuery.each(row, function( key, valuee ) {
			if(valuee == index){
					data = parseInt(valuee);
				}else if(index > valuee){
					data = parseInt(valuee);
		 		 }else if(index < valuee){
		 	 	data = parseInt(valuee);
		 	 	
		 	 }else{
			  		data = parseInt(valuee);
			  }
			});
		return data;
		}
		function loadarray3(row1_array3,index){
			data = 0;
			row1_array3.sort();
			row = jQuery.unique(row1_array3);
			jQuery.each(row, function( key, valuee ) {
			if(valuee == index){
				data = parseInt(valuee);
			}else if(index > valuee){
				data = parseInt(valuee);
		 	 }
		 	 else if(index < valuee){
		 	 	data = parseInt(valuee);
		 	 	
		 	 }else{
			  	data = parseInt(valuee);
			  }
			});
		return data;
		}
		function loadarray4(row1_array4,index){
			data = 0;
			row1_array4.sort();
			row = jQuery.unique(row1_array4);
			jQuery.each(row, function( key, valuee ) {
			if(valuee == index){
				data = parseInt(valuee);
			}else if(index > valuee){
				data = parseInt(valuee);
		 	 }else if(index < valuee){
		 	 	data = parseInt(valuee);
		 	 	
		 	 }else{
			  	data = parseInt(valuee);
			  }
			});
		return data;
		}
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);
        //Create large ground for valley environment
  		 const largeGroundMat = new BABYLON.StandardMaterial("GroundMat");
  		 		largeGroundMat.backFaceCulling = true;
  			   largeGroundMat.diffuseTexture = new BABYLON.Texture("https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/grassv2small.png");
    			largeGroundMat.specularColor = new BABYLON.Color3(0, 0, 0);
		    let instanceCountiw = $("#instanceCounti").val(); //17
		    let instanceCountlw = $("#instanceCountl").val(); //12
		    let instanceCountuw = $("#instanceCountu").val(); //3
		    var squerew = $("#squere").val();
		    width = 1;
		    heightt = 1;
		    positionx = 0;
		    positionz = 0;
		    if((instanceCountiw != '' || instanceCountiw != '0') && (instanceCountlw == '' || instanceCountlw == '0') && (instanceCountuw == '' || instanceCountuw == '0') && (squerew == '' || squerew == '0')){
		    
		        for(i=0;i < instanceCountiw; i++){
		            
		            heightt += 1;
		            
		            if(i == 0){
		            positionx =0;
		            positionz +=0;     
		            heightt += 1;
		            width = 2;
		            }else{
		                positionx +=0.43;
		            positionz +=0.75;
		            heightt += 1.5;
		            width += 1;
		            }
		        }
		         positionx = -0.500; 
		    }else if((instanceCountiw != '' || instanceCountiw != '0') && (instanceCountlw != '' || instanceCountlw != '0') && (instanceCountuw == '' || instanceCountuw == '0') && (squerew == '' || squerew == '0')){
		    	
				        for(i=0;i < instanceCountiw; i++){
				            
				            //heightt += 1;
				            
				            if(i == 0){
				            positionx =0;
				            positionz +=0;    
				            heightt += 1;
				            //width = 2;
				            }else{
				           
				            positionz +=0.90;
				            //last value 2.8
				            heightt += 8;
				           // width += 1;
				            }
				        }
				         for(i=0;i < instanceCountlw; i++){
				            
				            //heightt += 1;
				            
				            if(i == 0){
				           // positionx =0;
				            //positionz +=0;    
				           // heightt += 1;
				           // width = 2;
				           width = 2;
				            }else{
				                 positionx +=0.83;
				           // positionx +=0.43;
				           // positionz +=0.90;
				           // heightt += 2;
				           //last value 2.8
				            width += 8;
				            }
				        }
				    }else if((instanceCountiw != '' || instanceCountiw != '0') && (instanceCountlw != '' || instanceCountlw != '0') && (instanceCountuw != '' || instanceCountuw != '0')  && (squerew == '' || squerew == '0')){
				    	
				      	if(instanceCountiw > instanceCountuw){
				      		row3 = instanceCountiw;
				      	}else{
				      		row3 = instanceCountuw;
				      	}
				        for(i=0;i < row3; i++){
				            
				            //heightt += 1;
				            
				            if(i == 0){
				            positionx =0;
				            positionz +=0;    
				            heightt += 1;
				            //width = 2;
				            }else{
				           
				            positionz +=0.90;
				            //heightt += 2.8;
				            //last value 2.8
				            heightt += 8;
				           // width += 1;
				            }
				        }
				         for(i=0;i < instanceCountlw; i++){
				            
				            //heightt += 1;
				            
				            if(i == 0){
				           // positionx =0;
				            //positionz +=0;    
				           // heightt += 1;
				           // width = 2;
				           width = 2;
				            }else{
				                 positionx +=0.83;
				           // positionx +=0.43;
				           // positionz +=0.90;
				           // heightt += 2;
				           //last value 2.8
				            width += 8;
				            }
				        }
				    }else if((instanceCountiw != '' || instanceCountiw != '0') && (instanceCountlw != '' || instanceCountlw != '0') && (instanceCountuw != '' || instanceCountuw != '0') && (squerew != '' || squerew != '0')){
				    
				      	if(instanceCountiw > instanceCountuw){
				      		row3 = instanceCountiw;
				      	}else{
				      		row3 = instanceCountuw;
				      	}
				        for(i=0;i < row3; i++){
				            
				           // heightt += 1;
				            
				            if(i == 0){
				            positionx =0;
				            positionz +=0;    
				            heightt += 1;
				            //width = 2;
				            }else{
				           
				            positionz +=0.90;
				              //last value 2.8
				            heightt += 8;
				           // width += 1;
				            }
				        }
				         for(i=0;i < instanceCountlw; i++){
				            
				            //heightt += 1;
				            
				            if(i == 0){
				           // positionx =0;
				            //positionz +=0;    
				           // heightt += 1;
				           // width = 2;
				           //last value 2.8
				           width = 2;
				            }else{
				                 positionx +=0.83;
				           // positionx +=0.43;
				           // positionz +=0.90;
				           // heightt += 2;
				            //last value 2.8
				            width += 8;
				            }
				        }
				    }

   		 const largeGround = BABYLON.MeshBuilder.CreateGroundFromHeightMap("ground", "https://assets.babylonjs.com/environments/villageheightmap.png", {width:width, height:heightt});
		    largeGround.position.x = positionx;
		    largeGround.position.y = -1.0;
		    largeGround.position.z = -positionz;
		    largeGround.material = largeGroundMat;

    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.upperRadiusLimit =30;
	//camera.lowerBetaLimit = 1.2;
    camera.upperBetaLimit = 1.5;
	camera.lowerRadiusLimit = 5.1;
    camera.attachControl(canvas, true);
    	var light = new BABYLON.HemisphericLight("light1", new BABYLON.Vector3(0, 1, 0), scene);
    //const light = new BABYLON.HemisphericLight("light", new BABYLON.Vector3(2, 1, 0),scene);

		       
        /*var camera = new BABYLON.ArcRotateCamera("camera1", 0, 0, 10, BABYLON.Vector3.Zero(), scene);
	       camera.setPosition(new BABYLON.Vector3(10, 5, -15));
         //  camera.wheelPrecision = 0.5;
		 camera.upperRadiusLimit =30;

       camera.attachControl(canvas, true);
    	var light = new BABYLON.HemisphericLight("light1", new BABYLON.Vector3(0, 1, 0), scene);
       */

        //var camera = new BABYLON.ArcRotateCamera("camera1", 10, Math.PI / 2, 20, BABYLON.Vector3(-5, 0,-10), scene);
        /*   var light = new BABYLON.HemisphericLight("Light", new BABYLON.Vector3(0, 10, 0), scene);	*/
    	/*var grassMaterial = new BABYLON.StandardMaterial(name + "bawl", scene);
    	var grassTexture = new BABYLON.GrassProceduralTexture(name + "textbawl", 256, scene);
    	grassMaterial.ambientTexture = grassTexture;

    	var plaasdasne = BABYLON.Mesh.CreatePlane("plane2er3", 20, scene);

    	plaasdasne.material = grassMaterial;
  		plaasdasne.rotate(new BABYLON.Vector3(100, 1.0, 0), 3.15 / 2.0, BABYLON.Space.Local);
		console.log(Math.PI/8);*/
		//mohit
        let instanceCounti = $("#instanceCounti").val(); //17
        let instanceCountl = $("#instanceCountl").val(); //12
        let instanceCountu = $("#instanceCountu").val(); //3
      	var squere = $("#squere").val();
        scene.clearColor = BABYLON.Color4(0.5, 0.8, 0.6, 0.8);
        light.intensity = 1;
       
        
       var updateins = 0;
       let value = 99;
       var position = 0;
       
		       if(scene_custom != ''){
		      	 	scene_custom.dispose();
		       }
		       data_id = 0;

		       for (var index = 0; index < instanceCounti; index++) {
                     const index_id = index;
					  const index_id1 = index;
                     if(row1_array.length >0 ){
                    	if(row1_array[index] == index_id && color1[index_id] == 'door'){
                    		
                    		scene_custom.dispose();
                    		glb_data1 = custom_height_image1[index_id];
                    		}else{
                			scene_custom.dispose();
                			
                			if(custom_height_image1[index_id] == undefined){
                			glb_data1 = row_url_1;
                			}else{
                				glb_data1 = custom_height_image1[index_id];
                			}
                    	  }
                	}else{
                		glb_data1 = row_url_1;
            		}
            		 var glbdatasplit = glb_data1.split('/');
				    const getimagename = glbdatasplit[8];
					//console.log("getimagename"+getimagename);
				    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" + index_id1);       
                           newInstance.position.x = -0.915;

                           if(color1[index_id1] == 'door'){
							}
                          //console

						 if(row1_array.length > 0){
						 	data = loadarray1(row1_array1,index_id1);
						 	if(color1[index_id1] == 'door'){
								newInstance.position.y = 0.8;
						 	}
							
							 checkforfence0 = 0;
								door_id0 = 0;
								jQuery.each(color1 ,function(key,value){
									if(value == 'door'){
										checkforfence0 = 1;
										door_id0 = key;
									}
								});
								 if(checkforfence0 == 1){
											if(color1[index_id1] == 'door'){
												newInstance.position.z = (index_id1*-1.83+0.43);	
											}else{
												if(door_id0 < index_id1){
												newInstance.position.z = (index_id1*-1.83+0.855);
												}else if(door_id0 > index_id1){
												newInstance.position.z = (index_id1*-1.83);
												}
											}
										}else{
												newInstance.position.z = (index_id1*-1.83);		
										}
						  }
						  else{
						  	newInstance.position.z = (index_id1*-1.83);
						  }
						  //not used
						  if(data_id == '1'){
						  	if(color1[index_id1] == 'door'){
						  newInstance.position.z = (index_id1*-1.83+0.43);	
						  }else{
						  	newInstance.position.z = (index_id1*-1.83+0.855);	
						  }
						  }else if(data_id == '0'){
						  	//newInstance.position.z = (index_id1*-1.83);
						  }
						  //not used
						  
						
						  
						  
						  
					    var plane = BABYLON.Mesh.CreatePlane("plane"+index_id1, 3);
				        plane.parent = newInstance;
				        if(color1[index_id1] == 'door'){
				        	
				        	checked = custom_height_image1[index_id1].split('/');
				        	if(checked[9] =='Door_1_tex_2.glb'){
				        	
				        		plane.rotate(new BABYLON.Vector3(100, 0.2, 0), 1.5);
				        		plane.position.x =1.350;
	        					plane.position.y =-0.300;
	        					plane.position.z=-1.5;
	        					fenceimg = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite0.png';
				        	}else if((checked[9] =='Door_2_tex_1.glb')){
				        		plane.rotate(new BABYLON.Vector3(100, 0.2, 0), 1.5);
			  					plane.position.x =1.350;
	        					plane.position.y =-0.300;
	        					plane.position.z=-1.5;
	        			        fenceimg = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite0.png';
				        	}else if((checked[9] == 'Door_2_tex_2.glb')){
				        		plane.rotate(new BABYLON.Vector3(100, 0.2, 0), 1.5);
			  					plane.position.x =1.350;
	        					plane.position.y =-0.300;
	        					plane.position.z=-1.5;
	        			        fenceimg = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite2.png';
	        			    }else if((checked[9] == 'Door_1_tex_1.glb')){
				        		plane.rotate(new BABYLON.Vector3(100, 0.2, 0), 1.5);
			  					plane.position.x =1.350;
	        					plane.position.y =-0.200;
	        					plane.position.z=-1.5;
	        			        fenceimg = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite2.png';
	        			    }else{
				        		fenceimg = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite.png';
				        	plane.rotate(new BABYLON.Vector3(100, 0.2, 0), 1.5);
			        		plane.position.x =1.387;
        					plane.position.y =-0.300;
        					plane.position.z=-1.5;
        				}
				        }else{
						
						plane.position.x =0;
						fencecount = counttt[0].split('.');
				        	if(fencecount[0] > 5){
				        		fenceyposition = fencecount[0]*0.22;
				        	}else if(fencecount[0] <= 2){
				        		fenceyposition = 2*0.6;
				        	}else{
				        		fenceyposition = fencecount[0]*0.33;
				        	}
				        
						plane.position.x =0;
						
						fence_color = jQuery("#fencetype").attr('fence_color');
						
						  if(getimagename == 'ALU_BlackProfil_SilverStolpe'){
						  	fencecount = counttt[0].split('.');
							        	if(fencecount[0] > 5){
							        		fenceyposition = fencecount[0]*0.024;
							        	}else if(fencecount[0] <= 2){
							        		console.log(fencecount[0]);
							        		fenceyposition = 0.9;
							        	}else{
							        		fenceyposition = fencecount[0]*0.12;
							        	}
									if(fencecount[0]==1){
										plane.position.y =0.3;
										}else if(fencecount[0]==2){
											plane.position.y =0.3;
										}else if(fencecount[0]==3){
											plane.position.y =0.3;
										}else if(fencecount[0]==4){
											plane.position.y =0.2;
										}else{
										plane.position.y =-fenceyposition;
												}
							plane.position.x =0.05;
							plane.position.z =-1.4;
							plane.rotate(new BABYLON.Vector3(0, 90, 0), 1.5);	
							
						 }else if(getimagename == 'ALU_GreyProfil__SilverStolpe'){
						 	
										fencecount = counttt[0].split('.');
										console.log(fencecount);
										if(fencecount[0] == 3){
										plane.position.y =  0.7;
										}
										else if(fencecount[0] == 6){
										plane.position.y = 0.8;	
										}else if(fencecount[0] == 8){
										plane.position.y =  -0.3;	
										}else{
								 	 	plane.position.y =fenceyposition/2;											
									}
									plane.position.z = -1.4;
									plane.rotate(new BABYLON.Vector3(0, 90, 0), 1.5);
									

						 }
						 
						// else if(getimagename == 'copenhagen')
						  else if(getimagename == 'ALU_BlackProfil_BlackStolpe1')
						 {
						 	fencecount = counttt[0].split('.');
				        	if(fencecount[0] > 5){
				        		fenceyposition = fencecount[0]*0.22;
				        	}else if(fencecount[0] <= 2){
				        		fenceyposition = 0.6;
				        	}else{
				        		fenceyposition = fencecount[0]*0.33;
				        	}	
							if(fencecount[0] == 1){
									plane.position.y =0.5;											
								}else if(fencecount[0] == 2){
									plane.position.y =0.6;											
								}else if(fencecount[0] == 3){
									plane.position.y =0.7;											
								}else if(fencecount[0] == 4){
									plane.position.y =0.6;											
								}
								else if(fencecount[0] == 5 || fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 9){
									plane.position.y =0.8;											
								}else if(fencecount[0] == 8){
									plane.position.y =1;											
								}
								else if(fencecount[0] == 10){
									plane.position.y =1;											
								}
								else if(fencecount[0] > 10){
									plane.position.y =1.2;											
								}
								plane.position.x = -0.200;
								plane.position.z=-1.4;
							plane.rotate(new BABYLON.Vector3(0, 90, 0), 1.5);
						 	 	//plane.position.y =fenceyposition/2;
						 }
						 else if(getimagename == 'ALU_GreyProfil_BlackStolpe')
						 {
						 			fencecount = counttt[0].split('.');
							        	if(fencecount[0] > 5){
							        		fenceyposition = fencecount[0]*0.024;
							        	}else if(fencecount[0] <= 2){
							        		fenceyposition = 0.9;
							        	}else{
							        		fenceyposition = fencecount[0]*0.12;
							        	}
										if(fencecount[0] == 1){
											plane.position.y =0.5;											
										}else if(fencecount[0] == 2){
											plane.position.y =0.6;											
										}else if(fencecount[0] == 3){
											plane.position.y =0.7;											
										}else if(fencecount[0] == 4){
											plane.position.y =0.6;											
										}
										else if(fencecount[0] == 5 || fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 9){
											plane.position.y =0.8;											
										}else if(fencecount[0] == 8){
											plane.position.y =1;											
										}
										else if(fencecount[0] == 10){
											plane.position.y =1;											
										}else if(fencecount[0] == 13){
											plane.position.y =1.5;											
										}
										else if(fencecount[0] > 10){
											plane.position.y =0;											
										}
										plane.position.x = -0.200;
										plane.position.z=-1.4;
										plane.rotate(new BABYLON.Vector3(0, 90, 0), 1.5);
							}else{
								plane.position.y =-0.300;
						}
						fenceimg = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite.png';
						}
						var plane2 = BABYLON.Mesh.CreatePlane("plane01"+index_id1, 3);
				        plane2.parent = newInstance;
				        if(color1[index_id1] == 'door'){
				        	checked = custom_height_image1[index_id1].split('/');
			        		if(checked[9] =='Door_1_tex_2.glb'){
				        		plane2.rotate(new BABYLON.Vector3(100, 0.2, 0), 1.5);
				        		plane2.position.x =1.300;
	        					plane2.position.y =0.3;
	        					plane2.position.z=-1.5;
	        					fenceimg1 = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite.png';
				        	}else if((checked[9] =='Door_2_tex_1.glb')){
				        		plane2.rotate(new BABYLON.Vector3(100, 0.2, 0), 1.5);
			  					plane2.position.x =1.300;
	        					plane2.position.y =0.3;
	        					plane2.position.z=-1.5;
	        			        fenceimg1 = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite.png';
				        	}else if((checked[9] == 'Door_2_tex_2.glb')){
				        		plane2.rotate(new BABYLON.Vector3(100, 0.2, 0), 1.5);
			  					plane2.position.x =1.300;
	        					plane2.position.y =0.3;
	        					plane2.position.z=-1.5;
	        			        fenceimg1 = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite4.png';
	        			    }else if((checked[9] == 'Door_1_tex_1.glb')){
				        		plane2.rotate(new BABYLON.Vector3(100, 0.2, 0), 1.5);
			  					plane2.position.x =1.300;
	        					plane2.position.y =0.3;
	        					plane2.position.z=-1.5;
	        			        fenceimg1 = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite4.png';
							}else{
				        		fenceimg1 = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite.png';
				        	plane2.rotate(new BABYLON.Vector3(100, 0.2, 0), 1.5);
			        		plane2.position.x =1.300;
        					plane2.position.y =0;
        					plane2.position.z=-1.5;
        				}
				        }else{
			        	 plane2.position.x =-0.320;
						 plane2.rotate(new BABYLON.Vector3(0, 0.2, 0), 4.7);
						
						 
						 fence_color = jQuery("#fencetype").attr('fence_color');
						 fencecount = counttt[0].split('.');
				        	if(fencecount[0] > 5){
				        		fenceyposition = fencecount[0]*0.22;
				        	}else if(fencecount[0] <= 2){
				        		fenceyposition = 2*0.6;
				        	}else{
				        		fenceyposition = fencecount[0]*0.33;
				        	}
						  if(getimagename == 'ALU_BlackProfil_SilverStolpe'){
						  	fencecount = counttt[0].split('.');
							        	if(fencecount[0] > 5){
							        		fenceyposition = fencecount[0]*0.024;
							        	}else if(fencecount[0] <= 2){
							        		fenceyposition = 0.9;
							        	}else{
							        		fenceyposition = fencecount[0]*0.12;
							        	}
										if(fencecount[0]==1){
										plane2.position.y =0.3;
										}else if(fencecount[0]==2){
											plane2.position.y =0.3;
										}else if(fencecount[0]==3){
											plane2.position.y =0.3;
										}else if(fencecount[0]==4){
											plane2.position.y =0.2;
										}else{
										plane2.position.y =-fenceyposition;

										}
									plane2.position.x =0.5;	
						 	//plane2.position.y =-fenceyposition;
						 }else if(getimagename == 'ALU_GreyProfil__SilverStolpe'){
						
										fencecount = counttt[0].split('.');
										if(fencecount[0] == 3){
										plane2.position.y =  0.7;
										}
										else if(fencecount[0] == 6){
										plane2.position.y = 0.8;	
										}else if(fencecount[0] == 8){
										plane2.position.y =  -0.3;	
										}else{
								 	 	plane2.position.y =fenceyposition/2;											
									}
						 	
						 }else if(getimagename == 'ALU_BlackProfil_BlackStolpe1'){
						 	fencecount = counttt[0].split('.');
				        	if(fencecount[0] > 5){
				        		fenceyposition = fencecount[0]*0.22;
				        	}else if(fencecount[0] <= 2){
				        		fenceyposition = 0.6;
				        	}else{
				        		fenceyposition = fencecount[0]*0.33;
				        	}
						 	if(fencecount[0] == 1){
									plane2.position.y =0.5;											
								}else if(fencecount[0] == 2){
									plane2.position.y =0.6;											
								}else if(fencecount[0] == 3){
									plane2.position.y =0.7;											
								}else if(fencecount[0] == 4){
									plane2.position.y =0.6;											
								}
								else if(fencecount[0] == 5 || fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 9){
									plane2.position.y =0.8;											
								}else if(fencecount[0] == 8){
									plane2.position.y =1;											
								}
								else if(fencecount[0] == 10){
									plane2.position.y =1;											
								}
								else if(fencecount[0] > 10){
									plane2.position.y =1.2;											
								}

						 }else if(getimagename == 'ALU_GreyProfil_BlackStolpe'){
							
										
										fencecount = counttt[0].split('.');
							        	if(fencecount[0] > 5){
							        		fenceyposition = fencecount[0]*0.024;
							        	}else if(fencecount[0] <= 2){
							        		fenceyposition = 0.9;
							        	}else{
							        		fenceyposition = fencecount[0]*0.12;
							        	}
										if(fencecount[0] == 1){
											plane2.position.y =0.5;											
										}else if(fencecount[0] == 2){
											plane2.position.y =0.6;											
										}else if(fencecount[0] == 3){
											plane2.position.y =0.7;											
										}else if(fencecount[0] == 4){
											plane2.position.y =0.6;											
										}
										else if(fencecount[0] == 5 || fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 9){
											plane2.position.y =0.8;											
										}else if(fencecount[0] == 8){
											plane2.position.y =1;											
										}
										else if(fencecount[0] == 10){
											plane2.position.y =1;											
										}else if(fencecount[0] == 13){
											plane2.position.y =1.5;											
										}
										else if(fencecount[0] > 10){
											plane2.position.y =0;											
										}
										
						 }else{
						 	plane2.position.y =-0.300;

						 }
						  plane2.position.x=0.3;
						 plane2.position.z=1.300;
						 fenceimg1 = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite.png';
						}
						var advancedTexture = BABYLON.GUI.AdvancedDynamicTexture.CreateForMesh(plane);
					   var advancedTexture2 = BABYLON.GUI.AdvancedDynamicTexture.CreateForMesh(plane2);
		              var rect1 = new BABYLON.GUI.Rectangle();
                       		  rect1.width = "70px";
  	    			          rect1.height = "70px";
	                          rect1.thickness = 0;
                       		  rect1.value = index_id1;              
                              rect1.background = "#fff0";                
                              advancedTexture.addControl(rect1);
                        var rect2 = new BABYLON.GUI.Rectangle();
                              rect2.width = "70px";
  	    			          rect2.height = "70px";
	                          rect2.thickness = 0;
                        	  rect2.value = index_id1;              
                              advancedTexture2.addControl(rect2);
							  
							  var button1=0;

                        	//var button1 = BABYLON.GUI.Button.CreateImageOnlyButton(
//                                "but"+index_id1,                    
//            					fenceimg
//                            );
						   button1.metadata = index_id1;
                           button1.onPointerUpObservable.add(function() {
                           file1 = 1;
                           ids = index_id1;
                           xposition = -0.915;
                           yposition = index_id1*-1.83;
                             load_service_PopupBox1(file1,index_id1,xposition,yposition,scene,mesh1,button1,advancedTexture);
                            });
                            button1.thickness = 0;
							var button01=0;
                           // var button01 = BABYLON.GUI.Button.CreateImageOnlyButton(
//                                "butt"+index_id1,                    
//            					fenceimg1
//                            );

                            //button01.background = "green";
						   button01.metadata = index_id1;
                           button01.onPointerUpObservable.add(function() {
                           file1 = 1;
                           ids = index_id1;
                           xposition = -0.915;
                           yposition = index_id1*-1.83;
                             load_service_PopupBox1(file1,index_id1,xposition,yposition,scene,mesh1,button01,advancedTexture2);
                            });
                            
                            button01.thickness = 0;
                            rect1.linkWithMesh(newInstance);   
                            rect1.addControl(button1);
                             rect2.linkWithMesh(newInstance);   
                             rect2.addControl(button01);
                            camera.upperBetaLimit = Math.PI /2;
                        	camera.lowerRadiusLimit = 4;
							
							plane.addLODLevel(30, null); 
							plane2.addLODLevel(30, null); 
                            	
                	    });
						
						setTimeout(function(){
				 		 }, 1000);
                }
                 data_id2 = 0;
        	 for (var index2 = 0; index2 < instanceCountl; index2++) {
				    
				     const index_id = index2;
				     const index_id22 = index2;
				  
				   if(row2_array.length >0 ){

                    	if(row2_array[index_id] == index_id && color2[index_id] == 'door'){
                    		
                    		scene_custom.dispose();
                    		
                    		//glb_data = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb';
                    		glb_data = custom_height_image2[index_id];
                    		}else{
                    			
                			scene_custom.dispose();
                			
                			if(custom_height_image2[index_id] == undefined){
                				glb_data = row_url_2;
                			}else{
                				glb_data = custom_height_image2[index_id];
                			}
                		
                    	  }
                	}else{

                	
                		glb_data = row_url_2;
            		}
				       
				    var glbdatasplit = glb_data.split('/');
				    const getimagename = glbdatasplit[8];
				     const counttt = glbdatasplit[9].split('_').slice(-1);
				      url = glbdatasplit.slice(0, -1);
				    //console.log(url.join('/'));
				    seturl = url.join('/')+'/';
				    
				     filenamee = glbdatasplit[9];
				    BABYLON.SceneLoader.ImportMesh("", "",glb_data, scene, function (newMeshesl) { 
				    	var mesh = null;
		           	    var mesh = newMeshesl[1];
	            		mesh.isVisible = false;
			       	    var newInstancel = mesh.createInstance("fencel" + index_id);
						
                  	     if(row2_array.length > 0){
                  	    console.log(row2_array);
                  	     	if(color2[index_id22] == 'door'){
						 		//newInstancel.position.y = 1.05;
								newInstancel.position.y = 0.8;
						 	}
							 if(color2[index_id22] == 'door'){
                  	    	 newInstancel.rotate(new BABYLON.Vector3(0, 0, -10),  Math.PI *0.50);
						 	 newInstancel.rotation.x  =10;
							 newInstancel.rotation.y  =0;
							 newInstancel.rotation.z  =0;
							 
							}else{
                  	     	 newInstancel.rotate(new BABYLON.Vector3(0, 1, 0), Math.PI * 0.50);
								newInstancel.rotation.x  = 0;
							}
							 datarow2 = loadarray2(row2_array1,index_id22);
							
								 /*----------------------*/
					
								checkforfence = 0;
								door_id = 0;
								jQuery.each(color2 ,function(key,value){

									if(value == 'door'){
										checkforfence = 1;
										door_id = key;
									}
								});
								
								 if(checkforfence == 1){
											
											if(color2[index_id22] == 'door'){
												newInstancel.position.x = (index_id22*1.83-0.433);	
											}else{
					
												if(door_id < index_id22){
					
												newInstancel.position.x = (index_id22*1.83-0.855);
												
												}else if(door_id > index_id22){
												//alert(door_id +'else03' +index_id22 );
												newInstancel.position.x = (index_id22*1.83);
												
												}
												
											
											}
										}else{
											newInstancel.position.x = (index_id22*1.83);
													
										}

                  	    }else{
							
							newInstancel.position.x = index_id22*1.83;
							 //newInstancel.rotate(new BABYLON.Vector3(0, 1, 0), -90,90);
							 newInstancel.rotate(new BABYLON.Vector3(0, -10, 0), Math.PI * 0.50);
							// newInstancel.rotation.x  =10;
//							 newInstancel.rotation.y  =0;
//							 newInstancel.rotation.z  =0;
                  	    }
						//console.log("newInstancel.rotate"+newInstancel.rotate);
                  	    //not used
                  	     if(data_id2 == '1'){
                            if(color2[index_id22] == 'door'){
	                            newInstancel.position.x = (index_id22*1.83-0.43);  
	                         }else{
	                            newInstancel.position.x = (index_id22*1.83-0.855); 
	                            
	                         }
                          }else if(data_id2 == '0'){
                            //newInstance.position.z = (index_id1*-1.83);
							
							if(index_id22 == 0)
							{
							newInstancel.position.x	=(index_id22*1.83); 
							}else{
								newInstancel.position.x	=(index_id22*1.83); 
								}
                          }
                          //not used
                  	   newInstancel.position.z = 0.9;
					    //console.log("data_id2 = "+data_id2);
//					   console.log("index_id22 = "+index_id22);
//console.log("else 3 = "+newInstancel.position.x);
//console.log("else 3 = "+newInstancel.position.y);
//console.log("else 3 = "+newInstancel.position.z);
                  	    var plane = BABYLON.Mesh.CreatePlane("plane"+index_id22, 3);
				        plane.parent = newInstancel;
				        if(color2[index_id22] == 'door'){

				        	checked = custom_height_image2[index_id22].split('/');
				        	
				        	if(checked[9] =='Door_1_tex_2.glb'){
			        		plane.rotate(new BABYLON.Vector3(80, 0, 0), 1.5);
			        		plane.position.x =1.387;
        					plane.position.y =0.300;
        					plane.position.z=-1.5;
	        					fenceimg = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite3.png';
	        				
				        	}else if((checked[9] =='Door_2_tex_1.glb')){
				        		plane.rotate(new BABYLON.Vector3(80, 0, 0), 1.5);
			        		plane.position.x =1.387;
        					plane.position.y =0.300;
        					plane.position.z=-1.5;
	        			        fenceimg = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite3.png';
	        			   }else if((checked[9] == 'Door_2_tex_2.glb')){
				        		plane.rotate(new BABYLON.Vector3(80, 0, 0), 1.5);
			        		plane.position.x =1.387;
        					plane.position.y =0.300;
        					plane.position.z=-1.5;
	        			        fenceimg = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite4.png';
	        			    }else if((checked[9] == 'Door_1_tex_1.glb')){
			        		plane.rotate(new BABYLON.Vector3(80, 0, 0), 1.5);
			        		plane.position.x =1.387;
        					plane.position.y =0.300;
        					plane.position.z=-1.5;
        			        fenceimg = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite4.png';
	        				}else{
			        		fenceimg = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite.png';
				        	plane.rotate(new BABYLON.Vector3(80, 0, 0), 1.5);
			        		plane.position.x =1.387;
        					plane.position.y =0.200;
        					plane.position.z=-1.5;
        				}
				        	
				        }else{
						plane.rotate(new BABYLON.Vector3(0, 0.2, 0), 1.5);
						plane.position.x =-0.210;
							fencecount = counttt[0].split('.');
					        	if(fencecount[0] > 5){
					        		fenceyposition = fencecount[0]*0.22;
					        	}else if(fencecount[0] <= 2){
					        		fenceyposition = 2*0.6;
					        	}else{
					        		fenceyposition = fencecount[0]*0.33;
					        	}
							  if(getimagename == 'ALU_BlackProfil_SilverStolpe'){
							  
					        	fencecount = counttt[0].split('.');
							        	if(fencecount[0] > 5){
							        		fenceyposition = fencecount[0]*0.024;
							        	}else if(fencecount[0] <= 2){
							        		fenceyposition = 0.9;
							        	}else{
							        		fenceyposition = fencecount[0]*0.12;
							        	}
										if(fencecount[0]==1){
										plane.position.y =0.3;
										}else if(fencecount[0]==2){
											plane.position.y =0.3;
										}else if(fencecount[0]==3){
											plane.position.y =0.3;
										}else if(fencecount[0]==4){
											plane.position.y =0.2;
										}else{
										plane.position.y =-fenceyposition;
										}
					        	
							 }else if(getimagename == 'ALU_GreyProfil__SilverStolpe'){
							 			/*fencecount = counttt[0].split('.');
							        	if(fencecount[0] > 5){
							        		fenceyposition = fencecount[0]*0.024;
							        	}else if(fencecount[0] <= 2){
							        		console.log(fencecount[0]);
							        		fenceyposition = 0.9;
							        	}else{
							        		fenceyposition = fencecount[0]*0.12;
							        	}*/
										fencecount = counttt[0].split('.');
										if(fencecount[0] == 3){
										plane.position.y =  0.7;
										}
										else if(fencecount[0] == 6){
										plane.position.y = 0.8;	
										}else if(fencecount[0] == 8){
										plane.position.y =  -0.3;	
										}else{
								 	 	plane.position.y =fenceyposition/2;											
									}
									
							 }else if(getimagename == 'ALU_BlackProfil_BlackStolpe'){
							 	/*fencecount = counttt[0].split('.');
						        	if(fencecount[0] > 5){
						        		fenceyposition = fencecount[0]*0.024;
						        	}else if(fencecount[0] <= 2){
						        		console.log(fencecount[0]);
						        		fenceyposition = 0.9;
						        	}else{
						        		fenceyposition = fencecount[0]*0.12;
						        	}*/
							 	//plane.position.y =fenceyposition/2;
								if(fencecount[0] == 1){
									plane.position.y =0.5;											
								}else if(fencecount[0] == 2){
									plane.position.y =0.6;											
								}else if(fencecount[0] == 3){
									plane.position.y =0.7;											
								}else if(fencecount[0] == 4){
									plane.position.y =0.6;											
								}
								else if(fencecount[0] == 5 || fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 9){
									plane.position.y =0.8;											
								}else if(fencecount[0] == 8){
									plane.position.y =1;											
								}
								else if(fencecount[0] == 10){
									plane.position.y =1;											
								}
								else if(fencecount[0] > 10){
									plane.position.y =1.2;											
								}
							 }else if(getimagename == 'ALU_GreyProfil_BlackStolpe'){
							 	if(fencecount[0] == 1){
											plane.position.y =0.5;											
										}else if(fencecount[0] == 2){
											plane.position.y =0.6;											
										}else if(fencecount[0] == 3){
											plane.position.y =0.7;											
										}else if(fencecount[0] == 4){
											plane.position.y =0.6;											
										}
										else if(fencecount[0] == 5 || fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 9){
											plane.position.y =0.8;											
										}else if(fencecount[0] == 8){
											plane.position.y =1;											
										}
										else if(fencecount[0] == 10){
											plane.position.y =1;											
										}else if(fencecount[0] == 13){
											plane.position.y =1.5;											
										}
										else if(fencecount[0] > 10){
											plane.position.y =0;											
										}
							 }else{
						plane.position.y =-0.300;}
						plane.position.z=-1.35;
						fenceimg = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite.png';
                    }
						
                        var plane2se = BABYLON.Mesh.CreatePlane("plane2se"+index_id22, 3);
				        plane2se.parent = newInstancel;
				        if(color2[index_id22] == 'door'){

				        	checked = custom_height_image2[index_id22].split('/');
				        	console.log(checked[9]);
				        	if(checked[9] =='Door_1_tex_2.glb'){
				        	
			        		plane2se.rotate(new BABYLON.Vector3(80, 0, 0), 1.5);
			        		plane2se.position.x =1.387;
        					 plane2se.position.y =-0.150;
        					 plane2se.position.z=-1.5;
	        					fenceimg1 = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite0.png';
	        				
				        	}else if((checked[9] =='Door_2_tex_1.glb')){
				        		plane2se.rotate(new BABYLON.Vector3(80, 0, 0), 1.5);
			        		plane2se.position.x =1.387;
        					 plane2se.position.y =-0.150;
        					 plane2se.position.z=-1.5;
	        			        fenceimg1 = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite0.png';
	        			 	}else if((checked[9] == 'Door_2_tex_2.glb')){
			        		plane2se.rotate(new BABYLON.Vector3(80, 0, 0), 1.5);
			        		plane2se.position.x =1.387;
    				     	 plane2se.position.y =-0.150;
        					 plane2se.position.z=-1.5;
	        			        fenceimg1 = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite2.png';
	        			    }else if((checked[9] == 'Door_1_tex_1.glb')){
				        		plane2se.rotate(new BABYLON.Vector3(80, 0, 0), 1.5);
			        		plane2se.position.x =1.387;
        					 plane2se.position.y =-0.150;
        					 plane2se.position.z=-1.5;
	        			        fenceimg1 = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite2.png';
	        			    //    console.log(fenceimg1);
				        	}else{
				        		fenceimg1 = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite.png';
				        	plane2se.rotate(new BABYLON.Vector3(80, 0, 0), 1.5);
			        		plane2se.position.x =1.387;
        					plane2se.position.y =-0.150;
        					plane2se.position.z=-1.5;
        				}
				        
				        }else{
							plane2se.rotate(new BABYLON.Vector3(0, 0.2, 0), 4.5);
							plane2se.position.x =-0.2;
							fencecount = counttt[0].split('.');
					        	if(fencecount[0] > 5){
					        		fenceyposition = fencecount[0]*0.22;
					        	}else if(fencecount[0] <= 2){
					        		fenceyposition = 2*0.6;
					        	}else{
					        		fenceyposition = fencecount[0]*0.33;
					        	}
							 if(getimagename == 'ALU_GreyProfil_BlackStolpe'){
								if(fencecount[0] == 1){
											plane2se.position.y =0.5;											
										}else if(fencecount[0] == 2){
											plane2se.position.y =0.6;											
										}else if(fencecount[0] == 3){
											plane2se.position.y =0.7;											
										}else if(fencecount[0] == 4){
											plane2se.position.y =0.6;											
										}
										else if(fencecount[0] == 5 || fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 9){
											plane2se.position.y =0.8;											
										}else if(fencecount[0] == 8){
											plane2se.position.y =1;											
										}
										else if(fencecount[0] == 10){
											plane2se.position.y =1;											
										}else if(fencecount[0] == 13){
											plane2se.position.y =1.5;											
										}
										else if(fencecount[0] > 10){
											plane2se.position.y =0;											
										}
							 }else if(getimagename == 'ALU_BlackProfil_SilverStolpe'){
							 	fencecount = counttt[0].split('.');
							        	if(fencecount[0] > 5){
							        		fenceyposition = fencecount[0]*0.024;
							        	}else if(fencecount[0] <= 2){
							        		fenceyposition = 0.9;
							        	}else{
							        		fenceyposition = fencecount[0]*0.12;
							        	}
										if(fencecount[0]==1){
										plane2se.position.y =0.3;
										}else if(fencecount[0]==2){
											plane2se.position.y =0.3;
										}else if(fencecount[0]==3){
											plane2se.position.y =0.3;
										}else if(fencecount[0]==4){
											plane2se.position.y =0.2;
										}else{
										plane2se.position.y =-fenceyposition;
										}
							 	
							 }else if(getimagename == 'ALU_GreyProfil__SilverStolpe'){
							 	/*fencecount = counttt[0].split('.');
							        	if(fencecount[0] > 5){
							        		fenceyposition = fencecount[0]*0.024;
							        	}else if(fencecount[0] <= 2){
							        		console.log(fencecount[0]);
							        		fenceyposition = 0.9;
							        	}else{
							        		fenceyposition = fencecount[0]*0.12;
							        	}*/
										fencecount = counttt[0].split('.');
										if(fencecount[0] == 3){
										plane2se.position.y =  0.7;
										}
										else if(fencecount[0] == 6){
										plane2se.position.y = 0.8;	
										}else if(fencecount[0] == 8){
										plane2se.position.y =  -0.3;	
										}else{
								 	 	plane2se.position.y =fenceyposition/2;											
									}
									
							 	
							 }else if(getimagename == 'ALU_BlackProfil_BlackStolpe1'){
							 	if(fencecount[0] == 1){
									plane2se.position.y =0.5;											
								}else if(fencecount[0] == 2){
									plane2se.position.y =0.6;											
								}else if(fencecount[0] == 3){
									plane2se.position.y =0.7;											
								}else if(fencecount[0] == 4){
									plane2se.position.y =0.6;											
								}
								else if(fencecount[0] == 5 || fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 9){
									plane2se.position.y =0.8;											
								}else if(fencecount[0] == 8){
									plane2se.position.y =1;											
								}
								else if(fencecount[0] == 10){
									plane2se.position.y =1;											
								}
								else if(fencecount[0] > 10){
									plane2se.position.y =1.2;											
								}
							 }else{
							plane2se.position.y =-0.300;}
							plane2se.position.z=1.400;
							fenceimg1 = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite.png';
						}
						plane2se.width = "70px";
                       plane2se.height = "70px";
					   var advancedTexturee = BABYLON.GUI.AdvancedDynamicTexture.CreateForMesh(plane);
					   var advancedTexturee01 = BABYLON.GUI.AdvancedDynamicTexture.CreateForMesh(plane2se);
                  	   var rect12 = new BABYLON.GUI.Rectangle();
                          rect12.width = "70px";
                          rect12.height = "70px";
                          rect12.cornerRadius = 0;
                          rect12.value = index_id;   
                          rect12.thickness = 0;
                          advancedTexturee.addControl(rect12);

                          var rect012 = new BABYLON.GUI.Rectangle();
                          rect012.width = "70px";
                          rect012.height = "70px";
                          rect012.cornerRadius = 0;
                          rect012.value = index_id;   
                          rect012.thickness = 0;
                          rect012._rotation=0;
                          rect012.horizontal = 'center';
                          rect012.vertical = 'center';
                          rect012._rotation=0;
                          advancedTexturee01.addControl(rect012);
						  var button2=0;
                  	    // var button2 = BABYLON.GUI.Button.CreateImageOnlyButton(
//                            "but"+index_id,                    
//        					fenceimg
//                            );
                             button2.onPointerUpObservable.add(function() {
                               file2 = 2;
                            // alert(index_id);
                                id = index_id22;
							    xposition = index_id22*1.83;
                                yposition = 0.915;
                          
							  load_service_PopupBox1(file2,index_id22,xposition,yposition,scene,mesh,button2,advancedTexturee,mesh,button2,advancedTexturee);
							});
                             button2.thickness = 0;
							 var button02=0;
                             //var button02 = BABYLON.GUI.Button.CreateImageOnlyButton(
//                            "butt"+index_id,                    
//        					fenceimg1
//                            );
                             button02.onPointerUpObservable.add(function() {
                               file2 = 2;
                            // alert(index_id);
                                id = index_id22;
							    xposition = index_id22*1.83;
                                yposition = 0.915;
                          
							  load_service_PopupBox1(file2,index_id22,xposition,yposition,scene,mesh,button02,advancedTexturee01,mesh,button02,advancedTexturee01);
							});
                         button02.thickness = 0;
                         
                             rect12.addControl(button2);
                             rect12.linkWithMesh(newInstancel);
                          	 rect012.addControl(button02);
                          	 rect012.linkWithMesh(newInstancel);   
	                        camera.upperBetaLimit = Math.PI /2;
	                   		camera.lowerRadiusLimit = 4;
                 
							plane.addLODLevel(30, null); 
							plane2se.addLODLevel(30, null); 
                  	});
				 }

				 
				
				 if(squere > 0){
				 	 col1 = 0;
				 	 col2in = 0;
				 	col3in = 0;
				 	jQuery.each(color1,function(key , value){
				 			if(value == 'door'){
				 				col1 = 1;
				 			}
				 	});
				 	jQuery.each(color3,function(key , value){
				 			if(value == 'door'){
				 				col3in = 1;
				 			}
				 	});
				 	jQuery.each(color2,function(key , value){
				 			if(value == 'door'){
				 				col2in = 1;
				 			}
				 	});

				 	if(col1 == '1' && col3in == '1' && col2in =='1'){
				 		instanceCountl = instanceCountl-0.50;
				 	}
				 }else{
				 	jQuery.each(color2 ,function(key ,value){
							 	
				 	if(value == 'door'){
				 		instanceCountl = instanceCountl-0.50;
				 	}
				 });
				 }
			
				data_id3 = 0;
		        
	        for (var index3 = 0; index3 < instanceCountu; index3++) {
	            const index_id3 = index3;
	            const index_idd3 = index3;
	                       if(row3_array.length >0 ){
	                    	if(row3_array[index_id3] == index_id3 && color3[index_id3] == 'door'){
	                    		scene_custom.dispose();
	                    			glb_data3 = custom_height_image3[index_id3];
	                    		}else{
	                    	 		scene_custom.dispose();
	                			if(custom_height_image3[index_id3] == undefined){
	                				glb_data3 = row_url_3;
	                			}else{
	                				glb_data3 = custom_height_image3[index_id3];
	                			}
	                			
	                    	  }
	                	}else{
	                		glb_data3 = row_url_3;
	            		}
	
		        		var glbdatasplit = glb_data3.split('/');
				        const getimagename = glbdatasplit[8];
			            const counttt = glbdatasplit[9].split('_').slice(-1);
   			    		 url = glbdatasplit.slice(0, -1);
				 
				    seturl = url.join('/')+'/';
				    console.log(seturl);
				     filename3 = glbdatasplit[9];
				     console.log(filename3);
				    	BABYLON.SceneLoader.ImportMesh("", "",glb_data3, scene, function (newMeshesu) {
				    	  var mesh3 = null;
				    	   var mesh3 = newMeshesu[1]; 
		    	     	    mesh3.isVisible = false;
			    	      	var newInstanceu3 = mesh3.createInstance("fenceu" + index_id3);
			    	      	
			    	      		
		    	      		newInstanceu3.position.x = instanceCountl*1.83-0.915;
		    	           // newInstanceu3.position.z = index_id3*-1.83;
		    	             if(row3_array.length > 0){
								 if(color3[index_idd3] == 'door'){
							 		newInstanceu3.position.y = 0.8;
							 	}
								 datarow3 = loadarray3(row3_array1,index_idd3);
								checkforfence3 = 0;
								door_id3 = 0;
								jQuery.each(color3 ,function(key,value){
									if(value == 'door'){
										checkforfence3 = 1;
										door_id3 = key;
									}
								});
								
								 if(checkforfence3 == 1){
											if(color3[index_idd3] == 'door'){
												newInstanceu3.position.z = (index_idd3*-1.83+0.433);	
											}else{
												if(door_id3 < index_idd3){
													newInstanceu3.position.z = (index_idd3*-1.83+0.855);
												}else if(door_id3 > index_idd3){
													newInstanceu3.position.z = (index_idd3*-1.83);
												}
											}
										}else{
											newInstanceu3.position.z = (index_idd3*-1.83);		
										}
	                  	    }else{
								newInstanceu3.position.z = index_idd3*-1.83;
						 	 }
						  //not used
						  if(data_id3 == '1'){
                            if(color3[index_id3] == 'door'){
	                            newInstanceu3.position.z = (index_idd3*-1.83+0.43);  
	                          }else{
	                            newInstanceu3.position.z = (index_idd3*-1.83+0.855);   
	                          }
                          }else if(data_id3 == '0'){
                            //newInstance.position.z = (index_id1*-1.83);
                          }else{
                          }
                          //not used
                          	 var plane = BABYLON.Mesh.CreatePlane("plane"+index_idd3, 3);
						        plane.parent = newInstanceu3;
                           if(color3[index_id3] == 'door'){
                           	checked = custom_height_image3[index_id3].split('/');
				        
				        	if(checked[9] =='Door_1_tex_2.glb'){
				        		
			        		plane.rotate(new BABYLON.Vector3(100, 0.2, 0), 1.5);
				        	plane.position.x =1.387;
        					plane.position.y =-0.300;
        					plane.position.z=-1.5;
        					
	        					fenceimg = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite0.png';
	        					
				        	}else if((checked[9] =='Door_2_tex_1.glb')){
				        		plane.rotate(new BABYLON.Vector3(100, 0.2, 0), 1.5);
				        	plane.position.x =1.387;
        					plane.position.y =-0.300;
        					plane.position.z=-1.5;
        					
	        			        fenceimg = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite0.png';
	        			       
				        	}else if((checked[9] == 'Door_2_tex_2.glb')){
				        		plane.rotate(new BABYLON.Vector3(100, 0.2, 0), 1.5);
				        	plane.position.x =1.387;
        					plane.position.y =-0.300;
        					plane.position.z=-1.5;
        					
	        			        fenceimg = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite2.png';
	        			    
				        	}else if((checked[9] == 'Door_1_tex_1.glb')){
				        	plane.rotate(new BABYLON.Vector3(100, 0.2, 0), 1.5);
				        	plane.position.x =1.387;
        					plane.position.y =-0.300;
        					plane.position.z=-1.5;
        					
	        			        fenceimg = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite2.png';
	        			    
				        	}else{
				        		fenceimg = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite.png';
				        	plane.rotate(new BABYLON.Vector3(100, 0.2, 0), 1.5);
				        	plane.position.x =1.387;
        					plane.position.y =-0.300;
        					plane.position.z=-1.5;
        					
        				}
				        	
				        }else{
									plane.rotate(new BABYLON.Vector3(0, 0.2, 0), 1.5);
								plane.position.x =0;
								fencecount = counttt[0].split('.');
							        	if(fencecount[0] > 5){
							        		
							        		fenceyposition = fencecount[0]*0.22;
							        	}else if(fencecount[0] <= 2){
							        		
							        		
							        		fenceyposition = 2*0.6;
							        	}else{
							        		
							        		fenceyposition = fencecount[0]*0.33;
							        	}
								 if(getimagename == 'ALU_BlackProfil_SilverStolpe'){
								 	fencecount = counttt[0].split('.');
							         	if(fencecount[0] > 5){
							         		fenceyposition = fencecount[0]*0.024;
							         	}else if(fencecount[0] <= 2){
							         		
							         		fenceyposition = 0.9;
							         	}else{
							         		fenceyposition = fencecount[0]*0.12;
							         	}
										if(fencecount[0]==1){
										plane.position.y =0.3;
										}else if(fencecount[0]==2){
											plane.position.y =0.3;
										}else if(fencecount[0]==3){
											plane.position.y =0.3;
										}else if(fencecount[0]==4){
											plane.position.y =0.2;
										}else{
										plane.position.y =-fenceyposition;
												}
									
								}else if(getimagename == 'ALU_GreyProfil__SilverStolpe'){ 
									/*fencecount = counttt[0].split('.');
							        	if(fencecount[0] > 5){
							        		fenceyposition = fencecount[0]*0.024;
							        	}else if(fencecount[0] <= 2){
							        		console.log(fencecount[0]);
							        		fenceyposition = 0.9;
							        	}else{
							        		fenceyposition = fencecount[0]*0.12;
							        	}*/
											fencecount = counttt[0].split('.');
											
										if(fencecount[0] == 3){
										plane.position.y =  0.7;
										}
										else if(fencecount[0] == 6){
										plane.position.y = 0.8;	
										}else if(fencecount[0] == 8){
										plane.position.y =  -0.3;	
										}else{
								 	 	plane.position.y =fenceyposition/2;											
									}
									
								}else if(getimagename == 'ALU_BlackProfil_BlackStolpe1'){
										
								if(fencecount[0] == 1){
									plane.position.y =0.5;											
								}else if(fencecount[0] == 2){
									plane.position.y =0.6;											
								}else if(fencecount[0] == 3){
									plane.position.y =0.7;											
								}else if(fencecount[0] == 4){
									plane.position.y =0.6;											
								}
								else if(fencecount[0] == 5 || fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 9){
									plane.position.y =0.8;											
								}else if(fencecount[0] == 8){
									plane.position.y =1;											
								}
								else if(fencecount[0] == 10){
									plane.position.y =1;											
								}
								else if(fencecount[0] > 10){
									plane.position.y =1.2;											
								}
								 }else if(getimagename == 'ALU_GreyProfil_BlackStolpe'){
								 	fencecount = counttt[0].split('.');
				        	if(fencecount[0] > 5){
				        		fenceyposition = fencecount[0]*0.024;
				        	}else if(fencecount[0] <= 2){
				        		
				        		fenceyposition = 0.9;
				        	}else{
				        		fenceyposition = fencecount[0]*0.12;
				        	}
								//plane.position.y =-fenceyposition;
								if(fencecount[0] == 1){
											plane.position.y =0.5;											
										}else if(fencecount[0] == 2){
											plane.position.y =0.6;											
										}else if(fencecount[0] == 3){
											plane.position.y =0.7;											
										}else if(fencecount[0] == 4){
											plane.position.y =0.6;											
										}
										else if(fencecount[0] == 5 || fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 9){
											plane.position.y =0.8;											
										}else if(fencecount[0] == 8){
											plane.position.y =1;											
										}
										else if(fencecount[0] == 10){
											plane.position.y =1;											
										}else if(fencecount[0] == 13){
											plane.position.y =1.5;											
										}
										else if(fencecount[0] > 10){
											plane.position.y =0;												
										}
								}else{
								plane.position.y =-0.300;	
								}
								
								plane.position.z=-1.35;
								// plane.width = "100px";
		      //                   plane.height = "100px";
		                        fenceimg = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite.png';
		                    }
		                        var plane2 = BABYLON.Mesh.CreatePlane("plane2"+index_idd3, 3);
						        plane2.parent = newInstanceu3;
						         if(color3[index_id3] == 'door'){
						         	
						         	if(checked[9] =='Door_1_tex_2.glb'){
							        		
							        		plane2.rotate(new BABYLON.Vector3(100, 0.2, 0), 1.5);
							        	plane2.position.x =1.387;
			        					plane2.position.y =0.200;
			        					plane2.position.z=-1.5;
			        					
			        					fenceimg1 = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite3.png';
				        					
							        	}else if((checked[9] =='Door_2_tex_1.glb')){
							        		plane2.rotate(new BABYLON.Vector3(100, 0.2, 0), 1.5);
							        	plane2.position.x =1.387;
			        					plane2.position.y =0.200;
			        					plane2.position.z=-1.5;
			        					//console.log(plane2);
				        			        fenceimg1 = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite.png';
				        			       
							        	}else if((checked[9] == 'Door_2_tex_2.glb')){
							        		plane2.rotate(new BABYLON.Vector3(100, 0.2, 0), 1.5);
							        	plane2.position.x =1.387;
			        					plane2.position.y =0.200;
			        					plane2.position.z=-1.5;
			        					
			        			        fenceimg1 = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite4.png';
				        			      
							        	}else if((checked[9] == 'Door_1_tex_1.glb')){
							        	plane2.rotate(new BABYLON.Vector3(100, 0.2, 0), 1.5);
							        	plane2.position.x =1.387;
			        					plane2.position.y =0.200;
			        					plane2.position.z=-1.5;
			        					
				        			        fenceimg1 = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite4.png';
				        			      
							        	}else{
							        		fenceimg1 = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite.png';
							        	plane2.rotate(new BABYLON.Vector3(100, 0.2, 0), 1.5);
							        	plane2.position.x =1.387;
			        					plane2.position.y =0.200;
			        					plplane2ane.position.z=-1.5;
			        					

			        				}
				        
					        	
					        }else{
								plane2.rotate(new BABYLON.Vector3(0, 0.2, 0), 4.6);
								fenceimg1 = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite.png';
								
								plane2.position.x =0.200;
								fencecount = counttt[0].split('.');
							        	if(fencecount[0] > 5){
							        		
							        		fenceyposition = fencecount[0]*0.22;
							        	}else if(fencecount[0] <= 2){
							        		
							        		fenceyposition = 2*0.6;
							        	}else{
							        		
							        		fenceyposition = fencecount[0]*0.33;
							        	}
								 if(getimagename == 'ALU_BlackProfil_SilverStolpe'){
								 	fencecount = counttt[0].split('.');
							         	if(fencecount[0] > 5){
							         		fenceyposition = fencecount[0]*0.024;
							         	}else if(fencecount[0] <= 2){
							         	
							         		fenceyposition = 0.9;
							         	}else{
							         		fenceyposition = fencecount[0]*0.12;
							         	}
											if(fencecount[0]==1){
										plane2.position.y =0.3;
										}else if(fencecount[0]==2){
											plane2.position.y =0.3;
										}else if(fencecount[0]==3){
											plane2.position.y =0.3;
										}else if(fencecount[0]==4){
											plane2.position.y =0.2;
										}else{
										plane2.position.y =-fenceyposition;
												}
									
								}else if(getimagename == 'ALU_GreyProfil__SilverStolpe'){
									
											fencecount = counttt[0].split('.');
											
										if(fencecount[0] == 3){
										plane2.position.y =  0.7;
										}
										else if(fencecount[0] == 6){
										plane2.position.y = 0.8;	
										}else if(fencecount[0] == 8){
										plane2.position.y =  -0.3;	
										}else{
								 	 	plane2.position.y =fenceyposition/2;											
									}
									
										
								}else if(getimagename == 'ALU_BlackProfil_BlackStolpe1'){
									/*	fencecount = counttt[0].split('.');
				        	if(fencecount[0] > 5){
				        		fenceyposition = fencecount[0]*0.024;
				        	}else if(fencecount[0] <= 2){
				        		console.log(fencecount[0]);
				        		fenceyposition = 0.9;
				        	}else{
				        		fenceyposition = fencecount[0]*0.12;
				        	}*/
							if(fencecount[0] == 1){
									plane2.position.y =0.5;											
								}else if(fencecount[0] == 2){
									plane2.position.y =0.6;											
								}else if(fencecount[0] == 3){
									plane2.position.y =0.7;											
								}else if(fencecount[0] == 4){
									plane2.position.y =0.6;											
								}
								else if(fencecount[0] == 5 || fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 9){
									plane2.position.y =0.8;											
								}else if(fencecount[0] == 8){
									plane2.position.y =1;											
								}
								else if(fencecount[0] == 10){
									plane2.position.y =1;											
								}
								else if(fencecount[0] > 10){
									plane2.position.y =1.2;											
								}
							
							
								 }else if(getimagename == 'ALU_GreyProfil_BlackStolpe'){ 
								 	
								if(fencecount[0] == 1){
									plane2.position.y =0.5;											
								}else if(fencecount[0] == 2){
									plane2.position.y =0.6;											
								}else if(fencecount[0] == 3){
									plane2.position.y =0.7;											
								}else if(fencecount[0] == 4){
									plane2.position.y =0.6;											
								}
								else if(fencecount[0] == 5 || fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 9){
									plane2.position.y =0.8;											
								}else if(fencecount[0] == 8){
									plane2.position.y =1;											
								}
								else if(fencecount[0] == 10){
									plane2.position.y =1;											
								}
								else if(fencecount[0] > 10){
									plane2.position.y =1.2;											
								}
								
								
								 	fencecount = counttt[0].split('.');
				        	if(fencecount[0] > 5){
				        		fenceyposition = fencecount[0]*0.024;
				        	}else if(fencecount[0] <= 2){
				        		
				        		fenceyposition = 0.9;
				        	}else{
				        		fenceyposition = fencecount[0]*0.12;
				        	}
								//plane.position.y =-fenceyposition;
								if(fencecount[0] == 1){
											plane2.position.y =0.5;											
										}else if(fencecount[0] == 2){
											plane2.position.y =0.6;											
										}else if(fencecount[0] == 3){
											plane2.position.y =0.7;											
										}else if(fencecount[0] == 4){
											plane2.position.y =0.6;											
										}
										else if(fencecount[0] == 5 || fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 9){
											plane2.position.y =0.8;											
										}else if(fencecount[0] == 8){
											plane2.position.y =1;											
										}
										else if(fencecount[0] == 10){
											plane2.position.y =1;											
										}else if(fencecount[0] == 13){
											plane2.position.y =1.5;											
										}
										else if(fencecount[0] > 10){
											plane2.position.y =0;												
										}
								
								
													 
							}else{
									plane2.position.y =-0.300;
								}
								plane2.position.z=1.4;
	    						}
	    						console.log(plane2);
							
							   var advancedTexture = BABYLON.GUI.AdvancedDynamicTexture.CreateForMesh(plane);
							   var advancedTexture01 = BABYLON.GUI.AdvancedDynamicTexture.CreateForMesh(plane2);
	                  	    
	                 		var rect1 = new BABYLON.GUI.Rectangle();
	                        rect1.width = "70px";
	                        rect1.height = "70px";
	                        rect1.cornerRadius = 0;
	                        rect1.thickness = 0;
	                        advancedTexture.addControl(rect1);
	                        var rect01 = new BABYLON.GUI.Rectangle();
	                        rect01.width = "70px";
	                        rect01.height = "70px";
	                        rect01.cornerRadius = 0;
	                        rect01.thickness = 0;
	                        advancedTexture01.addControl(rect01);
							var button1=0;
	                       // var button1 = BABYLON.GUI.Button.CreateImageOnlyButton(
//	                            "but"+index_id3,                    
//	        					fenceimg
//	                        );
	                        button1.onPointerUpObservable.add(function() {
	                             file3 = 3;
	                             id = index_idd3;
								 xposition = instanceCountl*1.83-0.915;
	                                 yposition = index_idd3*-1.83;
	                            
	                             load_service_PopupBox1(file3,index_idd3,xposition,yposition,scene,mesh3,button1,advancedTexture);
	                        });
							
							var button01=0;
	                        //var button01 = BABYLON.GUI.Button.CreateImageOnlyButton(
//	                            "butt"+index_id3,                    
//	        					fenceimg1
//	                        );
	                        button01.onPointerUpObservable.add(function() {
	                             file3 = 3;
	                             id = index_idd3;
								 xposition = instanceCountl*1.83-0.915;
	                                 yposition = index_idd3*-1.83;
	                            
	                             load_service_PopupBox1(file3,index_idd3,xposition,yposition,scene,mesh3,button01,advancedTexture01);
	                        });
	                         button1.thickness = 0;
	                         button01.thickness = 0;
	                        rect1.addControl(button1);
	                        rect1.linkWithMesh(newInstanceu3);  
                            rect01.addControl(button01);
	                        rect01.linkWithMesh(newInstanceu3);   
	                      
	                  	     camera.upperBetaLimit = Math.PI /2;
	                    	camera.lowerRadiusLimit = 4;
	                    	plane.addLODLevel(30, null); 
							plane2.addLODLevel(30, null); 
	                    	setTimeout(function(){},3000);
				    	});
	        }
	        	col3 = 0;
	        	col = 0;
	        	col2 = 0;
	        	col4 = 0;
	        	var instanceCounti23 = 0;
	        	jQuery.each(color1 ,function(key ,value){
	        		if(value == 'door'){
	        			col = 1;
	        		}
	        	});
	        	jQuery.each(color2 ,function(key ,value){
	        		if(value == 'door'){
	        			col2 = 1;
	        		}
	        	});
	        	jQuery.each(color3 ,function(key ,value){
	        		if(value == 'door'){
	        			col3 = 1;
	        		}
	        	});
	        	jQuery.each(color3 ,function(key ,value){
	        		if(value == 'door'){
	        			col4 = 1;
	        		}
	        	});
	        	if(col == '1' && col2 == '1' && col3 == '1' && col4 == '1'){
	        		instanceCounti23 = 0.8;
	        	}else if(col == '1' && col3 == '1'){
	        		instanceCounti23 = 0.8;
	        	}
	        	data_id4 = 0;
	           for (var index34 = 0; index34 < squere; index34++) {
				     var mesh = '';
				     const index_id = index34;
				    const index_id332 = index34;
				        //glb_data = row_url_4;
						if(row4_array.length >0 ){

	                    	if(row4_array[index_id] == index_id && color4[index_id] == 'door'){
	                    		
	                    		scene_custom.dispose();
	                    		//glb_data = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb';
	                    		glb_data = custom_height_image4[index_id];
	                    		}else{
	                    			
	                			scene_custom.dispose();
	                			if(custom_height_image4[index_id] == undefined){
		                			glb_data= row_url_4;
		                			}else{
		                				glb_data = custom_height_image4[index_id];
		                			}
	                			
	                    	  }
	                	}else
	                	{
							glb_data = row_url_4;
	            		}
						
				    var glbdatasplit = glb_data.split('/');
			        const getimagename = glbdatasplit[8];
			         const counttt = glbdatasplit[9].split('_').slice(-1);
		         	 url = glbdatasplit.slice(0, -1);
				    
				    seturl = url.join('/')+'/';
				    filename4 = glbdatasplit[9];
				    BABYLON.SceneLoader.ImportMesh("", "",glb_data, scene, function (newMeshesl) { 
				    	var mesh = null;
		           	    var mesh = newMeshesl[1];
		            	 mesh.isVisible = false;
			       	    var newInstancel = mesh.createInstance("fenceo" + index_id);
						   value12 = 0;
					      for(i = 1; i <= instanceCounti; i++){
					         if(i == 1){
					             value12 += 0.95;
					         }else{
					              value12 += 1.80;
					         }
					        
					      }
					      value12 = value12-instanceCounti23;
					      
                       newInstancel.position.z = -value12;
                        if(row4_array.length > 0){
                        	if(color4[index_id] == 'door'){
						 		//newInstancel.position.y = 1.05;
								newInstancel.position.y = 0.8;
						 	}
							 if(color4[index_id] == 'door'){
                  	    	 newInstancel.rotate(new BABYLON.Vector3(0, 0, -10),  Math.PI *0.50);
							 	newInstancel.rotation.x  =10;
								newInstancel.rotation.y  =0;
								newInstancel.rotation.z  =0;
							 
							}else{
                  	     	 newInstancel.rotate(new BABYLON.Vector3(0, 1, 0), Math.PI * 0.50);
								newInstancel.rotation.x  = 0;
							}
								checkforfence = 0;
								door_id = 0;
								jQuery.each(color4 ,function(key,value){

									if(value == 'door'){
										checkforfence = 1;
										door_id = key;
									}
								});
								 if(checkforfence == 1){
											if(color4[index_id332] == 'door'){
												newInstancel.position.x = (index_id332*1.83-0.433);	
											}else{
												if(door_id < index_id332){
												newInstancel.position.x = (index_id332*1.83-0.855);
												}else if(door_id > index_id332){
												newInstancel.position.x = (index_id332*1.83);
												}
											}
										}else{
											newInstancel.position.x = (index_id332*1.83);		
										}
							}else {
								newInstancel.position.x = index_id332*1.83;
	                	 		 // newInstancel.rotate(new BABYLON.Vector3(0, 1, 0), Math.PI * 0.50);
								   newInstancel.rotate(new BABYLON.Vector3(0, -10, 0), Math.PI * 0.50);
	                  	    }
							

                  	    if(data_id4 == '1'){
                            if(color4[index_id332] == 'door'){
                          newInstancel.position.x = (index_id332*1.83-0.43);  
                          }else{
                            
							
                           // newInstancel.rotate(new BABYLON.Vector3(0, 1, 0), Math.PI * 0.50);  
                          }
                          }else{
                            if(index_id332 == 0)
							{
							newInstancel.position.x	=(index_id332*1.83); 
							}else{
								newInstancel.position.x	=(index_id332*1.83); 
								}
							
                           // newInstancel.rotate(new BABYLON.Vector3(0, 1, 0), Math.PI * 0.50);  
                          }
						  newInstancel.position.z=index_idd3*-1.83-0.9;
						  console.log("data_id4"+data_id4);
console.log("index_id332"+index_id332);
console.log("newInstancel.position.x"+newInstancel.position.x);
console.log("newInstancel.position.y"+newInstancel.position.y);
console.log("newInstancel.position.z"+newInstancel.position.z);
                      
                  	 //  newInstancel.rotate(new BABYLON.Vector3(0, 1, 0), Math.PI * 0.50);
                  	  var plane = BABYLON.Mesh.CreatePlane("plane"+index_id332, 3);
				        plane.parent = newInstancel;
				          if(color4[index_id332] == 'door'){
				          	  	checked = custom_height_image4[index_id332].split('/');
				        	
				        	if(checked[9] =='Door_1_tex_2.glb'){
				        	
				        		plane.rotate(new BABYLON.Vector3(100, 0.2, 0), 1.5);
				        	plane.position.x =1.387;
        					plane.position.y =0.3;
        					plane.position.z=-1.5;
        					
	        					fenceimg = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite3.png';
	        				
				        	}else if((checked[9] =='Door_2_tex_1.glb')){
				        		plane.rotate(new BABYLON.Vector3(100, 0.2, 0), 1.5);
				        	plane.position.x =1.387;
        					plane.position.y =0.3;
        					plane.position.z=-1.5;
        					
	        			        fenceimg = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite3.png';
        					
				        	}else if((checked[9] == 'Door_2_tex_2.glb')){
				        		plane.rotate(new BABYLON.Vector3(100, 0.2, 0), 1.5);
				        	plane.position.x =1.387;
        					plane.position.y =0.3;
        					plane.position.z=-1.5;
        					
	        			        fenceimg = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite4.png';
        					
				        	}else if((checked[9] == 'Door_1_tex_1.glb')){
				        	plane.rotate(new BABYLON.Vector3(100, 0.2, 0), 1.5);
				        	plane.position.x =1.387;
        					plane.position.y =0.3;
        					plane.position.z=-1.5;
        					
	        			        fenceimg = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite4.png';
				        	}else{
				        		fenceimg = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite.png';
				        	plane.rotate(new BABYLON.Vector3(100, 0.2, 0), 1.5);
				        	plane.position.x =1.387;
        					plane.position.y =0.3;
        					plane.position.z=-1.5;
        					
        				}
					        
					        }else{
									plane.rotate(new BABYLON.Vector3(0, 0.2, 0), 1.5);
									plane.position.x =0;
									fencecount = counttt[0].split('.');
							        	if(fencecount[0] > 5){
							        		
							        		fenceyposition = fencecount[0]*0.22;
							        	}else if(fencecount[0] <= 2){
							        	
							        		fenceyposition = 2*0.6;
							        	}else{
							        		
							        		fenceyposition = fencecount[0]*0.33;
							        	}
									 if(getimagename == 'ALU_BlackProfil_SilverStolpe'){
									 	fencecount = counttt[0].split('.');
							        	if(fencecount[0] > 5){
							        		fenceyposition = fencecount[0]*0.024;
							        	}else if(fencecount[0] <= 2){
							        		
							        		fenceyposition = 0.9;
							        	}else{
							        		fenceyposition = fencecount[0]*0.12;
							        	}
											if(fencecount[0]==1){
										plane.position.y =0.3;
										}else if(fencecount[0]==2){
											plane.position.y =0.3;
										}else if(fencecount[0]==3){
											plane.position.y =0.3;
										}else if(fencecount[0]==4){
											plane.position.y =0.2;
										}else{
										plane.position.y =-fenceyposition;
												}
									
								}else if(getimagename == 'ALU_GreyProfil__SilverStolpe'){
									
											fencecount = counttt[0].split('.');
												//console.log(fencecount);
										if(fencecount[0] == 3){
										plane.position.y =  0.7;
										}
										else if(fencecount[0] == 6){
										plane.position.y = 0.8;	
										}else if(fencecount[0] == 8){
										plane.position.y =  -0.3;	
										}else{
								 	 	plane.position.y =fenceyposition/2;											
									}
									
								}else if(getimagename == 'ALU_BlackProfil_BlackStolpe1'){
										fencecount = counttt[0].split('.');
				        	if(fencecount[0] > 5){
				        		fenceyposition = fencecount[0]*0.024;
				        	}else if(fencecount[0] <= 2){
				        		
				        		fenceyposition = 0.9;
				        	}else{
				        		fenceyposition = fencecount[0]*0.12;
				        	}
							if(fencecount[0] == 1){
									plane.position.y =0.5;											
								}else if(fencecount[0] == 2){
									plane.position.y =0.6;											
								}else if(fencecount[0] == 3){
									plane.position.y =0.7;											
								}else if(fencecount[0] == 4){
									plane.position.y =0.6;											
								}
								else if(fencecount[0] == 5 || fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 9){
									plane.position.y =0.8;											
								}else if(fencecount[0] == 8){
									plane.position.y =1;											
								}
								else if(fencecount[0] == 10){
									plane.position.y =1;											
								}
								else if(fencecount[0] > 10){
									plane.position.y =1.2;											
								}
							 	//plane.position.y =-fenceyposition;
								 }else if(getimagename == 'ALU_GreyProfil_BlackStolpe'){
									//plane.position.y =fenceyposition/2;
									if(fencecount[0] == 1){
											plane.position.y =0.5;											
										}else if(fencecount[0] == 2){
											plane.position.y =0.6;											
										}else if(fencecount[0] == 3){
											plane.position.y =0.7;											
										}else if(fencecount[0] == 4){
											plane.position.y =0.6;											
										}
										else if(fencecount[0] == 5 || fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 9){
											plane.position.y =0.8;											
										}else if(fencecount[0] == 8){
											plane.position.y =1;											
										}
										else if(fencecount[0] == 10){
											plane.position.y =1;											
										}else if(fencecount[0] == 13){
											plane.position.y =1.5;											
										}
										else if(fencecount[0] > 10){
											plane.position.y =0;												
										}
								}else{
									plane.position.y =-0.300;
								}
									plane.position.z=-1.35;
									fenceimg = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite.png';
							}
						// plane.width = "100px";
      //                   plane.height = "100px";
                        var plane2 = BABYLON.Mesh.CreatePlane("plane2"+index_id332, 3);
				        plane2.parent = newInstancel;
				         if(color4[index_id332] == 'door'){
				         	if(checked[9] =='Door_1_tex_2.glb'){
				        		
				        		plane2.rotate(new BABYLON.Vector3(100, 0.2, 0), 1.5);
				        		plane2.position.x =1.387;
	        					plane2.position.y =-0.200;
	        					plane2.position.z=-1.5;
        					
	        					fenceimg1 = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite1.png';
				        	}else if((checked[9] =='Door_2_tex_1.glb')){
				        		plane2.rotate(new BABYLON.Vector3(100, 0.2, 0), 1.5);
				        		plane2.position.x =1.387;
	        					plane2.position.y =-0.200;
	        					plane2.position.z=-1.5;
        					
	        			        fenceimg1 = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite1.png';
				        	}else if((checked[9] == 'Door_2_tex_2.glb')){
				        		plane2.rotate(new BABYLON.Vector3(100, 0.2, 0), 1.5);
				        		plane2.position.x =1.387;
	        					plane2.position.y =-0.200;
	        					plane2.position.z=-1.5;
        					
	        			        fenceimg1 = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite2.png';
				        	}else if((checked[9] == 'Door_1_tex_1.glb')){
				        	plane2.rotate(new BABYLON.Vector3(100, 0.2, 0), 1.5);
				        		plane2.position.x =1.387;
	        					plane2.position.y =-0.200;
	        					plane2.position.z=-1.5;
        					
	        			        fenceimg1 = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite2.png';
				        	}else{
				        		fenceimg1 = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite.png';
				        	plane2.rotate(new BABYLON.Vector3(100, 0.2, 0), 1.5);
				        		plane2.position.x =1.387;
	        					plane2.position.y =-0.200;
	        					plane2.position.z=-1.5;
        					
        				}
					        	
					        }else{
					        	fenceimg1 = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite.png';
						plane2.rotate(new BABYLON.Vector3(0, 0.2, 0), 4.5);
						plane2.position.x =-0.200;
						fencecount = counttt[0].split('.');
							        	if(fencecount[0] > 5){
							        		
							        		fenceyposition = fencecount[0]*0.22;
							        	}else if(fencecount[0] <= 2){
							        		
							        		fenceyposition = 2*0.6;
							        	}else{
							        	
							        		fenceyposition = fencecount[0]*0.33;
							        	}
						if(getimagename == 'ALU_BlackProfil_SilverStolpe'){
							fencecount = counttt[0].split('.');
							        	if(fencecount[0] > 5){
							        		fenceyposition = fencecount[0]*0.024;
							        	}else if(fencecount[0] <= 2){
							        		
							        		fenceyposition = 0.9;
							        	}else{
							        		fenceyposition = fencecount[0]*0.12;
							        	}
											if(fencecount[0]==1){
										plane2.position.y =0.3;
										}else if(fencecount[0]==2){
											plane2.position.y =0.3;
										}else if(fencecount[0]==3){
											plane2.position.y =0.3;
										}else if(fencecount[0]==4){
											plane2.position.y =0.2;
										}else{
										plane2.position.y =-fenceyposition;
												}
								//	plane2.position.y =-fenceyposition;
								}else if(getimagename == 'ALU_GreyProfil__SilverStolpe'){
									/*fencecount = counttt[0].split('.');
							        	if(fencecount[0] > 5){
							        		fenceyposition = fencecount[0]*0.024;
							        	}else if(fencecount[0] <= 2){
							        		console.log(fencecount[0]);
							        		fenceyposition = 0.9;
							        	}else{
							        		fenceyposition = fencecount[0]*0.12;
							        	}*/	
											fencecount = counttt[0].split('.');
												//console.log(fencecount);
										if(fencecount[0] == 3){
										plane2.position.y =  0.7;
										}
										else if(fencecount[0] == 6){
										plane2.position.y = 0.8;	
										}else if(fencecount[0] == 8){
										plane2.position.y =  -0.3;	
										}else{
								 	 	plane2.position.y =fenceyposition/2;											
									}
									
								}else if(getimagename == 'ALU_BlackProfil_BlackStolpe1'){
									
								if(fencecount[0] == 1){
									plane2.position.y =0.5;											
								}else if(fencecount[0] == 2){
									plane2.position.y =0.6;											
								}else if(fencecount[0] == 3){
									plane2.position.y =0.7;											
								}else if(fencecount[0] == 4){
									plane2.position.y =0.6;											
								}
								else if(fencecount[0] == 5 || fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 9){
									plane2.position.y =0.8;											
								}else if(fencecount[0] == 8){
									plane2.position.y =1;											
								}
								else if(fencecount[0] == 10){
									plane2.position.y =1;											
								}
								else if(fencecount[0] > 10){
									plane2.position.y =1.2;											
								}
								 }else if(getimagename == 'ALU_GreyProfil_BlackStolpe'){
									//plane2.position.y =fenceyposition/2;
									if(fencecount[0] == 1){
											plane2.position.y =0.5;											
										}else if(fencecount[0] == 2){
											plane2.position.y =0.6;											
										}else if(fencecount[0] == 3){
											plane2.position.y =0.7;											
										}else if(fencecount[0] == 4){
											plane2.position.y =0.6;											
										}
										else if(fencecount[0] == 5 || fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 9){
											plane2.position.y =0.8;											
										}else if(fencecount[0] == 8){
											plane2.position.y =1;											
										}
										else if(fencecount[0] == 10){
											plane2.position.y =1;											
										}else if(fencecount[0] == 13){
											plane2.position.y =1.5;											
										}
										else if(fencecount[0] > 10){
											plane2.position.y =0;												
										}
								}else {
									plane2.position.y =-0.300;
								}
						
						plane2.position.z=1.5;
							}
						// plane2.width = "100px";
      //                   plane2.height = "100px";
					  // var advancedTexture = BABYLON.GUI.AdvancedDynamicTexture.CreateFullscreenUI("UI");
					   var advancedTexturee = BABYLON.GUI.AdvancedDynamicTexture.CreateForMesh(plane);
					   var advancedTexture01 = BABYLON.GUI.AdvancedDynamicTexture.CreateForMesh(plane2);

                  	   //var advancedTexturee = BABYLON.GUI.AdvancedDynamicTexture.CreateFullscreenUI("UI");
                  	    var rect12 = new BABYLON.GUI.Rectangle();
                            rect12.width = "70px";
                            rect12.height = "70px";
                            rect12.value = index_id;   
                            rect12.thickness = 0;
                            advancedTexturee.addControl(rect12);
                            var rect120 = new BABYLON.GUI.Rectangle();
                            rect120.width = "70px";
                            rect120.height = "70px";
                            rect120.value = index_id;   
                            rect120.thickness = 0;
                            advancedTexture01.addControl(rect120);
							var button2=0;
                  	     //var button2 = BABYLON.GUI.Button.CreateImageOnlyButton(
//                            "but"+index_id,                    
//                            fenceimg
//        					/*""*/
//                            );
                             button2.onPointerUpObservable.add(function() {
                               file4 =4;
                            // alert(index_id);
                                id = index_id;
								 xposition = newInstancel.position.x;
                                 yposition = newInstancel.position.z;
                           
							  load_service_PopupBox1(file4,index_id,xposition,yposition,scene,mesh,button2,advancedTexturee);
						});
						var button02=0;
                            // var button02 = BABYLON.GUI.Button.CreateImageOnlyButton(
//                            "butt"+index_id,                    
//        					fenceimg1
//                            );
                             button02.onPointerUpObservable.add(function() {
                               file4 =4;
                            // alert(index_id);
                                id = index_id;
								 xposition = newInstancel.position.x;
                                 yposition = newInstancel.position.z;
                           
							  load_service_PopupBox1(file4,index_id,xposition,yposition,scene,mesh,button02,advancedTexture01);
						});
                            button2.thickness = 0;
                             button02.thickness = 0;
                             rect12.addControl(button2);
                              rect12.linkWithMesh(newInstancel); 
                              rect120.addControl(button02);
                              rect120.linkWithMesh(newInstancel);   
                             /* rect12.linkOffsetX =newInstancel.position.x;
                             rect12.linkOffsetY = newInstancel.position.z;*/
                         
                         
                  	 //  scene.createDefaultCamera(true, true, true);
                  	 //  scene.createDefaultCamera(true, false, 10);
                  	 //scene.createDefaultCamera(true, true,true);
                  	 plane.addLODLevel(30, null); 
					plane2.addLODLevel(30, null); 
                  	    camera.upperBetaLimit = Math.PI /2;
                    	camera.lowerRadiusLimit = 4;
                  	});
				 }
       
	scene.debugLayer.show({
		 //embedMode: false,
		 embedMode: true,
	});
	//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();
        });
		
		/*engine.onResizeObservable.add(function () {
			
		});*/

        // 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);
        			
        				
        		
});

        function chengelog(xposition ,yposition,scene,index_id,image_name,row_count,custom_mesh,custom_button,custom_advancedTexturee,custom_type){
        	     
        	      BABYLON.SceneLoader.ImportMesh("", "",image_name, scene, function (newMeshesl) { 
					    var mesh = newMeshesl[1];
			        	 mesh.isVisible = false;
			            var newInstancel = mesh.createInstance("fencel" + index_id);
						newInstancel.position.x = xposition;
                        newInstancel.position.z = yposition;
						
                          if(row_count == '2'){
							   if(custom_type == 'door'){
								  
								   newInstancel.rotate(new BABYLON.Vector3(0, 0, -10),  Math.PI *0.5);
								 //  newInstancel.rotation = new BABYLON.Vector3(0, 80, 0);
								   newInstancel.rotation.x  =10;
								  newInstancel.rotation.y  =0;
								  newInstancel.rotation.z  =0;
								  
							   }else{
								   newInstancel.rotate(new BABYLON.Vector3(0, 1, 0), Math.PI * 0.50);								   
							   }
                      	   
						  
                          }
                          if(row_count == '4'){
							   if(custom_type == 'door'){
								  
								   newInstancel.rotate(new BABYLON.Vector3(0, 0, -10),  Math.PI *0.5);
								 //  newInstancel.rotation = new BABYLON.Vector3(0, 80, 0);
								   newInstancel.rotation.x  =10;
								  newInstancel.rotation.y  =0;
								  newInstancel.rotation.z  =0;
								  
							   }else{
                          		newInstancel.rotate(new BABYLON.Vector3(0, 1, 0), Math.PI * 0.50);	
							   }
                          }
                         custom_button.dispose();
                         custom_advancedTexturee.dispose();
                         custom_mesh.dispose();
                         if(custom_type == 'fence'){
                  	    const advancedTexturee = BABYLON.GUI.AdvancedDynamicTexture.CreateFullscreenUI("UI");
                  	    const button2 = BABYLON.GUI.Button.CreateImageOnlyButton(
                            "but"+index_id,                    
        					"https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite.png"
                        );
                         button2.onPointerUpObservable.add(function() {
                              file2 = row_count;
                               id = index_id;
                              xposition = xposition;
                                 yposition =yposition;
                           	 load_service_PopupBox1(file2,id,xposition,yposition,scene,mesh,button2,advancedTexturee);
            			   });
                        var rect12 = new BABYLON.GUI.Rectangle();
                          rect12.width = "15px";
                          rect12.height = "15px";
						  rect12.class = "custom_edit_icon_button";
                          rect12.cornerRadius = 0;
                           rect12.value = index_id;   
                          rect12.background = "white";
                          advancedTexturee.addControl(rect12);
                             rect12.addControl(button2);

                             rect12.linkWithMesh(newInstancel);   
                             rect12.linkOffsetX =xposition;
                             rect12.linkOffsetY = yposition;
                             	  }
                  	
			      	});
					return true;
        	 }

</script>
<div id="gift-wrap-option1" class="gift-wrap-option" style="display:none;">

<div id="ModalTitle"><div class="title" style="width:96%; float: left;"> </div><button id="popupBoxCloseengraving" class="close-popup12" type="button" style="float: right;"><span aria-hidden="true">&times;</span></button></div>

<div class="file-addon-wrap">
</div>
<div id="ModalButtonRow1" style="background-color: rgb(255, 255, 255);">  
<label style="       width: 25%;float: inherit;margin: auto;text-align: justify;    font-weight: 600;margin-top: 15px;">Vælg farve: </label>     
<select class="custom_glb_type">
    <!--<option value="gray" color="gray">Grey</option>-->
    <option value="black" color="black">Black</option>
    <!-- <option value="alublack" color="alublack">ALU BlackProfil BlackStolpe</option>
    <option value="grayblack" color="grayblack">ALU GreyProfil BlackStolpe</option> -->
    
</select>  
<label style="    width: 25%;float: custom_heightinherit;margin: auto;text-align: justify;    font-weight: 600;margin-top: 15px;">Indtast højde: </label> 
<select class="custom_height" name="custom_height" id="custom_height">
    <!--<option value="gray" color="gray">Grey</option>-->
    <option value="1.84">1.84</option>
    <!-- <option value="alublack" color="alublack">ALU BlackProfil BlackStolpe</option>
    <option value="grayblack" color="grayblack">ALU GreyProfil BlackStolpe</option> -->
    
</select> 
<!--<input type="number" id="custom_height" class="custom_height" name="custom_height" value="" placeholder="Højde*" style="margin-bottom:0;">-->
<span class="error_message" style="color:red;display:none;">Højde Field Is Required.</span>
<label style="    width: 25%;float: inherit;margin: auto;text-align: justify;    font-weight: 600;margin-top: 15px;">Vælg type: </label> 
<div class="custom_radio_button">
<input type="radio" id="door" class="custom_type" name="custom_type" value="door"><label for="door">Låge</label></input>

<input type="radio" id="fence" class="custom_type" name="custom_type" value="fence"><label for="fence" checked>Hegn</label></input>
</div>

<input value="Ok" class="custom_ok_button Button close-popup1" style="background-color: rgb(87, 173, 104);    margin-top: 20px; margin-bottom:30px;" type="button">

<br>
<div class="cleardiv"></div>
 </div>
</div>
<div class="shield-engraving1"></div>
<script>
jQuery('.close-popup12').click(function(){
	jQuery('#gift-wrap-option1').hide();
});
jQuery('.close-popup1').click(function(){
            custom_height = jQuery('.custom_height option:selected').val();
           
            jQuery(".error_message").hide();
            unload_service_PopupBox1();
           // myfunction();
             colors = jQuery('.custom_glb_type').attr('color');
             file = jQuery('#ModalButtonRow1').attr('file');
         
            
			 custom_height = jQuery(".custom_height").val();
			 //custom_type = jQuery(".custom_type").val();
			 
			 if($("input[name=custom_type]:checked").val() == "door"){
				   custom_type = 'door';
				  
				   //jQuery(".custom_height").hide();
				}
				else if($("input[name=custom_type]:checked").val() == "fence"){
				     custom_type = 'fence';
				      if(custom_height == ''){
		                jQuery(".error_message").show();
		                return false;
		            }
				}
				name = jQuery('.custom_glb_type').val();
				if(custom_type == ''){
				return false;	
				}
				fencee = jQuery("#fencetype").val();
			 
					 jsondata = JSON.parse(fencee);
					
					  myJsonString={};
					 jQuery.each(jsondata,function(key,value){
					 
					 	if(key == (file-1)){
					 		jQuery.each(value, function( index, valuee ) {
							  if(index == colors){
							  	if(custom_type == 'fence'){
							  		
								  	fencelength = valuee.lengthss;
								  	height = jQuery("#custom_height option:selected").val();
								  	lengthtotal  = fencelength/0.14*height/1.8;
								  	
								  	valuee.heigth = Math.ceil(lengthtotal);	
								  	valuee.f_row_type = 'fence';
								  	if(name == 'gray'){
								  		name = 'grey';
								  	}
								  	valuee.color = name[0].toUpperCase() + name.substr(1);
							  	}else{
							  		
								  	fencelength = valuee.lengthss;
								  	height = jQuery("#custom_height option:selected").val();
								  	lengthtotal  = fencelength/0.14*height/1.8;
								  	
								  	valuee.heigth = 0;	
								  	valuee.f_row_type = 'door';
								  	if(name == 'gray'){
								  		name = 'grey';
								  	}
								  	valuee.color = name[0].toUpperCase() + name.substr(1);
							  	}
							  	
							  }
							});
					 	}else{

					 	}
					 });
					 data = JSON.stringify(jsondata, null, '\t');
					

					  jQuery("#fencetype").val(data);
					
		              
			
		 			
		 			slop = jQuery('.sidebar_calc_box4 img').attr('color_val');
				  heigth = Math.ceil(custom_height/0.14);
				 
				if(custom_type == 'fence'){
						if(name == 'grey' && slop == 'alu'){
							if(heigth > 13){
								images_fence = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil__SilverStolpe/round_I_GLB_silver_grey_v05_13.glb";
							}else{
								images_fence = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil__SilverStolpe/round_I_GLB_silver_grey_v05_"+ heigth +".glb";
							}
						}else if(name == 'grey' && slop == 'black'){
							if(heigth > 13){
								images_fence = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil_BlackStolpe/round_I_GLB_black_grey_v05_13.glb";
							}else{
								images_fence = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GreyProfil_BlackStolpe/round_I_GLB_black_grey_v05_"+ heigth +".glb";
							}
						}else if(name == 'black' && slop == 'black'){
							if(heigth > 13){
								images_fence = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe1/copenhagen.glb";
								//images_fence = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/copenhagen/copenhagen.glb";
							}else{
								images_fence = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe/blackwood_round_black_I_GLB_V05_"+ heigth +".glb";
							}
						}else if(name == 'black' && slop == 'alu'){
							
							if(heigth > 13){
								images_fence = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_SilverStolpe/blackwood_round_silver_I_GLB_V05_13.glb";	
							}else{
								images_fence = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_SilverStolpe/blackwood_round_silver_I_GLB_V05_"+ heigth +".glb";
							}
						}else{
							if(heigth > 13){
								images_fence = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe1/copenhagen.glb";
								//images_fence ="https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/copenhagen/copenhagen.glb"
							}else{
								images_fence = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe/blackwood_round_black_I_GLB_V05_"+ heigth +".glb";
							}
						}	
				}else{
					if(name == 'grey' && slop == 'alu'){
							
							//images_door = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/door/Door_1_tex_1.glb";
							
								images_door = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/door/Door_2_tex_2.glb";
						}else if(name == 'grey' && slop == 'black'){
								images_door = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/door/Door_1_tex_1.glb";
							
						}else if(name == 'black' && slop == 'alu'){
							//images_door = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/door/Door_1_tex_1.glb";
								images_door = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/door/Door_2_tex_1.glb";
							
						}else if(name == 'black' && slop == 'black'){
								images_door = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/door/Door_1_tex_2.glb";
							//images_door = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/door/Door_1_tex_1.glb";
						}else{
							images_door = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/door/Door_1_tex_1.glb";
								//images_door = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/door/Door_1_tex_2.glb";
						}
				}
				

						
				  if(heigth > 13){
				  if(custom_type == 'door'){
				  	//image_name = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1 (1).glb";
					image_name = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
					if(file == '1'){
		               
		                if(row1_array.length == 0){
		                   row1_array1.push(colors);
		                     row1_array[colors]= colors;
		                     color1[colors] = 'door';
		                     custom_height_image1[colors] =images_door; 
		                   

		                }else{
		                   row1_array1.push(colors);
		                     row1_array[colors]= colors; 
		                     color1[colors] = 'door';
		                      custom_height_image1[colors] =images_door;
		                     
		                }
		             }
		             if(file == '2'){
		                if(row2_array.length == 0){
		                	row2_array1.push(colors);
		                    row2_array[colors]= colors;
		                    color2[colors] = 'door';
		                     custom_height_image2[colors] =images_door;
		                   
		                }else{
		                    row2_array1.push(colors);
		                    row2_array[colors]= colors;
		                    color2[colors] = 'door';
		                     custom_height_image2[colors] =images_door;
		                     
		                }
		             }
		              if(file == '3'){
		                if(row3_array.length == 0){
		                	row3_array1.push(colors);
		                    row3_array[colors]= colors;
		                    color3[colors] = 'door';
		                     custom_height_image3[colors] =images_door;
		                    
		                    
		                }else{
		                  row3_array1.push(colors);
		                    row3_array[colors]= colors;
		                    color3[colors] = 'door';
		                     custom_height_image3[colors] =images_door;
		                   
		                    
		                }
		             }
		             if(file == '4'){
		                if(row4_array.length == 0){
		                	row4_array1.push(colors);
		                    row4_array[colors]= colors;
		                    color4[colors] = 'door';
		                     custom_height_image4[colors] =images_door;
		                    
		                }else{
		                   row4_array1.push(colors);
		                   row4_array[colors]= colors;
		                   color4[colors] = 'door';
		                    custom_height_image4[colors] =images_door;
		                    
		                }
		             }

		             
					if(file == 2){
						yposition = yposition_custom;
					}else{
					    yposition = yposition_custom+0.50;
					}
				  }else{
				  	 if(file == '1'){
						 
						 if(row1_array.length == 0){
		                	row1_array1.push(colors);
		                    row1_array[colors]= colors;
		                    color1[colors] = 'fence';
		                     custom_height_image1[colors] =images_fence;
		                     
		                }else{
		                  row1_array1.push(colors);
		                   row1_array[colors]= colors;
		                   color1[colors] = 'fence';
		                    custom_height_image1[colors] =images_fence;
		                    
		                }
					}	 
						 
						 
						 
				  	 	/*row1_array[colors]= colors;
				  	 	color1[colors] = 'fence';
				  	 	row1_array1[colors] = colors;
				  	 	custom_height_image1[colors] =images_fence; */
				  	// }else{
				  	 	/*row1_array[colors]= colors;
				  	 	color1[colors] = 'fence';
				  	 	row1_array1[colors] = colors;
				  	 	custom_height_image1[colors] =images_fence; */
				  	// }

				  	  if(file == '2'){
						  
						  
		                if(row2_array.length == 0){
		                	row2_array1.push(colors);
		                    row2_array[colors]= colors;
		                    color2[colors] = 'fence';
		                    custom_height_image2[colors] =images_fence; 
		                    
		                }else{
		                    row2_array1.push(colors);
		                    row2_array[colors]= colors;
		                    color2[colors] = 'fence';
		                    custom_height_image2[colors] =images_fence; 
		                  
		                }
		             }
		             if(file == '3'){
		                if(row3_array.length == 0){
		                	row3_array1.push(colors);
		                    row3_array[colors]= colors;
		                    color3[colors] = 'fence';
		                    custom_height_image3[colors] =images_fence; 
		                  
		                    
		                }else{
		                   row3_array1.push(colors);
		                    row3_array[colors]= colors;
		                    color3[colors] = 'fence';
		                    custom_height_image3[colors] =images_fence; 
		                  
		                }
		             }
		             if(file == '4'){
		                if(row4_array.length == 0){
		                	row4_array1.push(colors);
		                    row4_array[colors]= colors;
		                    color4[colors] = 'fence';
		                    custom_height_image4[colors] =images_fence; 
		                
		                }else{
		                   row4_array1.push(colors);
		                   row4_array[colors]= colors;
		                   color4[colors] = 'fence';
		                   custom_height_image4[colors] =images_fence; 
		                
		                }
		             }
				  	 
			  		//image_name = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/gray/round_I_GLB_silver_grey_v05_13.glb";
			  		}
		  		 }else{
		    		if(custom_type == 'door'){
				  	//image_name = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1 (1).glb";
					image_name = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
					if(file == '1'){
		               
		                if(row1_array.length == 0){
		                   row1_array[colors]= colors;
		                    color1[colors] = 'door';
		                  row1_array1.push(colors);
		                   custom_height_image1[colors] =images_door;
		                }else{
		                	 row1_array[colors]= colors;
		                	  color1[colors] = 'door';
		                   row1_array1.push(colors);
		                    custom_height_image1[colors] =images_door;
		                    
		                }
		             }
		              if(file == '2'){
		                if(row2_array.length == 0){
		                	row2_array1.push(colors);
		                    row2_array[colors]= colors;
		                    color2[colors] = 'door';
		                     custom_height_image2[colors] =images_door;
		                }else{
		                    row2_array1.push(colors);
		                    row2_array[colors]= colors;
		                    color2[colors] = 'door';
		                     custom_height_image2[colors] =images_door;
		                }
		             }
		             if(file == '3'){
		                if(row3_array.length == 0){
		                	row3_array1.push(colors);
		                    row3_array[colors]= colors;
		                    color3[colors] = 'door';
		                     custom_height_image3[colors] =images_door;
		                }else{
		                  row3_array1.push(colors);
		                    row3_array[colors]= colors;
		                    color3[colors] = 'door';
		                     custom_height_image3[colors] =images_door;
		                }
		             }
		             if(file == '4'){
		                if(row4_array.length == 0){
		                	row4_array1.push(colors);
		                    row4_array[colors]= colors;
		                    color4[colors] = 'door';
		                     custom_height_image4[colors] =images_door;
		                }else{
		                   row4_array1.push(colors);
		                   row4_array[colors]= colors;
		                   color4[colors] = 'door';
		                    custom_height_image4[colors] =images_door;
		                }
		             }

					if(file == 2){
						yposition = yposition_custom;
					}else{
					yposition = yposition_custom+0.50;
					}
				  }else{
				  	if(file == '1'){
		               
		                if(row1_array.length == 0){
		                   row1_array[colors]= colors;
		                    color1[colors] = 'fence';
		                  row1_array1.push(colors);
		                  custom_height_image1[colors] =images_fence; 
		                }else{
		                	 row1_array[colors]= colors;
		                	   color1[colors] = 'fence';
		                   row1_array1.push(colors);
		                   custom_height_image1[colors] =images_fence; 
		                    
		                }
		             }
		             if(file == '2'){
		                if(row2_array.length == 0){
		                	row2_array1.push(colors);
		                    row2_array[colors]= colors;
		                    color2[colors] = 'fence';
		                    custom_height_image2[colors] =images_fence; 
		                }else{
		                    row2_array1.push(colors);
		                    row2_array[colors]= colors;
		                    color2[colors] = 'fence';
		                    custom_height_image2[colors] =images_fence; 
		                }
		             }
		              if(file == '3'){
		                if(row3_array.length == 0){
		                	row3_array1.push(colors);
		                    row3_array[colors]= colors;
		                    color3[colors] = 'fence';
		                    custom_height_image3[colors] =images_fence; 
		                    
		                }else{
		                  row3_array1.push(colors);
		                    row3_array[colors]= colors;
		                    color3[colors] = 'fence';
		                    custom_height_image3[colors] =images_fence; 
		                }
		             }
		             if(file == '4'){
		                if(row4_array.length == 0){
		                	row4_array1.push(colors);
		                    row4_array[colors]= colors;
		                    color4[colors] = 'fence';
		                    custom_height_image4[colors] =images_fence; 
		                }else{
		                   row4_array1.push(colors);
		                   row4_array[colors]= colors;
		                   color4[colors] = 'fence';
		                   custom_height_image4[colors] =images_fence; 
		                }
		             }
				  	image_name = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/gray/round_I_GLB_silver_grey_v05_"+ heigth +".glb";
				  }
				  }
				
			
			 setTimeout(function(){
			jQuery('.btn_beregn').trigger('click');
				  //myfunction(); 
				 // console.log(row3_array);
				 // /myfunction();

			//chengelog(xposition_custom ,yposition,scene_custom,index_custom ,image_name,file,custom_mesh,custom_button,custom_advancedTexturee,custom_type);
				 }, 2000);
});

jQuery('.shield-engraving1').click( function(){
          unload_service_PopupBox1();
		 
});


//jQuery('.custom_glb_type').change(function(){
      
//});
function unload_service_PopupBox1() {    // TO Unload the Popupbox
           jQuery('#gift-wrap-option1').fadeOut("slow");
           jQuery(".shield-engraving1").css({ // this is just for style       
                "opacity": "1" 
            });
		   jQuery(".shield-engraving1").css({ // this is just for style       
               "display": "none"
            });
		
}   
function load_service_PopupBox1(file1,color,xposition ,yposition,scene,mesh,button2,advancedTexturee){ 
			scene_custom=scene;
			xposition_custom=xposition;
			yposition_custom=yposition;
			index_custom=color;
			custom_mesh = mesh;
			custom_button = button2;
			custom_advancedTexturee = advancedTexturee;
          
           // To Load the Popupbox
			jQuery("#door").removeAttr("disabled");
           if(file1 == '1'){
           	if(color1[color] == 'door'){

           	}else{
           		
           		jQuery.each(color1, function( key, valuee ) {
           			
           				if(valuee == 'door'){
           					jQuery("#door").checked = false; 
           					jQuery("#door").checked = false; 
           					jQuery("#fence").attr('checked','checked');
           					$('#door').attr('disabled', 'disabled');
           				}
           		});
           	}
           }else if(file1 == '2'){
           	if(color2[color] == 'door'){

           	}else{
           	jQuery.each(color2, function( key, valuee ) {
           			
           				if(valuee == 'door'){
           					jQuery("#door").checked = false; 
           					jQuery("#door").checked = false; 
           					jQuery("#fence").attr('checked','checked');
           					$('#door').attr('disabled', 'disabled');
           				}
           		});
           }

           }else if(file1 == '3'){
           	if(color3[color] == 'door'){

           	}else{
           	jQuery.each(color3, function( key, valuee ) {
           			
           				if(valuee == 'door'){
           					jQuery("#door").checked = false; 
           					jQuery("#door").checked = false; 
           					jQuery("#fence").attr('checked','checked');
           					$('#door').attr('disabled', 'disabled');
           				}
           		});
           }

           }else if(file1 == '4'){
           	if(color4[color] == 'door'){

           	}else{
           		 //$("#door").removeAttr("disabled");
           		jQuery.each(color4, function( key, valuee ) {
           			
           				if(valuee == 'door'){
           					jQuery("#door").checked = false; 
           					jQuery("#door").checked = false; 
           					jQuery("#fence").attr('checked','checked');
           					$('#door').attr('disabled', 'disabled');
           				}
           		});
           	}
           }

            jQuery('.custom_glb_type').attr('color',color);
            jQuery('#ModalButtonRow1').attr('file',file1);
            jQuery('#gift-wrap-option1').fadeIn("slow");
            jQuery(".shield-engraving1").css({ // this is just for style
                "opacity": "0.59" 
            });   
			
        	 jQuery(".shield-engraving1").css({ // this is just for style       
               "position": "fixed"
            });	
        	 jQuery(".shield-engraving1").css({ // this is just for style       
               "display": "block"
            });	
			// jQuery("html, body").animate({ scrollTop: 0 }, "slow");
}


jQuery('.renderCanvas').hover(function() {
	if($(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();
});

</script>{"id":2131,"date":"2021-07-24T04:22:05","date_gmt":"2021-07-24T04:22:05","guid":{"rendered":"https:\/\/kirkedal.se\/?page_id=2131"},"modified":"2021-07-24T04:26:48","modified_gmt":"2021-07-24T04:26:48","slug":"beregn-copenhagen-stoej-hegn-new","status":"publish","type":"page","link":"https:\/\/kirkedal.de\/de\/beregn-copenhagen-stoej-hegn-new\/","title":{"rendered":"Beregn Copenhagen St\u00f8j Hegn 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-2131","page","type-page","status-publish","hentry","prodpage-classic"],"acf":[],"_links":{"self":[{"href":"https:\/\/kirkedal.de\/de\/wp-json\/wp\/v2\/pages\/2131","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=2131"}],"version-history":[{"count":1,"href":"https:\/\/kirkedal.de\/de\/wp-json\/wp\/v2\/pages\/2131\/revisions"}],"predecessor-version":[{"id":2132,"href":"https:\/\/kirkedal.de\/de\/wp-json\/wp\/v2\/pages\/2131\/revisions\/2132"}],"wp:attachment":[{"href":"https:\/\/kirkedal.de\/de\/wp-json\/wp\/v2\/media?parent=2131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}