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







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

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

	#embed-host {
		display: none;
	}

	li.disabled {
		pointer-events: none;
		cursor: not-allowed;
	}

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

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

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

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

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

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

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

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

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

		padding: 0;
		position: fixed;

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

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

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

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

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

		padding: 1%;
		text-align: left;

		height: 20px;
	}

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

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

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

	.cleardiv {
		clear: both;
	}

	.renderCanvas {
		height: 800px;
	}

	.button_mu_cstm_class_mmmm {
		text-align: center;
		margin-top: 50px !important;
		margin-bottom: 80px !important;
		cursor: pointer !important;
		color: #333 !important;
		opacity: 1 !important;
	}

	.button_mu_cstm_class_mmmm span {
		font-size: 22px;
		width: 100% !important;
	}

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

		.mouse_gest {
			display: none;
		}
	}
</style>
<style type="text/css">
	html {
		overflow: scroll;
		overflow-x: hidden;
	}

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

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

	.cursorpointer {
		cursor: pointer;
	}

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

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

	:focus {
		outline: none;
	}

	button:focus {
		outline: none;
	}

	select:focus {
		outline: none;
	}

	a:focus {
		outline: none;
	}

	img {
		border: none;
	}

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

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

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

	a {
		text-decoration: none;
	}

	a:hover {
		text-decoration: none;
	}

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

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

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

	a:focus {
		text-decoration: none;
	}

	p {
		padding: 0;
		margin: 0;
	}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	.calculator-2 .id-box-50 img {
		/*  width: 80%;*/
		mix-blend-mode: darken;
	}


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

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

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

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

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

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

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

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

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

	@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:0px 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: 100%;
		margin: auto;
		display: table;
		padding: 30px 0;
	}

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

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

	.button-row {
		/*width:100%;*/
		width: 90%;
		/*float:left;*/
		margin-top: 0px;

		margin: auto;
		display: table;
		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: 90%;
		float: none;
		margin: auto;
		padding: 25px 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;
	}

	#Acc11CNT {
		width: 30% !important;
	}

	.col_AFSTAND {
		/*border: 1px solid #ddd;
	padding: 5px;
	margin: 3px 3px 3px 3px;
	width: 40.333333%;
	background-color: #fff;*/
	}

	.col_AFSTAND img {
		/*height: 87%;
	width: 100%;*/
	}

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

	.w-50 select {
		/*width: 70% !important;*/
	}

	/*.id-box-50 .fenceImg {
		 width: 50%;
	 }*/
	@media screen and (max-width:1800px) {

		.w-50 select {
			/*width: 89px !important;*/
		}

		.col_AFSTAND {
			/*height: 290px;*/
		}

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

		.df-row label {
			font-size: 14px;
			margin-top: 12px;
		}

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

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

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

		.calculator-box.calculator-4 .ccb-text-box h2 {
			/*font-size: 15px;*/
		}

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

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

	@media screen and (max-width:1400px) {
		.w-50 select {
			/*width: 84px !important;*/
		}

		.s-1 {
			/*display: none;*/
		}
	}

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

		.w-50 select {
			/*width: 84px !important;*/
		}

		.col_AFSTAND {
			/* width: 47.333333%;*/
		}

		.col-8 {
			width: 58%;
		}

		.vaelg-form ul li {
			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;
		}
	}

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

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

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

		.col_AFSTAND {
			height: 265px;
		}
	}

	@media screen and (max-width:900px) {
		.col_AFSTAND {
			width: 42.333333%;
			display: inline-block;
			height: 200px;
		}

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

		.w-50 select {
			/*width: 67% !important;*/
		}

		.s-1 {
			display: block;
		}

		.calculator-5 .calculator-contact-box .ccb-text-box {
			margin: 0 auto;
		}
	}

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

		}

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

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

		#Acc11CNT {
			/*width:100% !important;*/
		}

		.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: 250px;
			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;
			float: left;
			margin: 3px 2% !important;

		}

		.col-md-3.Tilbehør {
			border: 1px solid #ddd;
			padding: 5px;
			margin: 3px 3px 3px 3px;
			width: 47%;
		}

		.col_AFSTAND {

			height: 168px;
		}
	}

	@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: 1980px) and (min-width: 1800px) {
		.df-row {
			width: 65%;
			/* width: 100%; */
			float: left;
			padding: 0 9px;
		}
	}

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

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

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

		.calculator-5 .calculator-contact-box .ccb-text-box {
			/* margin: 22px 5px 14px 285px;*/
		}
	}

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

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

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

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

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

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

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

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

	.profile_selection_step_wrap>.product_item {
		padding: 15px;
	}

	.profile_selection_step_wrap {
		margin: 0 auto;
		float: unset;
	}

	@media screen and (max-width: 1400px) {
		.ccb-text-box .stolper_selection_step_wrap {
			width: 100%;
			margin: 0 auto;
			align-items: center;
			justify-content: center;
		}
	}

	@media screen and (max-width: 1400px) {
		.stolper_selection_step_wrap>.col_AFSTAND {
			/* height: 224px;*/
		}
	}

	.stolper_selection_step_wrap>.col_AFSTAND {

		/* align-items: center;
	justify-content: center;
	border-color: #e1e1e1;*/

	}

	.vaelg-profil.stolper_selection_step_wrap {
		display: flex;
		justify-content: center;
		margin: 0 auto;
		float: unset;
	}

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

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

	@media screen and (max-width: 1400px) {
		.calculator-6 .col-4 {
			min-width: 588px;
		}
	}

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

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

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

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

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

	.d3d-width {
		width: 100%;
	}

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

		.df-row {
			width: 36%;
		}

		.ccb-list .ccb-list-box ul {
			padding: 48px 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;
		}

		.calculator-5 .calculator-contact-box .ccb-text-box {
			/* margin: 22px 5px 14px 126px;*/
		}

		#Acc11CNT {
			width: 95px !important;
			margin-left: 0px !important;
			margin-right: 0px !important;
			margin-bottom: 1px !important;
			height: 30px !important;
		}
	}

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

	.Tilbehør img {
		margin: 0 auto;
	}

	.cursurpointers {
		width: 60%;
	}

	@media screen and (max-width: 900px) {
		.calculator-5 .calculator-contact-box .ccb-text-box {
			margin: 0 auto;
		}
	}
</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 type="text/javascript">



	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>
<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="postsize1" type="hidden" value="" />
<input id="endekap" type="hidden" value="" />
<input type="hidden" value="0" name="fWidth" id="fWidth">

<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="endekaptype1" name="endekaptype1" type="hidden" value="" />
<input id="switchMap" style="display: none;" name="switchMap" type="checkbox" value="Values or Map?" />
<div id='accordion'>
	<div id="map_div" style="height: 800px;display:none;">
		<div id="angles_div" style="margin-top: 20px; float: left; min-width: 800px;"></div>
		<div id="lengths_div" style="margin-top: 20px; float: left; min-width: 800px;"></div>
		<div id="forms_table" style="display: none;"> </div>
	</div>
	<div class="calculator-box calculator-1">
		<div class="calculator-contact-box">
			<div class="col-8">
				<div class="ccb-text">
					<div class="ccb-text-box">
						<h2>Vælg form</h2>
						<div class="vaelg-form">
							<input id="wqs_control_segment" name="wqs_control_segment" type="hidden" value="" />
							<ul>
								<li data_id="1"><img src="https://kirkedalkomposit.dk/wp-content/images/form1_1.jpg"
										alt="" title=""></li>
								<li data_id="2"><img src="https://kirkedalkomposit.dk/wp-content/images/form2_2.jpg"
										alt="" title=""></li>
								<li data_id="3"><img src="https://kirkedalkomposit.dk/wp-content/images/form3_3.jpg"
										alt="" title=""></li>
								<li data_id="4"><img src="https://kirkedalkomposit.dk/wp-content/images/form4_4.jpg"
										alt="" title=""></li>
								<!--<li data_id="5"><img src="https://kirkedalkomposit.dk/wp-content/images/opform2_2.png" alt="" title=""></li>
				<li data_id="6"><img src="https://kirkedalkomposit.dk/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 / Verzinkter Zaun</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2021/01/Beregner_billede_Galvaniseret-hegn_3.jpg"
									alt="" title=""></li>
							<li id="Volgform"><span class="sidebar_calc_box1 ">2. Vælg form</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2021/01/Beregner_billede_Galvaniseret-hegn_3.jpg"
									alt="" title=""></li>
							<li><span>3. Dimensioner</span>
								<!--<img src="https://kirkedalkomposit.dk/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title="">-->
							</li>
							<li><span>4. Vælg profil</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li><span>5. Seitenprofil</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li class="disabled"><span>6. Beitragstyp wählen</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li><span>7. Zubehör</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li class="button_mu_cstm_class_mmmm video_show_button_mcmcmc"><span>Siehe
									Montageanleitungsvideo</span></li>
						</ul>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="calculator-box calculator-2" style="display:none">
		<div class="calculator-contact-box">
			<div class="col-8">
				<div class="ccb-text">
					<div class="ccb-text-box">
						<h2>indsæt Dimensioner</h2>
						<div class="indsaet-dimensioner">
							<div class="id-box-50 indsaet-dimensioner_image_wrap"> <img
									src="https://kirkedalkomposit.dk/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>
											<select class="form-control" id="height_0" style="">
												<option value="">Vælg</option>
												<option>1.8</option>
												<option>1.4</option>
												<option>0.9</option>
											</select>
											<span class="s-1">mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side A - Længde </label>
											<input type="number" class="form-control" name="Laengde" id="length_0">
											<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 form_2">
												<option value="">Vælg</option>
												<option value="1.8">1.8</option>
												<option value="1.4">1.4</option>
												<option value="0.9">0.9</option>
											</select>
											<span class="s-1">mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side A - Længde</label>
											<input type="number" id="length_0" class="form-control">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side B - Højde</label>
											<select id="height_1" class="form-control form_2">
												<option value="">Vælg</option>
												<option value="1.8">1.8</option>
												<option value="1.4">1.4</option>
												<option value="0.9">0.9</option>
											</select>
											<span class="s-1">mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side B - Længde</label>
											<input type="number" id="length_1" class="form-control">
											<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 form_3">
												<option value="">Vælg</option>
												<option value="1.8">1.8</option>
												<option value="1.4">1.4</option>
												<option value="0.9">0.9</option>
											</select>
											<span class="s-1">mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side A - Længde</label>
											<input type="number" id="length_0" class="form-control">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side B - Højde</label>
											<select id="height_1" class="form_3 form-control">
												<option value="">Vælg</option>
												<option value="1.8">1.8</option>
												<option value="1.4">1.4</option>
												<option value="0.9">0.9</option>
											</select>
											<span class="s-1">mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side B - Længde</label>
											<input type="number" id="length_1" class="form-control">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side C - Højde</label>
											<select id="height_2" class="form-control form_3">
												<option value="">Vælg</option>
												<option value="1.8">1.8</option>
												<option value="1.4">1.4</option>
												<option value="0.9">0.9</option>
											</select>
											<span class="s-1">mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side C - Længde</label>
											<input type="number" class="form-control" id="length_2">
											<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 form_4">
												<option value="">Vælg</option>
												<option value="1.8">1.8</option>
												<option value="1.4">1.4</option>
												<option value="0.9">0.9</option>
											</select>
											<span class="s-1">mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side A - Længde</label>
											<input type="number" id="length_0" class="form-control">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side B - Højde</label>
											<select id="height_1" class="form-control form_4">
												<option value="">Vælg</option>
												<option value="1.8">1.8</option>
												<option value="1.4">1.4</option>
												<option value="0.9">0.9</option>
											</select>
											<span class="s-1">mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side B - Længde</label>
											<input type="number" id="length_1" class="form-control">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side C - Højde</label>
											<select id="height_2" class="form-control form_4">
												<option value="">Vælg</option>
												<option value="1.8">1.8</option>
												<option value="1.4">1.4</option>
												<option value="0.9">0.9</option>
											</select>
											<span class="s-1">mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side C - Længde</label>
											<input type="number" id="length_2" class="form-control">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side D - Højde</label>
											<select id="height_3" class="form_4 form-control">
												<option value="">Vælg</option>
												<option value="1.8">1.8</option>
												<option value="1.4">1.4</option>
												<option value="0.9">0.9</option>
											</select>
											<span class="s-1">mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side D - Længde</label>
											<input type="number" id="length_3" class="form-control">
											<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 - Længde</label>
											<select id="height_0" class="form_6 form-control">
												<option value="">Vælg</option>
												<option value="1.8">1.8</option>
												<option value="1.4">1.4</option>
												<option value="0.9">0.9</option>
											</select>
											<span class="s-1">mtr</span>
										</div>
										<div class="w-50 ">
											<label>Længde for part A</label>
											<input type="number" id="length_0" class="form-control">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side B - Højde</label>
											<select id="height_1" class="form_6 form-control">
												<option value="">Vælg</option>
												<option value="1.8">1.8</option>
												<option value="1.4">1.4</option>
												<option value="0.9">0.9</option>
											</select>
											<span class="s-1">mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side B - Længde</label>
											<input type="number" id="length_1" class="form-control">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side C - Højde</label>
											<select id="height_2" class="form_6 form-control">
												<option value="">Vælg</option>
												<option value="1.8">1.8</option>
												<option value="1.4">1.4</option>
												<option value="0.9">0.9</option>
											</select>
											<span class="s-1">mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side C - Længde</label>
											<input type="number" id="length_2" class="form-control">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side D - Højde</label>
											<select id="height_3" class="form-control form_6">
												<option value="">Vælg</option>
												<option value="1.8">1.8</option>
												<option value="1.4">1.4</option>
												<option value="0.9">0.9</option>
											</select>
											<span class="s-1">mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side D - Længde</label>
											<input type="number" id="length_3" class="form-control">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Højde for part E</label>
											<select id="height_4" class="form_6 form-control">
												<option value="">Vælg</option>
												<option value="1.8">1.8</option>
												<option value="1.4">1.4</option>
												<option value="0.9">0.9</option>
											</select>
											<span class="s-1">mtr</span>
										</div>
										<div class="w-50 ">
											<label>Længde for part E</label>
											<input type="number" id="length_4" class="form-control">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Højde for part F</label>
											<select id="height_5" class="form_6 form-control">
												<option value="">Vælg</option>
												<option value="1.8">1.8</option>
												<option value="1.4">1.4</option>
												<option value="0.9">0.9</option>
											</select>
											<span class="s-1">mtr</span>
										</div>
										<div class="w-50 ">
											<label>Længde for part F</label>
											<input type="number" id="length_5" class="form-control">
											<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 - Længde</label>
											<select id="height_0" class="form-control form_8">
												<option value="">Vælg</option>
												<option value="1.8">1.8</option>
												<option value="1.4">1.4</option>
												<option value="0.9">0.9</option>
											</select>
											<span class="s-1">mtr</span>
										</div>
										<div class="w-50 ">
											<label>Længde for part A</label>
											<input type="number" id="length_0" class="form-control">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side B - Højde</label>
											<select id="height_1" class="form-control form_8">
												<option value="">Vælg</option>
												<option value="1.8">1.8</option>
												<option value="1.4">1.4</option>
												<option value="0.9">0.9</option>
											</select>
											<span class="s-1">mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side B - Længde</label>
											<input type="number" id="length_1" class="form-control">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side C - Højde</label>
											<select id="height_2" class="form-control form_8">
												<option value="">Vælg</option>
												<option value="1.8">1.8</option>
												<option value="1.4">1.4</option>
												<option value="0.9">0.9</option>
											</select>
											<span class="s-1">mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side C - Længde</label>
											<input type="number" id="length_2" class="form-control">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side D - Højde</label>
											<select id="height_3" class="form-control form_8">
												<option value="">Vælg</option>
												<option value="1.8">1.8</option>
												<option value="1.4">1.4</option>
												<option value="0.9">0.9</option>
											</select>
											<span class="s-1">mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side D - Længde</label>
											<input type="number" id="length_3" class="form-control">
											<span>m</span>
										</div>
										<div class="w-50 ">
											<label>Højde for part E</label>
											<select id="height_4" class="form-control form_8">
												<option value="">Vælg</option>
												<option value="1.8">1.8</option>
												<option value="1.4">1.4</option>
												<option value="0.9">0.9</option>
											</select>
											<span class="s-1">mtr</span>
										</div>
										<div class="w-50 ">
											<label>Længde for part E</label>
											<input type="number" id="length_4" class="form-control">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Højde for part F</label>
											<select id="height_5" class="form-control form_8">
												<option value="">Vælg</option>
												<option value="1.8">1.8</option>
												<option value="1.4">1.4</option>
												<option value="0.9">0.9</option>
											</select>
											<span class="s-1">mtr</span>
										</div>
										<div class="w-50 ">
											<label>Længde for part F</label>
											<input type="number" id="length_5" class="form-control">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Højde for part G</label>
											<select id="height_6" class="form-control form_8">
												<option value="">Vælg</option>
												<option value="1.8">1.8</option>
												<option value="1.4">1.4</option>
												<option value="0.9">0.9</option>
											</select>
											<span class="s-1">mtr</span>
										</div>
										<div class="w-50 ">
											<label>Længde for part G</label>
											<input type="number" id="length_6" class="form-control">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Højde for part H</label>
											<select id="height_7" class="form-control form_8">
												<option value="">Vælg</option>
												<option value="1.8">1.8</option>
												<option value="1.4">1.4</option>
												<option value="0.9">0.9</option>
											</select>
											<span class="s-1">mtr</span>
										</div>
										<div class="w-50 ">
											<label>Længde for part H</label>
											<input type="number" id="length_7" class="form-control">
											<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 / Verzinkter Zaun</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2021/01/Beregner_billede_Galvaniseret-hegn_3.jpg"
									alt="" title=""></li>
							<li class="active-list sidebar_calc_box1"><span>2. Vælg form</span> <img
									src="https://kirkedalkomposit.dk/wp-content/images/form3.jpg" alt="" title=""></li>
							<li><span>3.
									Dimensioner</span><!-- <img src="https://kirkedalkomposit.dk/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title="">-->
							</li>
							<li><span>4. Vælg profil</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li><span>5. Seitenprofil</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li class="disabled"><span>6. Beitragstyp wählen</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li><span>7. Zubehör</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li class="button_mu_cstm_class_mmmm video_show_button_mcmcmc"><span>Siehe
									Montageanleitungsvideo</span></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 profil</h2>
						<div class="vaelg-profil col-md-12 profile_selection_step_wrap">
							<div class="id-box-50 product_item">
																								<img class="fenceImg cursorpointer"
									src="https://kirkedalkomposit.dk/wp-content/uploads/2021/01/Kirkedal-hegnsprofil-K2-SORT-to-profiler-loese-NETfil.jpg"
									alt="" title="">
								<input class="hidFence" type="hidden" value="K1" />
								<input class="hidColor" type="hidden" value="Black" />
								<p style="text-align:center;">K1 Black</p>
							</div>

														<div class="id-box-50 product_item">
								<img class="fenceImg cursorpointer"
									src="https://kirkedalkomposit.dk/wp-content/uploads/2022/03/K2_black.jpg" alt=""
									title="">
								<input class="hidFence" type="hidden" value="K2" />
								<input class="hidColor" type="hidden" value="Black" />
								<p style="text-align:center;">K2 Black</p>
							</div>

														<div class="id-box-50 product_item"> <img class="fenceImg cursorpointer"
									src="https://kirkedalkomposit.dk/wp-content/uploads/2024/03/Kirkedal-lamel-profil-K3-2-hele-profiler-low-res.jpg"
									alt="" title="">
								<input class="hidFence" type="hidden" value="K3" />
								<input class="hidColor" type="hidden" value="Black" />
								<p style="text-align:center;">K3 Black</p>
							</div>
							<div class="id-box-50 product_item"> <img class="fenceImg cursorpointer"
									src="https://kirkedalkomposit.dk/wp-content/uploads/2024/08/Kirkedal-hegnsprofil-K3-BRUNT-Panel-to-paneler-loese-NETfil.jpg"
									alt="" title="">
								<input class="hidFence" type="hidden" value="K3" />
								<input class="hidColor" type="hidden" value="Smoked_Oak" />
								<p style="text-align:center;">K3 Oak</p>
							</div>
							<div class="id-box-50 product_item"> <img class="fenceImg cursorpointer"
									src="https://kirkedalkomposit.dk/wp-content/uploads/2024/03/Kirkedal-k3-hardwood.jpg"
									alt="" title="">
								<input class="hidFence" type="hidden" value="K3" />
								<input class="hidColor" type="hidden" value="Hardwood" />
								<p style="text-align:center;">K3 Hardwood</p>
							</div>
							<!-- <div class="id-box-50 product_item"> <img class="fenceImg cursorpointer" src="https://kirkedal.de/wp-content/uploads/2025/05/K1_sanded_black_rev.png" alt="" title="">
				<input class="hidFence" type="hidden" value="K1" />
				<input class="hidColor" type="hidden" value="Sanded_Black" />
				<p style="text-align:center;">K1 Sanded Black</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 / Verzinkter Zaun</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2021/01/Beregner_billede_Galvaniseret-hegn_3.jpg"
									alt="" title=""></li>
							<li class="active-list sidebar_calc_box1"><span>2. Vælg form</span> <img
									src="https://kirkedalkomposit.dk/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 profil</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li><span>5. Seitenprofil</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li class="disabled"><span>6. Beitragstyp wählen</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li><span>7. Zubehör</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li class="button_mu_cstm_class_mmmm video_show_button_mcmcmc"><span>Siehe
									Montageanleitungsvideo</span></li>
						</ul>
					</div>
				</div>
			</div>
		</div>
			</div>
	<div class="calculator-box calculator-44" style="display:none">
		<div class="calculator-contact-box">
			<div class="col-8">
				<div class="ccb-text">
					<div class="ccb-text-box">
						<h2>Sideprofil</h2>
						<div class="row vaelg-profil col-md-12 stolper_selection_step_wrap" style="display:block;">
							<!--float: left; height: 174px; width: 150px; padding: 3px; border: 1px solid #817e7e; margin: 7px;-->
							<div class="col-md-4 id-box-50 product_item" style=""> <img
									class="cursorpointer fencePostsize wqs_size1" color_val="alu"
									style="cursor: pointer; width: 100%;"
									src="https://kirkedalkomposit.dk/wp-content/uploads/2024/08/Sideprofil-e1724672900769.jpg"
									alt="" title="">
								<input product_type="sideprofil" class="hidPostsize" type="hidden" value="990mm"
									sku="2456368">
								<label>Kirkedal sideprofil 990mm</label>
							</div>
							<div class="col-md-4 id-box-50 product_item" style=""> <img
									class="cursorpointer fencePostsize wqs_size1" color_val="alu"
									style="cursor: pointer; width: 100%;"
									src="https://kirkedalkomposit.dk/wp-content/uploads/2024/08/Sideprofil-e1724672900769.jpg"
									alt="" title="">
								<input product_type="sideprofil" class="hidPostsize" type="hidden" value="1410mm"
									sku="2456369">
								<label>Kirkedal sideprofil 1410mm</label>
							</div>
							<div class="col-md-4 id-box-50 product_item" style=""> <img
									class="cursorpointer fencePostsize wqs_size1" color_val="alu"
									style="cursor: pointer; width: 100%;"
									src="https://kirkedalkomposit.dk/wp-content/uploads/2024/08/Sideprofil-e1724672900769.jpg"
									alt="" title="">
								<input product_type="sideprofil" class="hidPostsize" type="hidden" value="1830mm"
									sku="2399089">
								<label>Kirkedal sideprofil 1830mm</label>
							</div>
							<!--style="float: left; height: 174px; width: 150px; padding: 3px; border: 1px solid #817e7e; margin: 7px;-->
							<div class="col-md-4 id-box-50 product_item" style="display:none;">
								<div style="height: 200px; cursor: pointer;   object-fit: contain;"></div>
								<input product_type="ingen" class="hidPostsize" type="hidden" value="0">
								<label>Ingen sideprofil</label>
							</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 / Verzinkter Zaun</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2021/01/Beregner_billede_Galvaniseret-hegn_3.jpg"
									alt="" title=""></li>
							<li class="active-list sidebar_calc_box1"><span>2. Vælg form</span> <img
									src="https://kirkedalkomposit.dk/wp-content/images/form3.jpg" alt="" title=""></li>
							<li class="active-list sidebar_calc_box2"><span>3. Dimensioner</span> <b class="dimention"
									style="  ">A:5X6 B: 5X4 A:5X6 B: 5X4 A:5X6 B: 5X4</b></li>
							<li class="active-list sidebar_calc_box3"><span>4. Vælg profil</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2021/07/vaelg-profil-1.jpg"
									alt="" title=""></li>
							<li class="sidebar_calc_box44"><span>5. Seitenprofil</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li class="disabled"><span>6. Beitragstyp wählen</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li><span>7. Zubehör</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li class="button_mu_cstm_class_mmmm video_show_button_mcmcmc"><span>Siehe
									Montageanleitungsvideo</span></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 stolpetype</h2>
						<div class="row vaelg-profil col-md-12 stolper_selection_step_wrap">
							<!--float: left; height: 174px; width: 150px; padding: 3px; border: 1px solid #817e7e; margin: 7px;-->
							<div class="col-md-4 id-box-50 product_item col_AFSTAND" style="display:none;"> <img
									class="cursorpointer fencePostsize wqs_size1" color_val="alu"
									style="cursor: pointer; width: 100%;"
									src="https://kirkedalkomposit.dk/wp-content/uploads/2018/10/Kirkedal-startslut-stolpe-k200-800x800.png"
									alt="" title="">
								<input product_type="K200" class="hidPostsize" type="hidden" value="100x100mm">
								<label>2x80x80 mm</label>
							</div>
							<!--style="float: left; height: 174px; width: 150px; padding: 3px; border: 1px solid #817e7e; margin: 7px;-->
							<div class="col-md-4 id-box-50 product_item col_AFSTAND" style="display:none;"> <img
									class="cursorpointer fencePostsize wqs_size1" color_val="black"
									src="https://kirkedalkomposit.dk/wp-content/uploads/2020/01/midt-800x923.jpg"
									style="cursor: pointer; width: 86%;" alt="" title="">
								<input product_type="K300" class="hidPostsize" type="hidden" value="100x100mm">
								<label>2x80x80 mm</label>
							</div>

							<div class="col-md-4 id-box-50 product_item col_AFSTAND 2456368" style="display:none;"> <img
									class="cursorpointer fencePostsize wqs_size1" color_val="black"
									src="https://kirkedalkomposit.dk/wp-content/uploads/2024/08/Stolpe.jpg"
									style="cursor: pointer; width: 86%;" alt="" title="">
								<input product_type="K1500" class="hidPostsize" type="hidden" value="1500mm"
									sku="2399087">
								<label>Kirkedal Stolpe til Kirkedal Hegn 1500mm</label>
							</div>
							<div class="col-md-4 id-box-50 product_item col_AFSTAND 2456369" style="display:none;"> <img
									class="cursorpointer fencePostsize wqs_size1" color_val="black"
									src="https://kirkedalkomposit.dk/wp-content/uploads/2024/08/Stolpe.jpg"
									style="cursor: pointer; width: 86%;" alt="" title="">
								<input product_type="K2000" class="hidPostsize" type="hidden" value="2000mm"
									sku="2399086">
								<label>Kirkedal Stolpe til Kirkedal Hegn 2000mm</label>
							</div>
							<div class="col-md-4 id-box-50 product_item col_AFSTAND 2399089" style="display:none;"> <img
									class="cursorpointer fencePostsize wqs_size1" color_val="black"
									src="https://kirkedalkomposit.dk/wp-content/uploads/2024/08/Stolpe.jpg"
									style="cursor: pointer; width: 86%;" alt="" title="">
								<input product_type="K2500" class="hidPostsize" type="hidden" value="2500mm"
									sku="2399085">
								<label>Kirkedal Stolpe til Kirkedal Hegn 2500mm</label>
							</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 / Verzinkter Zaun</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2021/01/Beregner_billede_Galvaniseret-hegn_3.jpg"
									alt="" title=""></li>
							<li class="active-list sidebar_calc_box1"><span>2. Vælg form</span> <img
									src="https://kirkedalkomposit.dk/wp-content/images/form3.jpg" alt="" title=""></li>
							<li class="active-list sidebar_calc_box2"><span>3. Dimensioner</span> <b class="dimention"
									style="  ">A:5X6 B: 5X4 A:5X6 B: 5X4 A:5X6 B: 5X4</b></li>
							<li class="active-list sidebar_calc_box3"><span>4. Vælg profil</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2021/07/vaelg-profil-1.jpg"
									alt="" title=""></li>
							<li class="active-list sidebar_calc_box44"><span>5. Seitenprofil</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li class="disabled"><span>6. Beitragstyp wählen</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li><span>7. Zubehör</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li class="button_mu_cstm_class_mmmm video_show_button_mcmcmc"><span>Siehe
									Montageanleitungsvideo</span></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 tilbehør</h2>
						<div class="vaelg-tilbehor">
							<style type="text/css">
								/*.Tilbehør{    border: 1px solid #ddd;padding: 5px;margin: 3px 3px 3px 3px;    width: 33.333333%;}*/
								.Tilbehørcheckbox {
									/*width: 100% !important;*/
									height: 27px;
								}

								.fenceAccessories {
									cursor: pointer;
								}

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

								.chekacc {
									text-align: end;
								}
							</style>
							<div class="vaelg-tilbehor-1 col-md-12">
																<div class="id-box-50 Tilbehør product_item">
									<div style=" " class="chekacc"><input type="checkbox" id="Acc3" name="Acc3"
											class="Tilbehørcheckbox"></div>
									<img class="fenceAccessories cursurpointers cursorpointer" dataid="acc3" datakey="1"
										style="cursor: pointer;"
										src="https://kirkedalkomposit.dk/wp-content/uploads/2021/07/Untitled-2.png" />
									<input class="hidAccessories" type="hidden" value="acc3">
									<label for="Acc3"
										style="display:block;font-size: 14px;margin-bottom: 0px; text-align: center;">Rens
										750ml</label>
									<label for="Acc3"
										style="display:block;font-size: 14px; text-align: center;">Vælg</label>

								</div>
																<div class="id-box-50 Tilbehør product_item">
									<div style=" " class="chekacc"> <input type="checkbox" id="Acc4" name="Acc4"
											class="Tilbehørcheckbox"></div>
									<img class="fenceAccessories cursurpointers cursorpointer" dataid="acc4" datakey="3"
										style="cursor: pointer;"
										src="https://kirkedalkomposit.dk/wp-content/uploads/2020/12/Zinkspray1-600x600.jpg" />
									<input class="hidAccessories" type="hidden" value="acc4">
									<label for="Acc4"
										style="display:block;font-size: 14px;margin-bottom: 0px; text-align: center;">Zinkspray</label>
									<label for="Acc4"
										style="display:block;font-size: 14px; text-align: center;"></label>

									<center>
										<input value="0" id="Acc4_val" style="width: 120px; height: 40px;" name="Acc4"
											type="number" min="0" data-tilbehor_product_id="1251"
											data-tilbehor_product_price="129.95" data-tilbehor_product_variation_id="0"
											oninput="this.value = Math.abs(this.value)">
									</center>
								</div>
							</div>
							<div class="col-md-3">
							</div>
							<div class="vaelg-tilbehor-3">
								<p
									style="text-align: center;margin: 4px 0;opacity: 0.8;font-size: 14px;padding: 0; display:none;">
									Beregningen er kun vejledende og med forbehold for faktorer der påvirker udfaldet af
									beregningen. Det er på kundens eget ansvar at tjekke beregningen/antal</p>
								<!--  <p>Du kan forlade dette uden valg eller en indtil alle</p>-->
								<button class="btn_beregn" style="background: #fff;
	border: 1px solid #e1e1e1 !important;
	padding: 12px 11px 11px 12px;
	width: 129px;
	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 / Verzinkter Zaun</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2021/01/Beregner_billede_Galvaniseret-hegn_3.jpg"
									alt="" title=""></li>
							<li class="active-list sidebar_calc_box1"><span>2. Vælg form</span> <img
									src="https://kirkedalkomposit.dk/wp-content/images/form3.jpg" alt="" title=""></li>
							<li class="active-list sidebar_calc_box2"><span>3. Dimensioner</span> <b class="dimention"
									style="  ">A:5X6 B: 5X4 A:5X6 B: 5X4 A:5X6 B: 5X4</b></li>
							<li class="active-list sidebar_calc_box3"><span>4. Vælg profil</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2021/07/vaelg-profil-1.jpg"
									alt="" title=""></li>
							<li class="active-list sidebar_calc_box44"><span>5. Seitenprofil</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li class="disabled active-list sidebar_calc_box4"><span>6. Beitragstyp wählen</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2021/07/vaelg-stolpestorrelse2.jpg"
									alt="" title=""></li>
							<li class="Vælgtilbehor"><span>7. Zubehör</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2021/07/vaelg-topprofil.jpg"
									alt="" title=""></li>
							<li class="button_mu_cstm_class_mmmm video_show_button_mcmcmc"><span>Siehe
									Montageanleitungsvideo</span></li>
						</ul>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="calculator-box calculator-6" style="display:none">
		<div class="calculator-contact-box desktop-vo">
			<div class="col-4 resizeing">
				<div class="ccb-list">
					<div class="ccb-list-box">
						<h2>DIT VALG</h2>
						<ul>
							<li class="active-list down-arrow-list"><span>Rediger</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2022/02/free-arrow-down-icon-3101-thumb.png"
									alt="" title="" style="height: 50%;
	margin: auto 0 auto 0px;"></li>
						</ul>
						<ul class="all-data-list-finel" style="display:none">
							<li class="active-list"><span>1. Serie / Verzinkter Zaun</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2021/01/Beregner_billede_Galvaniseret-hegn_3.jpg"
									alt="" title=""></li>
							<li class="active-list sidebar_calc_box1"><span>2. Vælg form</span> <img
									src="https://kirkedalkomposit.dk/wp-content/images/form3.jpg" alt="" title=""></li>
							<li class="active-list sidebar_calc_box2"><span>3. Dimensioner</span> <b class="dimention"
									style="  ">A:5X6 B: 5X4 A:5X6 B: 5X4 A:5X6 B: 5X4</b></li>
							<li class="active-list sidebar_calc_box3"><span>4. Vælg profil</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2021/07/vaelg-profil-1.jpg"
									alt="" title=""></li>
							<li class="active-list sidebar_calc_box44"><span>5. Seitenprofil</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li class="disabled active-list sidebar_calc_box4"><span>6. Beitragstyp wählen</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2021/07/vaelg-stolpestorrelse2.jpg"
									alt="" title=""></li>
							<li class="active-list sidebar_calc_box5"><span>7. Zubehör</span> <img
									src="https://kirkedalkomposit.dk/wp-content/uploads/2021/07/vaelg-topprofil.jpg"
									alt="" title=""></li>
							<li class="button_mu_cstm_class_mmmm video_show_button_mcmcmc"><span>Siehe
									Montageanleitungsvideo</span></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="tbl_custom_data">
							<table border="0" style="width:100%;" cellspacing="0" cellpadding="5">
								<thead>
									<tr style=" background-color: #dddddd;">
										<th style="text-align: left;">Beskrivelse</th>
										<th style="text-align: left;">Antal </th>

										<th style="text-align: left;">Total</th>
									</tr>
								</thead>
								<tbody>
									<tr style="display: none;">
										<td data-label="Beskrivelse" width="150px">Højde<br /><span
												id="length1_sku"></span></td>
										<td data-label="Antal" style="text-align: bottom;" align="left" width=""><input
												id="length1" style="width: 100px;" name="length1" readonly="readonly"
												type="number" />
											meter <br /><span id="length1_rate"></span> DKK</td>

										<td style="text-align: right;" data-label="Total"><span
												id="length1_total"></span> DKK</td>
									</tr>
									<tr style="display: none;">
										<td data-label="Beskrivelse">Længde<br /><span id="width1_sku"></span></td>
										<td data-label="Antal" style="text-align: bottom;"><input id="width1"
												style="width: 100px;" name="width1" readonly="readonly" type="number" />
											meter <br /> <span id="width1_rate"></span> DKK</td>

										<td style="text-align: right;" data-label="Total"><span
												id="width1_total"></span> DKK</td>
									</tr>
									<tr class="fence1tr">
										<td data-label="Beskrivelse" id="fence1_title" style="text-align: top;">Profil-
											<span id="gettotal"></span> <span id="gettotal1"></span><br><span
												id="fence1_sku"></span>
										</td>
										<td data-label="Antal" style="text-align: bottom;"><input id="fence1"
												style="width: 100px;" name="fence1" readonly="readonly" type="hidden" />
											<span id="fence1html"></span> stk. a <span id="gettotal"></span>
											<select id="profil_color" style="display:none;width: 150px;"
												name="profil_color" onchange="set_colors()">
												<option value="black">Black</option>
												<option value="grey">Grey</option>
												<option value="white">White</option>
												<option value="smoked_oak">Oak</option>
												<option value="hardwood">Hardwood</option>
												<option value="sanded_black">Sanded Black</option>
											</select>
																						<input id="submitBtn1"
												style="display:none;background-color: #51ae51; color: #fffdfd; border-radius: 2px; float: right;"
												type="button" value="Opdater beregning" />

											<br /><span id="fence1_rate"></span>
										</td>

										<td style="text-align: right;" data-label="Total"><span
												id="fence1_total"></span> </td>
									</tr>
									<tr class="fence2tr" style="display:none;">
										<td>Profil -
											<input id="fence12" style="width: 100px;" name="fence12" readonly="readonly"
												type="hidden" />
											<span id="gettotal2"></span><br>
											<span id="fence12_sku"></span>
										</td>
										<td><span id="fencehtml2"></span> stk. a
											<br>
											<span id="fence12_rate"></span> kr.
										</td>

										<td style="text-align: right;" data-label="Total"><span
												id="fence12_total"></span> kr.</td>
									</tr>
									<script>
										function printtotal() {
											document.getElementById('gettotal').innerHTML = document.getElementById('fencetype1').value;
											document.getElementById('gettotal2').innerHTML = document.getElementById('fencetype1').value;
										}

									</script>

									<tr class="door_product_wrap" style="display:none;">
										<td data-label="Beskrivelse">Profil - <span class="alublackdoor"></span>
											<input id="alublackdoor_product" style="width: 100px;" name="door_product"
												readonly="readonly" type="hidden" />
											<span id="alublackdoorgettotal"></span>
											<br>
											<span id="alublackdoor_product_sku"></span>
										</td>
										<td data-label="Antall"><span id="alublackdoordoor_product_html"></span> stk. a
											<span class="alublackdoor_product_qty"></span>
											<br>
											<span id="alublackdoor_product_rate"></span> DKK
										</td>
										<td style="text-align: right;"><span id="alublackdoor_product_total"></span> DKK
										</td>
									</tr>
									<tr class="door_product2_wrap" style="display:none;">
										<td>Profil - <span class="black_door_title"></span>
											<input id="blackdoor_product2" style="width: 100px;"
												name="blackdoor_product2" readonly="readonly" type="hidden" /> <span
												id="gettotal"><br><span id="blackdoor_product2_sku"></span>
										</td>
										<td data-label="Antall"><span id="blackdoor_product2_html"></span> stk. a
											<br>
											<span id="blackdoor_product2_rate"></span>
										</td>

										<td><span id="blackdoor_product2_total"></span> DKK</td>
									</tr>
									<tr class="door_product3_wrap" style="display:none;">
										<td>Profil - <span class="greyalu_door_title"></span>
											<input id="greyalu_product3" style="width: 100px;" name="greyalu_product3"
												readonly="readonly" type="hidden" /> <span id="gettotal"><br><span
													id="greyalu_product3_sku"></span>
										</td>
										<td data-label="Antall"><span id="greyalu_product3_html"></span> stk. a
											<br>
											<span id="greyalu_product3_rate"></span>
										</td>

										<td><span id="greyalu_product3_total"></span> DKK</td>
									</tr>
									<tr class="door_product4_wrap" style="display:none;">
										<td>Profil - <span class="blackblack_door_title"></span>
											<input id="blackblack_product4" style="width: 100px;"
												name="blackblack_product4" readonly="readonly" type="hidden" /> <span
												id="gettotal"><br><span id="blackblack_product4_sku"></span>
										</td>
										<td data-label="Antall"><span id="blackblack_product4_html"></span> stk. a
											<br>
											<span id="blackblack_product4_rate"></span>
										</td>

										<td><span id="blackblack_product4_total"></span> DKK</td>
									</tr>
									<tr class="sideprofiltr">
										<td data-label="Beskrivelse" id="sideprofil_title" style="text-align: top;">
											<span id="sideprofil_title_name">Start/Slut Stolper</span><br /><span
												id="sideprofil_sku"></span>
										</td>
										<td data-label="Antal" style="text-align: bottom;"><input id="sideprofilpe1"
												style="width: 100px;" name="sideprofilpe1" readonly="readonly"
												type="hidden" />
											<span id="sideprofilhtml"></span> stk. a <span id="getk200"
												style="display:none"></span><br /><span id="sideprofil_rate"></span>
										</td>

										<td style="text-align: right;" data-label="Total"><span
												id="sideprofil_total"></span> </td>
									</tr>
									<tr class="slutstolpe1tr">
										<td data-label="Beskrivelse" id="slutstolpe1_title" style="text-align: top;">
											<span id="slutstolpe1_title_name">Start/Slut Stolper</span><br /><span
												id="slutstolpe1_sku"></span>
										</td>
										<td data-label="Antal" style="text-align: bottom;"><input id="slutstolpe1"
												style="width: 100px;" name="slutstolpe1" readonly="readonly"
												type="hidden" />
											<span id="slutstolpe1html"></span> stk. a <span id="getk200"
												style="display:none"></span><br /><span id="slutstolpe1_rate"></span>
										</td>

										<td style="text-align: right;" data-label="Total"><span
												id="slutstolpe1_total"></span> </td>
									</tr>
									<tr class="post1tr">
										<td data-label="Beskrivelse" id="post1_title" style="text-align: top;">Midter
											stolpe<br /><span id="post1_sku"></span></td>
										<td data-label="Antal" style="text-align: bottom;"><input id="post1"
												style="width: 100px;" name="post1" readonly="readonly" type="hidden" />
											<span id="post1html"></span>  stk. a <span id="getk201"
												style="display:none"></span><br /><span id="post1_rate"></span>
										</td>

										<td style="text-align: right;" data-label="Total"><span id="post1_total"></span>
										</td>
									</tr>
									<tr class="stolpe1tr">
										<td data-label="Beskrivelse" id="stolpe1_title" style="text-align: top;">Stolpe
											90° <br /><span id="stolpe1_sku"></span></td>
										<td data-label="Antal" style="text-align: bottom;"><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 class="stolpe2tr">
										<td data-label="Beskrivelse" style="text-align: top;">Stolpe 45°<br /><span
												id="stolpe2_sku"></span></td>
										<td data-label="Antal" style="text-align: bottom;"><input id="stolpe2"
												style="width: 100px;" name="stolpe2" readonly="readonly"
												type="hidden" />
											<span class="stolpe2html"></span> stk. a 											<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" style="text-align: top;">Alu Design
											stolpe<br /><span id="alu_design_stlope_sku"></span></td>
										<td data-label="Antal" style="text-align: bottom;"><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 											<select id="alu_color" style="display:none;width: 150px;" name="alu_color">
												<option value="alu">Alu</option>
												<option selected="selected" value="black">Antrazit/Black</option>
											</select><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 style="display: none;">
										<td data-label="Beskrivelse" style="text-align: top;">Stolpetykkelse<br /><span
												id="postsizetype1_sku"></span></td>
										<td data-label="Antal" style="text-align: bottom;"><input id="postsizetype1"
												style="width: 100px;" name="postsizetype1" readonly="readonly"
												type="hidden" />
											<span id="postsizetype1html"></span> stk. a <span id="getpostsize"
												style="display:none"></span>
											<script>
												function postsize() {
													document.getElementById('getpostsize').innerHTML = document.getElementById('postsize1').value.replace('mm', ' mm');
												}
											</script><br /><span id="postsizetype1_rate"></span>
										</td>

										<td style="text-align: right;" data-label="Total"><span
												id="postsizetype1_total"></span> </td>
									</tr>
									<tr class="alu_bundskinnetr">
										<td data-label="Beskrivelse" id="alu_bundskinne_title" style="text-align: top;">
											Top/bundskinne<br /><span id="alu_bundskinne_sku"></span></td>
										<td data-label="Antal" style="text-align: bottom;"><input
												id="alu_bundskinne_hidd" name="alu_bundskinne_hidd" type="hidden"
												value="" />
											<input id="alu_bundskinne" style="width: 100px;" name="alu_bundskinne"
												readonly="readonly" type="hidden" value="" />
											<span id="alu_bundskinnehmtl"></span> sæt. a <br /><span
												id="alu_bundskinne_rate"></span>
										</td>

										<td style="text-align: right;" data-label="Total"><span
												id="alu_bundskinne_total"></span> </td>
									</tr>
									<tr class="wqs_condition_2" style="display: none;">
										<td data-label="Beskrivelse" style="text-align: top;">Montageklæb <br /><span
												id="alu_montageklaeb_sku"></span></td>
										<td data-label="Antal" style="text-align: bottom;"><input
												id="alu_montageklaeb_hidd" name="alu_montageklaeb_hidd" type="hidden"
												value="" />
											<input id="alu_montageklaeb" style="width: 100px;" name="alu_montageklaeb"
												readonly="readonly" type="hidden" value="" />
											<span id="alu_montageklaebhtml"></span> stk. <br /><span
												id="alu_montageklaeb_rate"></span>
										</td>

										<td style="text-align: right;" data-label="Total"><span
												id="alu_montageklaeb_total"></span> </td>
									</tr>
									<tr class="montage_klaebtr">
										<td data-label="Beskrivelse" id="montage_klaeb_title" style="text-align: top;">
											Montage klæb <br /><span id="montage_klaeb_sku"></span></td>
										<td data-label="Antal" style="text-align: bottom;"><input id="montage_klaeb"
												style="width: 100px;" name="montage_klaeb" readonly="readonly"
												type="hidden" value="" />
											<span id="montage_klaebhtml"></span> stk. <br /><span
												id="montage_klaeb_rate"></span>
										</td>

										<td style="text-align: right;" data-label="Total"><span
												id="montage_klaeb_total"></span> </td>
										</td>
									</tr>
									<tr class="power1tr">
										<td data-label="Beskrivelse" style="text-align: top;">Power Supply <br /><span
												id="power1_sku"></span></td>
										<td data-label="Antal" style="text-align: bottom;"><input id="power1"
												style="width: 100px;" name="power1" readonly="readonly" type="hidden" />
											<span id="power1html"></span> stk. a  <br /><span
												id="power1_rate"></span>
										</td>

										<td style="text-align: right;" data-label="Total"><span
												id="power1_total"></span> </td>
									</tr>
									<tr class="led1tr">
										<td data-label="Beskrivelse" style="text-align: top;">LED <br /><span
												id="led1_sku"></span></td>
										<td data-label="Antal" style="text-align: bottom;"><input id="led1"
												style="width: 100px;" name="led1" readonly="readonly" type="hidden" />
											<span id="led1html"></span>stk. a  <br /><span
												id="led1_rate"></span>
										</td>

										<td style="text-align: right;" data-label="Total"><span id="led1_total"></span>
										</td>
									</tr>
									<tr class="acc1_cnttr">
										<td data-label="Beskrivelse" id="acc1_cnt_title" style="text-align: top;">
											Imprægnering 1L <br /> <span id="acc1_cnt_sku"></span></td>
										<td data-label="Antal" style="text-align: bottom;"><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" id="acc3_cnt_title" style="text-align: top;">Rens
											750ml <br /><span id="acc3_cnt_sku"></span></td>
										<td data-label="Antal" style="text-align: bottom;"><input id="acc3_cnt"
												style="width: 100px;" name="acc3_cnt" readonly="readonly"
												type="hidden" />
											<span id="acc3_cnthtml"></span> stk. a 											<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 class="acc4_cnttr">
										<td data-label="Beskrivelse" id="acc4_cnt_title" style="text-align: top;">
											Zinkspray <br /> <span id="acc4_cnt_sku"></span></td>
										<td data-label="Antal" style="text-align: bottom;"><input id="acc4_cnt"
												style="width: 100px;" name="acc4_cnt" readonly="readonly"
												type="hidden" />
											<span id="acc4_cnthtml"></span> stk. a  <br /><span
												id="acc4_cnt_rate"></span>
										</td>

										<td style="text-align: right;" data-label="Total"><span
												id="acc4_cnt_total"></span> </td>
									</tr>
									<tr class="acc11_cnttr">
										<td data-label="Beskrivelse" id="acc11_cnt_title" style="text-align: top;">Låge
											<span class="lageName"></span> inkl. stolper <br /><span
												id="acc11_cnt_sku"></span>
										</td>
										<td data-label="Antal" style="text-align: bottom;"><input id="acc11_cnt"
												style="width: 100px;" name="acc11_cnt" readonly="readonly"
												type="hidden" />
											<span id="acc11_cnthmtl"></span> stk. a <br /><span
												id="acc11_cnt_rate"></span>
										</td>

										<td style="text-align: right;" data-label="Total"><span
												id="acc11_cnt_total"></span> </td>
									</tr>
									<tr>
										<td style="text-align: top;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"
												value="" />
											<span id="totalhtml"></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/galvaniseret.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" style="display:none;"> Side A-H:3m-B:4m </div>
								<input type="hidden" name="datablade_img1" id="datablade_img1"
									value="https://kirkedalkomposit.dk/wp-content/uploads/2016/08/datablad_galv-1024x802.png">
								<input type="hidden" name="datablade_link1" id="datablade_link1"
									value="https://kirkedalkomposit.dk/wp-content/uploads/2016/08/Kirkedal-Datablad-Hegn-Galvaniseret-Design-Serie-5.korr_.pdf">
								<input type="hidden" name="pdfemail" id="pdfemail" value="">
								<input type="hidden" name="pdfphone" id="pdfphone" value="">
								<input type="hidden" name="pdfagree" id="pdfagree" value="">
								<input 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="pdfprotopbundskinne" name="pdfprotopbundskinne" 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_acc11_cnt" name="pdf_acc11_cnt" type="hidden" value="" />
								<input id="pdf_lager_id" name="pdf_lager_id" type="hidden" value="" />
								<input id="pdf_lager_cnt" name="pdf_lager_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 id="pdf_fence12" name="pdf_fence12" type="hidden" value="" />
								<input id="pdf_fence12_sku" name="pdf_fence12_sku" type="hidden" value="" />
								<input id="pdf_fence12_rate" name="pdf_fence12_rate" type="hidden" value="" />
								<input id="pdf_fence12_total" name="pdf_fence12_total" type="hidden" value="" />
								<input type="hidden" name="pdf_fence12_color" id="pdf_fence12_color" 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_slutstolpe_id" id="pdf_slutstolpe_id" value="" />
								<input type="hidden" name="pdf_kirkedalstolpe_id" id="pdf_kirkedalstolpe_id" value="" />
								<input type="hidden" name="pdf_hjornestolpe_id" id="pdf_hjornestolpe_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_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="1151" />
								<input type="hidden" name="pdf_montage_klaeb" id="pdf_montage_klaeb" value="" />

								<input type="hidden" name="pdf_sidepprofil_sku" id="pdf_sidepprofil_sku" value="" />
								<input type="hidden" name="pdf_sidepprofil_qty" id="pdf_sidepprofil_qty" value="" />
								<input type="hidden" name="pdf_stolpe_sku" id="pdf_stolpe_sku" value="" />

								<input type="hidden" name="pdf_sanded_black_sku" id="pdf_sanded_black_sku" value="" />
								<input type="hidden" name="pdf_sanded_black_sku_qty" id="pdf_sanded_black_sku_qty"
									value="" />


								<input type="hidden" name="pdf_stolpe_qty" id="pdf_stolpe_qty" 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="hidden" name="pdf_Zinkspray_id" id="pdf_Zinkspray_id" value="" />
								<input type="hidden" name="pdf_Zinkspray_cnt" id="pdf_Zinkspray_cnt" value="" />
								<input type="submit" id="printsubmit" value="Print/Send beregningen"
									style="display: none;" />
								<input type="button" id="addtocartbutton" value="Tilføj indkøbskurven"
									style="display: none;" onclick="add_to_cart()" />
							</form>
						</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>
							<p
								style="text-align: center;margin: 4px 0;opacity: 0.8;font-size: 14px;padding: 0; margin-top:40px;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>
			</div>
			<script>
				// $(".all-data-list-finel").hide();	
				jQuery("li.down-arrow-list").click(function () {

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


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

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

								}
							</style>
							<div class="show-3d-box"> <img class="minimizebutton"
									src="https://kirkedalkomposit.dk/wp-content/uploads/2022/02/minimize.png" alt=""
									title="" style="display: none;">
																<img class="mouse_gest"
									src="https://kirkedalkomposit.dk/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>
			<style type="text/css">
				.tbl_custom_data span {
					padding: 0 0;
					font-size: 14px;
				}

				#tbl_custom_data tr,
				#tbl_custom_data1 tr {
					border-bottom: 1px solid;
				}
			</style>
			<table id="tbl_custom_data1" border="0" style="width:100%;display:none;" width="1000px" cellspacing="0"
				cellpadding="5">
				<tr>
					<td style="padding-left: 20px; width: 500px;">												<!--<button onClick="set_colors()">Vælg denne farve for alle</button>-->

						<input id="submitBtn1"
							style="background-color: #51ae51; color: #fffdfd; border-radius: 2px; float: right;"
							type="button" value="Opdater beregning">
					</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>
			</table>

			<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://kirkedalkomposit.dk/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 / Verzinkter Zaun</span> <img
										src="https://kirkedalkomposit.dk/wp-content/uploads/2021/01/Beregner_billede_Galvaniseret-hegn_3.jpg"
										alt="" title=""></li>
								<li class="active-list sidebar_calc_box1"><span>2. Vælg form</span> <img
										src="https://kirkedalkomposit.dk/wp-content/images/form3.jpg" alt="" title="">
								</li>
								<li class="active-list sidebar_calc_box2"><span>3. Dimensioner</span> <b
										class="dimention" style="  ">A:5X6 B: 5X4 A:5X6 B: 5X4 A:5X6 B: 5X4</b></li>
								<li class="active-list sidebar_calc_box3"><span>4. Vælg profil</span> <img
										src="https://kirkedalkomposit.dk/wp-content/uploads/2021/07/vaelg-profil-1.jpg"
										alt="" title=""></li>
								<li class="active-list sidebar_calc_box44"><span>5. Seitenprofil</span> <img
										src="https://kirkedalkomposit.dk/wp-content/uploads/2020/12/Web_DSC_4795.jpg"
										alt="" title=""></li>
								<li class="disabled active-list sidebar_calc_box4"><span>6. Beitragstyp wählen</span>
									<img src="https://kirkedalkomposit.dk/wp-content/uploads/2021/07/vaelg-stolpestorrelse2.jpg"
										alt="" title="">
								</li>
								<li class="active-list sidebar_calc_box5"><span>7. Zubehör</span> <img
										src="https://kirkedalkomposit.dk/wp-content/uploads/2021/07/vaelg-topprofil.jpg"
										alt="" title=""></li>
								<li class="button_mu_cstm_class_mmmm video_show_button_mcmcmc"><span>Siehe
										Montageanleitungsvideo</span></li>
							</ul>
						</div>
						<div class="total-row">
							<div class="te-price"> Total <br><span id="totaltotl"></span> </div>
							<div class="button-row">
								<button type="button" id="printpdff">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-7" 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>Start</span> <img src="https://kirkedalkomposit.dk/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
			<li class="active-list sidebar_calc_box1"><span>Vælg profil</span> <img src="https://kirkedalkomposit.dk/wp-content/images/form3.jpg" alt="" title=""></li>
			<li class="active-list sidebar_calc_box2"><span>3. Dimensioner</span> <img src="https://kirkedalkomposit.dk/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
			<li class="active-list sidebar_calc_box3"><span>4. Vælg profil</span> <img src="https://kirkedalkomposit.dk/wp-content/uploads/2021/07/vaelg-profil-1.jpg" alt="" title=""></li>
			<li class="active-list sidebar_calc_box4"><span>5. Vælg stolpetype</span> <img src="https://kirkedalkomposit.dk/wp-content/uploads/2021/07/vaelg-stolpestorrelse2.jpg" alt="" title=""></li>
			<li class="active-list sidebar_calc_box5"><span>6. Vælg topprofil</span> <img src="https://kirkedalkomposit.dk/wp-content/uploads/2021/07/vaelg-topprofil.jpg" alt="" title=""></li>
			<li class="active-list sidebar_calc_box6"><span>7. Vælg tilbehor</span> <img src="https://kirkedalkomposit.dk/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title=""></li>
		  </ul>
		</div>
		<div class="total-row">
		  <div class="te-price"> Total <span id="totaltotl" ></span> </div>
		  <div class="button-row">
			<button type="button" id="printpdf">Print/Send beregningen</button>
			<button type="button" id="addtocart">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://kirkedalkomposit.dk/wp-content/uploads/2021/07/show-3d.jpg" alt="" title=""> </div>
		  </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 / Verzinkter Zaun</span> <img
										src="https://kirkedalkomposit.dk/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://kirkedalkomposit.dk/wp-content/uploads/2021/07/serie-1.jpg" alt=""
										title=""> </div>
								<div class="serie-img"> <img
										src="https://kirkedalkomposit.dk/wp-content/uploads/2021/07/serie-2.jpg" alt=""
										title=""> </div>
								<div class="serie-img"> <img
										src="https://kirkedalkomposit.dk/wp-content/uploads/2021/07/serie-3.jpg" alt=""
										title=""> </div>
								<div class="serie-img"> <img
										src="https://kirkedalkomposit.dk/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://kirkedalkomposit.dk/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">
	  <tdead>
		<tr>
		  <td>Beskrivelse</td>
		  <td>Antal </td>
		  <td>Varenr.</td>
		  <td>Pris pr. stk. </td>
		  <td>Total</td>
		</tr>
	  </tdead>
	  <tbody>
		<tr>
		  <td data-label="Beskrivelse">Profil</td>
		  <td data-label="Antal">132 stk. a K1</td>
		  <td data-label="Varenr."> 1826497</td>
		  <td data-label="Pris pr. stk."> 123,95 DDK</td>
		  <td data-label="Total">16.757,40 DKK</td>
		</tr>
		<tr>
		  <td data-label="Beskrivelse">Profil</td>
		  <td data-label="Antal">132 stk. a K1</td>
		  <td data-label="Varenr."> 1826497</td>
		  <td data-label="Pris pr. stk."> 123,95 DDK</td>
		  <td data-label="Total">16.757,40 DKK</td>
		</tr>
		<tr>
		  <td data-label="Beskrivelse">Profil</td>
		  <td data-label="Antal">132 stk. a K1</td>
		  <td data-label="Varenr."> 1826497</td>
		  <td data-label="Pris pr. stk."> 123,95 DDK</td>
		  <td data-label="Total">16.757,40 DKK</td>
		</tr>
		<tr>
		  <td data-label="Beskrivelse">Profil</td>
		  <td data-label="Antal">132 stk. a K1</td>
		  <td data-label="Varenr."> 1826497</td>
		  <td data-label="Pris pr. stk."> 123,95 DDK</td>
		  <td data-label="Total">16.757,40 DKK</td>
		</tr>
		<tr>
		  <td data-label="Beskrivelse">Profil</td>
		  <td data-label="Antal">132 stk. a K1</td>
		  <td data-label="Varenr."> 1826497</td>
		  <td data-label="Pris pr. stk."> 123,95 DDK</td>
		  <td data-label="Total">16.757,40 DKK</td>
		</tr>
		<tr>
		  <td data-label="Beskrivelse">Profil</td>
		  <td data-label="Antal">132 stk. a K1</td>
		  <td data-label="Varenr."> 1826497</td>
		  <td data-label="Pris pr. stk."></td>
		  <td data-label="Total">16.757,40 DKK</td>
		</tr>
		<tr>
		  <td data-label="Beskrivelse">Profil</td>
		  <td data-label="Antal">132 stk. a K1</td>
		  <td data-label="Varenr."> 1826497</th>
		  <td data-label="Pris pr. stk."> 123,95 DDK</td>
		  <td data-label="Total">16.757,40 DKK</td>
		</tr>
		<tr>
		  <td style="text-align: left;">Total</td>
		  <td colspan="4" style="text-align: right;"><span>26.244,60</span> DKK inkl. moms</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>
	</div>
	<script
		src="https://maps.googleapis.com/maps/api/js?key=AIzaSyA8atx7IHiqGwW7pIxhDG52G8JAS-Oj1sU&amp;signed_in=false&amp;libraries=geometry,places,drawing"></script>
	<script>
		jQuery(document).ready(function () {
			var points_cnt = 0;

			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', ''));
			}
			jQuery("#printpdf").click(function (e) {

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

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

			// jQuery("#printpdf").click(function () {
			// 	// alert();
			// 	jQuery("#printsubmit").trigger("click");
			// });
			/*		jQuery("#printpdf").click(function(){
							jQuery("#printsubmit").trigger("click");
					});*/
			jQuery("#addtocart").click(function () {
				jQuery("#addtocartbutton").trigger("click");
			});


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




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

				vaelgform = jQuery(this).find('img').attr('src');
				//	console.log(vaelgform);
				jQuery('#Volgform img').attr('src', vaelgform);
				jQuery('#Volgform img').show();

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


				} else if (velgformdata_id == '2') {
					jQuery(".dimensioner-form #form2_2").show();
					jQuery(".dimensioner-form #form2_2").addClass("activee");
				}
				else if (velgformdata_id == '3') {
					jQuery(".dimensioner-form #form3_3").show();
					jQuery(".dimensioner-form #form3_3").addClass("activee");
				}
				else if (velgformdata_id == '4') {
					jQuery(".dimensioner-form #form4_4").show();
					jQuery(".dimensioner-form #form4_4").addClass("activee");
				}
				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 select").each(function () {
					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(',', '.'));

					}

					i++;
				});
				jQuery(".dimensioner-form .activee input[type=number]").each(function () {
					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("length_") >= 0) form_lengths.push(jQuery(this).val().replace(',', '.'));
					}

					i++;
				});

				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();
				//		  		//jQuery('#topmodel').val(Vælgform);
				//		  		jQuery('input#post').val(Vælgform);
				//		  		img = 'https://kirkedalkomposit.dk/wp-content/uploads/2021/07/cal.png';
				//					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);
				//					jQuery(".sidebar_calc_box2").find('img').attr("src",img);
				// 		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');
				jQuery('.cal_top_img1_wrap img').attr('src', Vælgprofil);
				jQuery("#product_img").val(Vælgprofil);
				hidFence = jQuery(".hidFence").val();
				//hidColor = jQuery(".hidColor").val();
				hidColor = jQuery(this).find('.hidColor').val();
				jQuery(".sidebar_calc_box3").find('img').attr('src', Vælgprofil);
				jQuery("#product_img").val(Vælgprofil);
				var mainHeight = '';
				jQuery("[id*=height_]").each(function () {
					if (jQuery(this).val() != '') {

						mainHeight = jQuery(this).val();
					}
				});
				console.log(mainHeight);
				var lageName = '';
				if (mainHeight == '0.9')
					lageName = 'K22';
				if (mainHeight == '1.4')
					lageName = 'K23';
				if (mainHeight == '1.8')
					lageName = 'K24';

				jQuery('.lageName').html(lageName);
				var f = jQuery(this).find('.hidFence').val();
				var f_color = jQuery(this).find('.hidColor').val();

				f_color = f_color.toLowerCase();

				console.log(f_color);

				jQuery("#profil_color").val(f_color);

				//alert(f);

				if (f == "K1s") {
					jQuery("#profil_color").parent('td').hide();
				}

				jQuery('input#model').val(f);



				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('.calculator-box').hide();
				jQuery('.calculator-box.calculator-44').show();

				if (mainHeight == '0.9') {
					jQuery('.calculator-box.calculator-44 .product_item').filter(function () {
						return jQuery(this).find('input.hidPostsize').val() === '990mm';
					}).each(function () {
						handleProductItemClick(jQuery(this));  // Call the function for the item
					});
				}
				if (mainHeight == '1.4') {
					jQuery('.calculator-box.calculator-44 .product_item').filter(function () {
						return jQuery(this).find('input.hidPostsize').val() === '1410mm';
					}).each(function () {
						handleProductItemClick(jQuery(this));  // Call the function for the item
					});
				}
				if (mainHeight == '1.8') {
					jQuery('.calculator-box.calculator-44 .product_item').filter(function () {
						return jQuery(this).find('input.hidPostsize').val() === '1830mm';
					}).each(function () {
						handleProductItemClick(jQuery(this));  // Call the function for the item
					});
				}

			});

			function handleProductItemClick(item) {

				postsize_img = jQuery(item).find('img').attr('src');
				hidPostsize = jQuery(item).find('.hidPostsize').val();
				product_type = jQuery(item).find('.hidPostsize').attr("product_type");
				sku = jQuery(item).find('.hidPostsize').attr("sku");

				if (product_type == "ingen") {
					postsize_img = "";
					sku = "";
				}

				console.log(hidPostsize);

				jQuery(".sidebar_calc_box44").find('img').attr('src', postsize_img);
				jQuery(".sidebar_calc_box44").find('img').attr('product_type', product_type);
				jQuery(".sidebar_calc_box44").find('img').attr('hidPostsize', hidPostsize);
				jQuery(".sidebar_calc_box44").find('img').attr('sku', sku);

				if (product_type == "sideprofil") {

					if (sku == "2456368") {
						jQuery(".calculator-box.calculator-4").find(".2456368").click();
					} else if (sku == "2456369") {
						jQuery(".calculator-box.calculator-4").find(".2456369").click();
					} else if (sku == "2399089") {
						jQuery(".calculator-box.calculator-4").find(".2399089").click();
					} else {
						jQuery(".calculator-box.calculator-4").find(".2456368").click();
					}

				} else {

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

			jQuery('.calculator-box.calculator-44 .product_item').click(function () {
				handleProductItemClick(jQuery(this));
			});

			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');
				hidPostsize = jQuery(this).find('input').val();
				product_type = jQuery(this).find('input').attr('product_type');
				sku = jQuery(this).find('input').attr('sku');
				jQuery('#postsize').val(hidPostsize);
				jQuery('#postsize1').val(product_type);

				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(".sidebar_calc_box4").find('img').attr('sku', sku);

				//-------------------------
				if (product_type == "K200") {
					jQuery('#getk200').text('K200');
					jQuery('#getk201').text('K201');
					//jQuery('#getk202' ).text('K202');
					jQuery('#pdf_k201_id').val('K201');

					jQuery('#postsize1').val('K200');
					jQuery('#getk202').text('K202');
					jQuery('#pdf_k202_id').val('K202');
				}
				else if (product_type == "K300") {
					jQuery('#getk200').text('K300');
					jQuery('#getk201').text('K301');
					// jQuery('#getk202' ).text('K202');
					jQuery('#pdf_k201_id').val('K301');
					jQuery('#postsize1').val('K300');
					jQuery('#getk202').text('K302');
					jQuery('#pdf_k202_id').val('K302');
				}
				jQuery('#pdf_k200_id').val(jQuery(this).find('input').attr('product_type'));
				jQuery('#wqs_control_segment').val('unset');
				//-------------------------
				jQuery('.calculator-box').hide();
				jQuery('.calculator-box.calculator-5').show();
			});
			accs = {};
			jQuery('.calculator-box.calculator-5 .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 rgba(255,255,255,1)');
					jQuery(this).find('input[type="checkbox"]').prop("checked", false);
					if (acc == "acc4") {
						acc_4_cnt = jQuery(this).find('#Acc4_val').val();
						jQuery(".sidebar_calc_box5").find('img').removeAttr('acc_4_cnt', acc_4_cnt);

					}
					accs[acckey] = '';
				}

				else {
					if (acc == "acc4") {
						acc_4_cnt = jQuery(this).find('#Acc4_val').val();
						jQuery(".sidebar_calc_box5").find('img').attr('acc_4_cnt', acc_4_cnt);

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


				//accs[acckey] = acc;

				console.log(accs);
				jQuery(".sidebar_calc_box5").find('img').attr('src', accessories);
				jQuery(".sidebar_calc_box5").find('img').attr('led', magicradio);
				jQuery(".sidebar_calc_box5").find('img').attr('acc', acc);
				jQuery(".sidebar_calc_box5").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();
			});
			jQuery('#Acc4_val').on("change", function () {

				acc_4_cnt = jQuery(this).val();
				jQuery(".sidebar_calc_box5").find('img').attr('acc_4_cnt', acc_4_cnt);
			});


			/*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');
				console.log(acc);
				jQuery(".sidebar_calc_box6").find('img').attr('src',accessories);
				jQuery(".sidebar_calc_box6").find('img').attr('led',magicradio);
				jQuery(".sidebar_calc_box6").find('img').attr('acc',acc);
		
				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();
			});*/

			jQuery(".btn_beregn").click(function () {
				jQuery('.all-data-list-finel').hide();
				var fencetype = jQuery("#fencetype").val();
				console.log("fencetype=" + fencetype);
				var len = jQuery('input#length').val();
				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(".sidebar_calc_box3").find('img').attr('hidcolor');
				//var Vælgfarve='Black';
				color_frave = jQuery(".sidebar_calc_box3").find('img').attr('hidcolor');
				console.log(color_frave);
				color_val = jQuery(".sidebar_calc_box4").find('img').attr('color_val');

				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ælgstolpe2 = jQuery('input#postsize1').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("#Acc1").parent('div').parent('.product_item').hasClass('active')) { accessories.push("acc1"); }
				//if (jQuery("#Acc2").is(":checked")) accessories.push("acc2");
				if (jQuery("#Acc2").parent('div').parent('.product_item').hasClass('active')) { accessories.push("acc2"); }
				//if (jQuery("#Acc3").is(":checked")) accessories.push("acc3");
				if (jQuery("#Acc3").parent('div').parent('.product_item').hasClass('active')) { accessories.push("acc3"); }
				//if (jQuery("#Acc4").is(":checked")) accessories.push("acc4");
				if (jQuery("#Acc4").parent('div').parent('.product_item').hasClass('active')) { accessories.push("acc4"); }
				//if (jQuery("#Acc5").is(":checked")) accessories.push("acc5");
				if (jQuery("#Acc5").parent('div').parent('.product_item').hasClass('active')) { accessories.push("acc5"); }


				var acc11CNT = jQuery("#Acc11CNT").val();
				if (acc11CNT > 0) {
					accessories.push("acc11");
				}

				var lengths = [];
				jQuery(".dimensioner-form .activee [type=number]").each(function () {
					lengths.push(jQuery(this).val());
				});

				var heights = [];
				jQuery(".dimensioner-form .activee select").each(function () {
					heights.push(jQuery(this).val());
				});
				console.log(heights);
				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;
				jQuery(".dimensioner-form .activee select").each(function () {
					value = jQuery(this).val();
					if (value != "") {
						console.log(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('');
				jQuery('.height_with_info').html(height_width_str);
				switchMap = 'true';
				acc_4_cnt = jQuery(".active-list.sidebar_calc_box5").find("img").attr("acc_4_cnt");
				sideprofil = jQuery(".active-list.sidebar_calc_box44").find("img").attr("product_type");

				sideprofil_size = jQuery(".active-list.sidebar_calc_box44").find("img").attr("hidpostsize");
				sideprofil_sku = jQuery(".active-list.sidebar_calc_box44").find("img").attr("sku");




				if (corners_cnt < 0) corners_cnt = 0;
				if (points_cnt < 0) points_cnt = 0; var dataString = '&fenceheightcount=' + fencetype + '&frave_color=' + color_frave + '&stolpestorrelse_color=' + color_val + '&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ælgstolpe2=' + Vælgstolpe2 + '&Vælgstolpe2=' + Vælgstolpe2 + '&Vælgendekap=' + Vælgendekap + '&switchMap=' + switchMap + '&map_length=' + map_length + '&corners_cnt=' + corners_cnt + '&points_cnt=' + points_cnt + '&acc11CNT=' + acc11CNT + '&lengths=' + lengths.toString() + '&heights=' + heights.toString() + '&form_lengths=' + form_lengths.join() + '&form_heights=' + form_heights.join() + '&sideprofil=' + sideprofil + '&sideprofil_size=' + sideprofil_size + '&sideprofil_sku=' + sideprofil_sku;
				if (accessories.length > 0) dataString += "&accessories=" + accessories.toString() + "&acc_4_cnt=" + acc_4_cnt;
				console.log("datavbalue=" + dataString);
				jQuery.ajax({

					type: "POST",
					dataType: 'json',

					url: "/wp-content/calculation-galvaniseret_new_product_new.php",
					data: dataString,
					success: function (msg) {
						console.log(msg[12]);
						/* 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 < 35; inc++) {
							if (msg[inc] < 0) { msg[inc] = 0; }
						}

						jQuery('#length1').val(msg[0]);
						jQuery('#width1').val(msg[1]);
						jQuery('#fence1').val(msg[2]);
						jQuery('#fence1html').html(msg[2]);

						//jQuery('#fence1_rate').text(msg[29]['profil_unit_cost']);
						//jQuery('#fence1_total').text(msg[29]['profil_cost']);
						//jQuery('#fence1_sku').text(msg[29]['profil_sku']);
						console.log("sku1=" + msg[29]['profil_sku']);
						//if(msg[29]['profil_title'] == ""){
						//							jQuery('#fence1_title').text('Profil');
						//						}else{
						//							  if(msg[29]['profil_title'] == 'Unique '){
						//                                    msg[29]['profil_title'] = 'Profil';
						//                                }
						//							jQuery('#fence1_title').text(msg[29]['profil_title']);
						//						}
						jQuery('#gettotal1').text(msg[16]);

						if (msg[39][0]['Profil_sku_status'] == '2') {
							jQuery('.fence1tr').show();

							//jQuery('#fence1_rate').text(msg[39][0]['Profil_rate']);
							//jQuery('#fence1_sku').text(msg[39][0]['Profil_sku']);
							//jQuery('#fence1_total').text(msg[39][0]['Profil_total_rate']);

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

							jQuery('#pdf_sanded_black_sku').val(msg[39]['profil_sku']);
							jQuery('#pdf_sanded_black_sku_qty').val(msg[39][0]['Profil']);

							//console.log("sku"+msg[29]['profil_sku']);
							//jQuery('#fence1_total').text(msg[39][0]['Profil_total_rate']);
							f_tottal = (parseFloat(msg[39]['profil_unit_cost']) * parseFloat(msg[39][0]['Profil'])).toFixed(2);
							//console.log(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[39]['profil_unit_cost'])*(msg[39][0]['Profil_rate']));
							//console.log("t1");
							jQuery('#fence1_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(f_tottal));
							jQuery('#fencehtml').html(msg[2]);
							jQuery("#fence2").hide();

						}
						if (msg[39][0]['Profil_sku_status'] == '1') {
							if ((msg[39][0]['Profil_rate_color_black'] == 'Black')) {
								jQuery('.fence1tr').show();
								jQuery('#fence1').val(msg[39][0]['Profil_slop']);
								jQuery('#fence1html').html(msg[39][0]['Profil_slop']);

								jQuery('#pdf_sanded_black_sku').val(msg[39]['profil_sku']);
								jQuery('#pdf_sanded_black_sku_qty').val(msg[39][0]['Profil_slop']);

								jQuery('#fence1_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[39][0]['Profil_rate']));
								jQuery('#fence1_sku').text("DB " + msg[39][0]['Profil_sku']);
								//jQuery('#fence1_total').text(msg[39][0]['Profil_total_rate']);
								//console.log(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[39][0]['Profil_slop']*msg[39][0]['Profil_rate']));
								//console.log("t2");
								ftotal = msg[39][0]['Profil_slop'] * msg[39][0]['Profil_rate'];
								jQuery('#fence1_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(ftotal));
							} else {
								jQuery(".fence1tr").hide();
								jQuery('#fence1').val('0');
								jQuery('#fence1html').html('');
								jQuery('#fence1_rate').text('');
								jQuery('#fence1_sku').text('');
								jQuery('#fence1_total').text('');
							}
							if ((msg[39][0]['Profil_rate_color_gray'] == 'Grey')) {
								jQuery(".fence2tr").show();
								jQuery('#fence12').val(msg[39][0]['Profil_slop_gray']);
								jQuery('#fencehtml2').html(msg[39][0]['Profil_slop_gray']);
								jQuery('#fence12_rate').text(msg[39][0]['Profil_rate_gray']);
								jQuery('#fence12_sku').text(msg[39][0]['Profil_sku_gray']);
								jQuery('#fence12_total').text(msg[39][0]['Profil_total_rate_gray']);
								jQuery('#pdf_fence12').val(msg[39][0]['Profil_slop_gray']);
								jQuery('#pdf_fence12_sku').val(msg[39][0]['Profil_sku_gray']);
								jQuery('#pdf_fence12_rate').val(msg[39][0]['Profil_rate_gray']);
								jQuery('#pdf_fence12_total').val(msg[39][0]['Profil_total_rate_gray']);
								//fence12_total = jQuery("#fence12_total").html();
								jQuery('#pdf_fence12_color').val(fence12_total);
							} else {
								jQuery(".fence2tr").hide();
							}
						}

						jQuery(".door_product_wrap").hide();
						jQuery(".door_product3_wrap").hide();
						jQuery(".door_product2_wrap").hide();
						jQuery(".door_product4_wrap").hide();
						if (msg[39][0]['blackaludoorprofilecount'] != undefined) {

							jQuery(".door_product_wrap").show();
							jQuery(".alublackdoor").html(msg[39][0]['blackaludoorprofiletitile']);
							jQuery("#alublackdoor_product").val(msg[39][0]['blackaludoorprofilecount']);
							jQuery(".alublackdoor_product_qty").val(msg[39][0]['blackaludoorprofilecount']);
							jQuery("#alublackdoordoor_product_html").html(msg[39][0]['blackaludoorprofilecount']);

							jQuery("#alublackdoor_product_sku").html(msg[39][0]['blackaludoorprofile_sku']);
							jQuery("#alublackdoor_product_rate").html(msg[39][0]['blackaludoorprofile_price']);
							jQuery("#alublackdoor_product_total").html(msg[39][0]['blackaludoorprofile_total_rate']);
							jQuery("#blackaluedoor_id").val(msg[39][0]['blackaludoorprofileid']);
							jQuery("#blackaluedoor_stock").val(msg[39][0]['blackaludoorprofilecount']);
							jQuery("#pdf_lager_cnt").val(msg[39][0]['blackaludoorprofilecount']);
							jQuery("#pdf_lager_id").val(msg[39][0]['blackaludoorprofileid']);

						} else {
							jQuery(".door_product_wrap").hide();
							jQuery("#blackaluedoor_id").val('');
							jQuery("#blackaluedoor_stock").val('');

						}

						if (msg[39][0]['grayaludoorprofilecount'] != undefined) {

							jQuery(".greyalu_door_title").html(msg[39][0]['grayaludoorprofiletitile']);
							jQuery("#greyalu_product3").val(msg[39][0]['grayaludoorprofilecount']);
							jQuery("#greyalu_product3_html").html(msg[39][0]['grayaludoorprofilecount']);
							jQuery("#greyalu_product3_sku").html(msg[39][0]['grayaludoorprofile_sku']);
							jQuery("#greyalu_product3_rate").html(msg[39][0]['grayaludoorprofile_price']);

							jQuery("#greyalu_product3_total").html(msg[39][0]['grayaludoorprofile_total_rate']);
							jQuery("#grayaludoor_id").val(msg[39][0]['grayaludoorprofileid']);
							jQuery("#grayaludoor_stock").val(msg[39][0]['grayaludoorprofilecount']);
							jQuery("#pdf_lager_cnt").val(msg[39][0]['grayaludoorprofilecount']);
							jQuery("#pdf_lager_id").val(msg[39][0]['grayaludoorprofileid']);
							jQuery(".door_product3_wrap").show();
						} else {
							jQuery(".door_product3_wrap").hide();
							jQuery("#grayaludoor_id").val('');
							jQuery("#grayaludoor_stock").val('');

						}

						if (msg[39][0]['doorprofilecount'] != undefined) {
							jQuery(".black_door_title").html(msg[39][0]['doorprofiletitile']);
							jQuery("#blackdoor_product2").val(msg[39][0]['doorprofilecount']);
							jQuery("#blackdoor_product2_html").html(msg[39][0]['doorprofilecount']);
							jQuery("#blackdoor_product2_sku").html(msg[39][0]['doorprofile_sku']);
							jQuery("#blackdoor_product2_rate").html(msg[39][0]['doorprofile_price']);
							jQuery("#blackdoor_product2_total").html(msg[39][0]['doorprofile_total_rate']);

							jQuery("#greyblackdoor_id").val(msg[39][0]['doorprofileid']);
							jQuery("#greyblackdoor_stock").val(msg[39][0]['doorprofilecount']);
							jQuery("#pdf_lager_cnt").val(msg[39][0]['doorprofilecount']);
							jQuery("#pdf_lager_id").val(msg[39][0]['doorprofileid']);

							jQuery(".door_product2_wrap").show();
						} else {
							jQuery(".door_product2_wrap").hide();
							jQuery("#greyblackdoor_id").val('');
							jQuery("#greyblackdoor_stock").val('');

						}


						if (msg[39][0]['blackblackdoorprofilestock'] != undefined) {
							jQuery(".blackblack_door_title").html(msg[39][0]['blackblackdoorprofiletitile']);
							jQuery("#blackblack_product4").val(msg[39][0]['blackblackdoorprofilestock']);
							jQuery("#blackblack_product4_html").html(msg[39][0]['blackblackdoorprofilestock']);
							jQuery("#blackblack_product4_sku").html(msg[39][0]['blackblackdoorprofile_sku']);
							jQuery("#blackblack_product4_rate").html(msg[39][0]['blackblackdoorprofile_price']);
							jQuery("#blackblack_product4_total").html(msg[39][0]['blackblackdoorprofile_total_rate']);

							jQuery("#blackblackedoor_id").val(msg[39][0]['blackblackdoorprofileid']);
							jQuery("#blackaluedoor_stock").val(msg[39][0]['blackblackdoorprofilestock']);
							jQuery("#pdf_lager_cnt").val(msg[39][0]['blackblackdoorprofilestock']);
							jQuery("#pdf_lager_id").val(msg[39][0]['blackblackdoorprofileid']);
							jQuery(".door_product4_wrap").show();

						} else {
							jQuery(".door_product4_wrap").hide();
							jQuery("#blackblackedoor_id").val('');
							jQuery("#blackaluedoor_stock").val('');

						}



						jQuery('#top1').val(msg[3]);
						console.log(msg[3]);
						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('#postsizetype1html').html('80x80mm');
						} else if (jQuery('#wqs_control_segment').val() == 'unset') {
							jQuery('#post1html').html(msg[4]);
							jQuery('#post1').val(msg[4]);

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

							jQuery('#post1_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[29]['kirkedal_cost']));
							jQuery('#post1_sku').text("DB " + msg[29]['kirkedal_sku']);
							//if(msg[29]['kirkedal_title'] !=""){
							//
							//								jQuery('#post1_title').text(msg[29]['kirkedal_title']);
							//							}else{
							//
							//								jQuery('#post1_title').text('Midter stolpe');
							//							}




							jQuery('#alu_design_stlope').val(' ');
							jQuery('#postsizetype1').val(msg[18]);
						}
						jQuery('#led1').val(msg[5]);
						jQuery('#led1html').html(msg[5]);
						jQuery('#total').val(msg[6]);
						jQuery('#totalhtml').html(msg[6]);
						jQuery('#totaltotl').html(msg[6]);
						jQuery('#totaltot2').html(msg[6]);
						if (msg[18] == '80x80mm') {
							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
							jQuery("#power1").parents("tr").hide();
							jQuery("#led1").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_bundskinnehmtl').html(msg[12]);

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

							jQuery('#alu_bundskinne_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[29]['endekap_cost']));
							jQuery('#alu_bundskinne_sku').text("DB " + msg[29]['endekap_sku']);
							if (msg[29]['endekap_title'] != "") {
								jQuery('#alu_bundskinne_title').text(msg[29]['endekap_title']);
							} else {
								jQuery('#alu_bundskinne_title').text('Top/bundskinne');
							}



							jQuery('#alu_montageklaeb').val(msg[28]);
							jQuery('#alu_montageklaebhtml').html(msg[28]);
						} 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('#alu_hide_endekap1').show();
							jQuery('#alu_hide_topklods1').show();

							//jQuery('#skruer1').val(msg[7]);
							jQuery(".wqs_condition_2").hide();
							jQuery('#alu_bundskinne').val('');
							jQuery('#alu_montageklaeb').val('');
						}

						jQuery('#stolpe1').val(msg[8]);
						jQuery('#stolpe1html').html(msg[8]);

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

						//if(msg[29]['stolpe90_unit_title'] !=""){
						//							jQuery('#stolpe1_title').text(msg[29]['stolpe90_unit_title']);
						//						}else{
						//							jQuery('#stolpe1_title').text('Stolpe 90°');
						//						}





						jQuery('#alu_bundskinne').val(msg[31]);
						jQuery('#alu_bundskinnehmtl').html(msg[31]);

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

						jQuery('#alu_bundskinne_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[29]['topbundskinne_cost']));
						jQuery('#alu_bundskinne_sku').text("DB " + msg[29]['topbundskinne_sku']);

						//if(msg[29]['topbundskinne_title'] !=""){
						//								jQuery('#alu_bundskinne_title').text(msg[29]['topbundskinne_title']);
						//							}else{
						//								jQuery('#alu_bundskinne_title').text('Top/bundskinne');
						//							}
						//jQuery('#alu_bundskinne_title').text(msg[29]['topbundskinne_title']);

						jQuery('#sideprofil_title_name').text(msg[39][0]['sideprofil_product_name'] + " - " + msg[39][0]['sideprofil_product_type']);
						jQuery('#sideprofilpe1').val(msg[39][0]['sideprofil_product_count']);

						jQuery('#sideprofilhtml').parent().html(`
							<span id="sideprofilhtml"></span> stk. a 
							<span id="getk200" style="display:none"></span><br />
							<span id="sideprofil_rate"></span>
						`);
						if (msg[39][0]['sideprofil_sku'] == '2456368' || msg[39][0]['sideprofil_sku'] == '2456369' || msg[39][0]['sideprofil_sku'] == '2399089') {
							let html = jQuery('#sideprofilhtml').parent().html();
							jQuery('#sideprofilhtml').parent().html(html.replace(' stk.', ' sæt.'));
						}

						jQuery('#sideprofilhtml').html(msg[39][0]['sideprofil_product_count'] + ' ');


						jQuery('#pdf_sidepprofil_sku').val(msg[39][0]['sideprofil_sku']);
						jQuery('#pdf_sidepprofil_qty').val(msg[39][0]['sideprofil_product_count']);


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

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

						var final_stolpe_count = (Number(msg[4]) || 0) + (Number(msg[8]) || 0) + (Number(msg[9]) || 0);
						var final_stolpe_total = (Number(msg[29]['startslut_unit_cost']) || 0) * final_stolpe_count;

						if (typeof msg[39][0]['sideprofil_product_name'] === "undefined") {
							jQuery(".sideprofiltr").hide();
						}
						if (msg[39][0]['sideprofil_product_name'] == "Kirkedal sideprofil") {
							jQuery(".post1tr").hide();
							jQuery("#slutstolpe1_title #slutstolpe1_title_name").text("Stolpe");
							jQuery(".stolpe1tr").hide();
						}


						jQuery('#slutstolpe1').val(final_stolpe_count);
						jQuery('#slutstolpe1html').html(final_stolpe_count);


						jQuery('#pdf_stolpe_sku').val(msg[29]['startslut_sku']);
						jQuery('#pdf_stolpe_qty').val(final_stolpe_count);

						//jQuery('#slutstolpe1_rate').text(msg[29]['slutstolpe_unit_cost']);
						//jQuery('#slutstolpe1_total').text(msg[29]['slutstolpe_cost']);

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

						jQuery('#slutstolpe1_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(final_stolpe_total));
						//jQuery('#slutstolpe1_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[29]['startslut_cost']));
						jQuery('#slutstolpe1_sku').text("DB " + msg[29]['startslut_sku']);
						//if(msg[29]['startslut_title'] !=""){
						//							jQuery('#slutstolpe1_title').text(msg[29]['startslut_title']);
						//						}else{
						//							jQuery('#slutstolpe1_title').text('Start/Slut Stolper');
						//						}



						jQuery('#topklods1').val(msg[10]);
						//jQuery('#topskruer1').val(msg[11]);

						/*if(jQuery('#alu_bundskinne_hidd').val()=='set'){
							//jQuery('#endekap1').val(' ');
							jQuery('#alu_bundskinne').val(msg[12]); }
						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]);*/

						jQuery('#power1').val(msg[13]);
						jQuery('#power1html').html(msg[13]);
						jQuery('#fencetype1').val(msg[14]);
						jQuery('#topprofiletype1').val(msg[15]);
						jQuery('#farve1').val(msg[16]);
						// jQuery('#postsize1').val(msg[17]);
						jQuery('#endekaptype1').val(msg[19]);
						jQuery('#acc1_cnt').val(msg[20]);

						if (msg[20] == "0") { jQuery('#acc1_cnt').parent('td').parent('tr').hide(); } else {
							jQuery('#acc1_cnt').parent('td').parent('tr').show();
						}

						jQuery('#acc1_cnthtml').html(msg[20]);

						jQuery('#acc1_cnt_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[29]['acc1_unit']));
						jQuery('#acc1_cnt_sku').text("DB " + msg[29]['acc1_sku']);
						//if(msg[29]['acc1_title'] !=""){
						//							jQuery('#acc1_cnt_title').text(msg[29]['acc1_title']);
						//						}else{
						//							jQuery('#acc1_cnt_title').text('Imprægnering 1L');
						//						}

						jQuery('#acc1_cnt_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[29]['acc1_price']));
						//jQuery('#acc1_cnt_sku').text(msg[29]['montageklaeb_sku']);

						jQuery('#acc2_cnt').val(msg[22]);
						jQuery('#acc3_cnt').val(msg[24]);
						jQuery('#acc3_cnthtml').html(msg[24]);
						if (msg[24] == "0") { jQuery('#acc3_cnt').parent('td').parent('tr').hide(); } else {
							jQuery('#acc3_cnt').parent('td').parent('tr').show();
						}

						if (msg[29]['acc3_title'] != "") {
							jQuery('#acc3_cnt_title').val(msg[29]['acc3_title']);
						} else {
							jQuery('#acc3_cnt_title').val('Rens 750ml');
						}

						jQuery('#acc3_cnt_sku').text("DB " + msg[29]['acc3_sku']);
						jQuery('#acc3_cnt_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[29]['acc3_unit']));
						jQuery('#acc3_cnt_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[29]['acc3_price']));

						jQuery('#acc4_cnt').val(msg[26]);

						if (msg[26] == "0" || msg[26] === "undefined") { jQuery('#acc4_cnt').parent('td').parent('tr').hide(); } else {
							jQuery('#acc4_cnt').parent('td').parent('tr').show();

							jQuery('#pdf_Zinkspray_id').val(1251);
							jQuery('#pdf_Zinkspray_cnt').val((msg[26]));
						}
						jQuery('#acc4_cnt_sku').text("DB " + msg[29]['acc4_sku']);
						jQuery('#acc4_cnthtml').html(msg[26]);
						jQuery('#acc4_cnt_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[29]['acc4_unit']));
						jQuery('#acc4_cnt_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[29]['acc4_price']));

						jQuery('#acc11_cnt').val(msg[33]);
						jQuery('#acc11_cnthmtl').html(msg[33]);
						jQuery('#acc11_cnt_sku').text("DB " + msg[29]['acc11_sku']);
						if (msg[29]['acc11_title'] != "") {
							jQuery('#acc11_cnt_title').text(msg[29]['acc11_title']);
						} else {
							jQuery('#acc11_cnt_title').html('Låge <span class="lageName"></span> inkl. stolper');
						}

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

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

						jQuery('#montage_klaeb').val(msg[36]);
						jQuery('#montage_klaebhtml').html(msg[36]);


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

						jQuery('#montage_klaeb_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[29]['montageklaeb']));
						jQuery('#montage_klaeb_sku').text("DB " + msg[29]['montageklaeb_sku']);
						//if(msg[29]['montageklaeb_title'] !=""){
						//							jQuery('#montage_klaeb_title').text(msg[29]['montageklaeb_title']);
						//						}else{
						//							jQuery('#montage_klaeb_title').text('Montage klæb');
						//						}




						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('#stolpe2html').html(stolpe2);
						printtotal();
						//topprofile();
						postsize();
						//endekaptype();
						pdf1();
						remove_zeroes();
						resizetextbox();
						if (msg[2] == 0) {
							jQuery('.fence1tr').hide();
						}
						alu_bundskinnetr = jQuery("#alu_bundskinne").val();
						console.log(alu_bundskinnetr);
						if (alu_bundskinnetr == '') {
							jQuery('.alu_bundskinnetr').hide();
						} else {
							jQuery('.alu_bundskinnetr').show();
						}
						//if(msg[22] == 0){
						//		jQuery('.alu_bundskinnetr').hide();
						//	}
						if (msg[8] == 0) {

							jQuery('.stolpe1tr').hide()
						}
						if (stolpe2 == 0) {
							jQuery('.stolpe2tr').hide()
						}
						if (msg[13] == 0) {
							jQuery('.power1tr').hide();
						}
						if (msg[5] == 0) {
							jQuery('.led1tr').hide();
						}
						if (msg[33] == 0) {
							jQuery('.acc11_cnttr').hide();
						}
						if (msg[20] == 0) {
							jQuery('.acc1_cnttr').hide();
						}
						if (msg[36] == 0) {
							jQuery('montage_klaebtr').hide();
						}
						if (msg[9] == 0) {
							jQuery('.slutstolpe1tr').hide();
						}

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

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

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

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

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

						}
						//console.log(row+'roww');
						console.log(msg[37]);
						if (msg[38] == 'grey') {
							jQuery('.custom_glb_type').val('gray');
							//myJsonString = {};

							jQuery.each(msg[37], 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://kirkedalkomposit.dk/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_GrayProfil_SilverStolpe_Galvaniseret_new/Galvaniseret_Grey_" + value.heights + ".glb";
									if (value.heights > 13) {
										row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GrayProfil_SilverStolpe_Galvaniseret_new/Galvaniseret_Grey_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_GrayProfil_SilverStolpe_Galvaniseret_new/Galvaniseret_Grey_" + value.heights + ".glb";
										if (value.heights > 13) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GrayProfil_SilverStolpe_Galvaniseret_new/Galvaniseret_Grey_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_GrayProfil_SilverStolpe_Galvaniseret_new/Galvaniseret_Grey_" + value.heights + ".glb";
										if (value.heights > 13) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GrayProfil_SilverStolpe_Galvaniseret_new/Galvaniseret_Grey_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_GrayProfil_SilverStolpe_Galvaniseret_new/Galvaniseret_Grey_" + value.heights + ".glb";
										if (value.heights > 13) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GrayProfil_SilverStolpe_Galvaniseret_new/Galvaniseret_Grey_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_GrayProfil_SilverStolpe_Galvaniseret_new/Galvaniseret_Grey_" + value.heights + ".glb";

										if (value.heights > 13) {

											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GrayProfil_SilverStolpe_Galvaniseret_new/Galvaniseret_Grey_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_GrayProfil_SilverStolpe_Galvaniseret_new/Galvaniseret_Grey_" + value.heights + ".glb";
										if (value.heights > 13) {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GrayProfil_SilverStolpe_Galvaniseret_new/Galvaniseret_Grey_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_GrayProfil_SilverStolpe_Galvaniseret_new/Galvaniseret_Grey_" + value.heights + ".glb";
										if (value.heights > 13) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GrayProfil_SilverStolpe_Galvaniseret_new/Galvaniseret_Grey_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_GrayProfil_SilverStolpe_Galvaniseret_new/Galvaniseret_Grey_" + value.heights + ".glb";

										if (value.heights > 13) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GrayProfil_SilverStolpe_Galvaniseret_new/Galvaniseret_Grey_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_GrayProfil_SilverStolpe_Galvaniseret_new/Galvaniseret_Grey_" + value.heights + ".glb";
										if (value.heights > 13) {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GrayProfil_SilverStolpe_Galvaniseret_new/Galvaniseret_Grey_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_GrayProfil_SilverStolpe_Galvaniseret_new/Galvaniseret_Grey_" + 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_GrayProfil_SilverStolpe_Galvaniseret_new/Galvaniseret_Grey_13.glb";
										}
									}
								}
							});

						} else if (msg[38] == 'alublack') {
							jQuery('.custom_glb_type').val('black');
							jQuery.each(msg[37], function (index, value) {
								console.log(value);
								if (msg[14] == "K3") {
									if (msg[39][0]['sideprofil_product_name'] == "Kirkedal sideprofil") {
										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/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_11.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/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_" + value.heights + ".glb";
												if (value.heights > 11) {
													row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_11.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/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_" + value.heights + ".glb";
												if (value.heights > 11) {
													row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_11.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/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_" + value.heights + ".glb";
												if (value.heights > 11) {
													row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_11.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/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_" + value.heights + ".glb";

												if (value.heights > 11) {

													row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_11.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/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_" + value.heights + ".glb";
												if (value.heights > 11) {
													row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_11.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/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_" + value.heights + ".glb";
												if (value.heights > 11) {
													row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_11.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/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_" + value.heights + ".glb";

												if (value.heights > 11) {
													row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_11.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/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_" + value.heights + ".glb";
												if (value.heights > 11) {
													row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_11.glb";
												}
											} else if (index == '3') {
												jQuery("#squere").val(value.length);
												row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_" + value.heights + ".glb";
												//row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
												if (value.heights > 11) {
													row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_11.glb";
												}
											}
										}
									} else {
										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/Done_galvaniserede-stolpe-alu_k3_black/galvaniserede-stolpe-alu_k3_black_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-alu_k3_black/galvaniserede-stolpe-alu_k3_black_11.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/Done_galvaniserede-stolpe-alu_k3_black/galvaniserede-stolpe-alu_k3_black_" + value.heights + ".glb";
												if (value.heights > 11) {
													row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-alu_k3_black/galvaniserede-stolpe-alu_k3_black_11.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/Done_galvaniserede-stolpe-alu_k3_black/galvaniserede-stolpe-alu_k3_black_" + value.heights + ".glb";
												if (value.heights > 11) {
													row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-alu_k3_black/galvaniserede-stolpe-alu_k3_black_11.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/Done_galvaniserede-stolpe-alu_k3_black/galvaniserede-stolpe-alu_k3_black_" + value.heights + ".glb";
												if (value.heights > 11) {
													row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-alu_k3_black/galvaniserede-stolpe-alu_k3_black_11.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/Done_galvaniserede-stolpe-alu_k3_black/galvaniserede-stolpe-alu_k3_black_" + value.heights + ".glb";

												if (value.heights > 11) {

													row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-alu_k3_black/galvaniserede-stolpe-alu_k3_black_11.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/Done_galvaniserede-stolpe-alu_k3_black/galvaniserede-stolpe-alu_k3_black_" + value.heights + ".glb";
												if (value.heights > 11) {
													row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-alu_k3_black/galvaniserede-stolpe-alu_k3_black_11.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/Done_galvaniserede-stolpe-alu_k3_black/galvaniserede-stolpe-alu_k3_black_" + value.heights + ".glb";
												if (value.heights > 11) {
													row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-alu_k3_black/galvaniserede-stolpe-alu_k3_black_11.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/Done_galvaniserede-stolpe-alu_k3_black/galvaniserede-stolpe-alu_k3_black_" + value.heights + ".glb";

												if (value.heights > 11) {
													row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-alu_k3_black/galvaniserede-stolpe-alu_k3_black_11.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/Done_galvaniserede-stolpe-alu_k3_black/galvaniserede-stolpe-alu_k3_black_" + value.heights + ".glb";
												if (value.heights > 11) {
													row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-alu_k3_black/galvaniserede-stolpe-alu_k3_black_11.glb";
												}
											} else if (index == '3') {
												jQuery("#squere").val(value.length);
												row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-alu_k3_black/galvaniserede-stolpe-alu_k3_black_" + value.heights + ".glb";
												//row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
												if (value.heights > 11) {
													row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-alu_k3_black/galvaniserede-stolpe-alu_k3_black_11.glb";
												}
											}
										}
									}
								} else {
									if (msg[39][0]['sideprofil_product_name'] == "Kirkedal sideprofil") {
										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/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_" + value.heights + ".glb";
											if (value.heights > 13) {
												row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_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/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_" + value.heights + ".glb";
												if (value.heights > 13) {
													row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_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/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_" + value.heights + ".glb";
												if (value.heights > 13) {
													row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_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/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_" + value.heights + ".glb";
												if (value.heights > 13) {
													row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_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/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_" + value.heights + ".glb";

												if (value.heights > 13) {

													row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_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/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_" + value.heights + ".glb";
												if (value.heights > 13) {
													row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_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/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_" + value.heights + ".glb";
												if (value.heights > 13) {
													row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_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/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_" + value.heights + ".glb";

												if (value.heights > 13) {
													row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_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/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_" + value.heights + ".glb";
												if (value.heights > 13) {
													row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_13.glb";
												}
											} else if (index == '3') {
												jQuery("#squere").val(value.length);
												row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_" + 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/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_13.glb";
												}
											}
										}
									} else {
										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_Galvaniseret_new/Galvaniseret_Black_" + value.heights + ".glb";
											if (value.heights > 13) {
												row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_SilverStolpe_Galvaniseret_new/Galvaniseret_Black_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_Galvaniseret_new/Galvaniseret_Black_" + value.heights + ".glb";
												if (value.heights > 13) {
													row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_SilverStolpe_Galvaniseret_new/Galvaniseret_Black_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_Galvaniseret_new/Galvaniseret_Black_" + value.heights + ".glb";
												if (value.heights > 13) {
													row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_SilverStolpe_Galvaniseret_new/Galvaniseret_Black_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_Galvaniseret_new/Galvaniseret_Black_" + value.heights + ".glb";
												if (value.heights > 13) {
													row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_SilverStolpe_Galvaniseret_new/Galvaniseret_Black_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_Galvaniseret_new/Galvaniseret_Black_" + value.heights + ".glb";

												if (value.heights > 13) {

													row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_SilverStolpe_Galvaniseret_new/Galvaniseret_Black_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_Galvaniseret_new/Galvaniseret_Black_" + value.heights + ".glb";
												if (value.heights > 13) {
													row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_SilverStolpe_Galvaniseret_new/Galvaniseret_Black_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_Galvaniseret_new/Galvaniseret_Black_" + value.heights + ".glb";
												if (value.heights > 13) {
													row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_SilverStolpe_Galvaniseret_new/Galvaniseret_Black_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_Galvaniseret_new/Galvaniseret_Black_" + value.heights + ".glb";

												if (value.heights > 13) {
													row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_SilverStolpe_Galvaniseret_new/Galvaniseret_Black_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_Galvaniseret_new/Galvaniseret_Black_" + value.heights + ".glb";
												if (value.heights > 13) {
													row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_SilverStolpe_Galvaniseret_new/Galvaniseret_Black_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_Galvaniseret_new/Galvaniseret_Black_" + 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_Galvaniseret_new/Galvaniseret_Black_13.glb";
												}
											}
										}
									}
								}
							});

						} else if (msg[38] == 'greyblack') {
							jQuery('.custom_glb_type').val('gray');
							jQuery.each(msg[37], 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_GrayProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_grey_" + value.heights + ".glb";
									if (value.heights > 13) {
										row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GrayProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_grey_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_GrayProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_grey_" + value.heights + ".glb";
										if (value.heights > 13) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GrayProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_grey_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_GrayProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_grey_" + value.heights + ".glb";
										if (value.heights > 13) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GrayProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_grey_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_GrayProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_grey_" + value.heights + ".glb";
										if (value.heights > 13) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GrayProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_grey_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_GrayProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_grey_" + value.heights + ".glb";

										if (value.heights > 13) {

											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GrayProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_grey_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_GrayProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_grey_" + value.heights + ".glb";
										if (value.heights > 13) {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GrayProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_grey_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_GrayProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_grey_" + value.heights + ".glb";
										if (value.heights > 13) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GrayProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_grey_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_GrayProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_grey_" + value.heights + ".glb";

										if (value.heights > 13) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GrayProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_grey_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_GrayProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_grey_" + value.heights + ".glb";
										if (value.heights > 13) {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_GrayProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_grey_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_GrayProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_grey_" + 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_GrayProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_grey_13.glb";
										}
									}
								}

							});
						} else if (msg[38] == 'black') {
							jQuery('.custom_glb_type').val('black');
							jQuery.each(msg[37], function (index, value) {
								console.log(value);
								if (msg[14] == "K3") {
									if (msg[39][0]['sideprofil_product_name'] == "Kirkedal sideprofil") {
										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/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_11.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/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_" + value.heights + ".glb";
												if (value.heights > 11) {
													row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_11.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/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_" + value.heights + ".glb";
												if (value.heights > 11) {
													row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_11.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/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_" + value.heights + ".glb";
												if (value.heights > 11) {
													row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_11.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/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_" + value.heights + ".glb";

												if (value.heights > 11) {

													row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_11.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/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_" + value.heights + ".glb";
												if (value.heights > 11) {
													row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_11.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/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_" + value.heights + ".glb";
												if (value.heights > 11) {
													row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_11.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/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_" + value.heights + ".glb";

												if (value.heights > 11) {
													row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_11.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/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_" + value.heights + ".glb";
												if (value.heights > 11) {
													row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_11.glb";
												}
											} else if (index == '3') {
												jQuery("#squere").val(value.length);
												row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_" + value.heights + ".glb";
												//row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
												if (value.heights > 11) {
													row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_11.glb";
												}
											}
										}
									} else {
										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/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_11.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/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_" + value.heights + ".glb";
												if (value.heights > 11) {
													row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_11.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/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_" + value.heights + ".glb";
												if (value.heights > 11) {
													row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_11.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/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_" + value.heights + ".glb";
												if (value.heights > 11) {
													row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_11.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/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_" + value.heights + ".glb";

												if (value.heights > 11) {

													row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_11.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/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_" + value.heights + ".glb";
												if (value.heights > 11) {
													row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_11.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/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_" + value.heights + ".glb";
												if (value.heights > 11) {
													row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_11.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/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_" + value.heights + ".glb";

												if (value.heights > 11) {
													row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_11.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/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_" + value.heights + ".glb";
												if (value.heights > 11) {
													row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_11.glb";
												}
											} else if (index == '3') {
												jQuery("#squere").val(value.length);
												row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_" + value.heights + ".glb";
												//row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
												if (value.heights > 11) {
													row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_11.glb";
												}
											}
										}
									}
								} else {


									if (msg[39][0]['sideprofil_product_name'] == "Kirkedal sideprofil") {
										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/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_" + value.heights + ".glb";
											if (value.heights > 13) {
												row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_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/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_" + value.heights + ".glb";
												if (value.heights > 13) {
													row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_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/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_" + value.heights + ".glb";
												if (value.heights > 13) {
													row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_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/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_" + value.heights + ".glb";
												if (value.heights > 13) {
													row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_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/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_" + value.heights + ".glb";

												if (value.heights > 13) {

													row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_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/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_" + value.heights + ".glb";
												if (value.heights > 13) {
													row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_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/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_" + value.heights + ".glb";
												if (value.heights > 13) {
													row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_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/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_" + value.heights + ".glb";

												if (value.heights > 13) {
													row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_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/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_" + value.heights + ".glb";
												if (value.heights > 13) {
													row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_13.glb";
												}
											} else if (index == '3') {
												jQuery("#squere").val(value.length);
												row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_" + 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/K1_K2_Black/NEW-galvaniserede-stolpe-alu_k1-k2-black_13.glb";
												}
											}
										}
									} else {
										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_Galvaniseret_new/Pulverlakeret_black_" + value.heights + ".glb";
											if (value.heights > 13) {
												row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_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_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_" + value.heights + ".glb";
												if (value.heights > 13) {
													row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_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_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_" + value.heights + ".glb";
												if (value.heights > 13) {
													row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_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_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_" + value.heights + ".glb";
												if (value.heights > 13) {
													row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_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_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_" + value.heights + ".glb";

												if (value.heights > 13) {

													row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_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_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_" + value.heights + ".glb";
												if (value.heights > 13) {
													row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_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_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_" + value.heights + ".glb";
												if (value.heights > 13) {
													row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_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_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_" + value.heights + ".glb";

												if (value.heights > 13) {
													row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_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_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_" + value.heights + ".glb";
												if (value.heights > 13) {
													row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_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_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_" + 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_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_13.glb";
												}
											}
										}
									}


								}
							});

						}
						else if (msg[38] == 'Sanded_Black') {
							jQuery('.custom_glb_type').val('black');
							jQuery.each(msg[37], function (index, value) {
								console.log(value);
								if (msg[14] == "K3") {
									if (msg[39][0]['sideprofil_product_name'] == "Kirkedal sideprofil") {
										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/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_11.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/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_" + value.heights + ".glb";
												if (value.heights > 11) {
													row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_11.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/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_" + value.heights + ".glb";
												if (value.heights > 11) {
													row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_11.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/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_" + value.heights + ".glb";
												if (value.heights > 11) {
													row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_11.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/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_" + value.heights + ".glb";

												if (value.heights > 11) {

													row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_11.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/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_" + value.heights + ".glb";
												if (value.heights > 11) {
													row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_11.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/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_" + value.heights + ".glb";
												if (value.heights > 11) {
													row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_11.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/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_" + value.heights + ".glb";

												if (value.heights > 11) {
													row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_11.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/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_" + value.heights + ".glb";
												if (value.heights > 11) {
													row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_11.glb";
												}
											} else if (index == '3') {
												jQuery("#squere").val(value.length);
												row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_" + value.heights + ".glb";
												//row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
												if (value.heights > 11) {
													row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Black/NEW-galvaniserede-stolpe-alu_k3_Black_11.glb";
												}
											}
										}
									} else {
										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/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_11.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/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_" + value.heights + ".glb";
												if (value.heights > 11) {
													row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_11.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/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_" + value.heights + ".glb";
												if (value.heights > 11) {
													row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_11.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/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_" + value.heights + ".glb";
												if (value.heights > 11) {
													row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_11.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/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_" + value.heights + ".glb";

												if (value.heights > 11) {

													row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_11.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/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_" + value.heights + ".glb";
												if (value.heights > 11) {
													row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_11.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/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_" + value.heights + ".glb";
												if (value.heights > 11) {
													row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_11.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/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_" + value.heights + ".glb";

												if (value.heights > 11) {
													row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_11.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/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_" + value.heights + ".glb";
												if (value.heights > 11) {
													row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_11.glb";
												}
											} else if (index == '3') {
												jQuery("#squere").val(value.length);
												row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_" + value.heights + ".glb";
												//row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
												if (value.heights > 11) {
													row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_black/galvaniserede-stolpe-black_k3_black_11.glb";
												}
											}
										}
									}
								} else {


									if (msg[39][0]['sideprofil_product_name'] == "Kirkedal sideprofil") {
										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/NEW-galvaniserede-stolpe-alu_k1-sanded_9/NEW-galvaniserede-stolpe-alu_k1-sanded_" + value.heights + ".glb";
											if (value.heights > 13) {
												row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/NEW-galvaniserede-stolpe-alu_k1-sanded_9/NEW-galvaniserede-stolpe-alu_k1-sanded_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/NEW-galvaniserede-stolpe-alu_k1-sanded_9/NEW-galvaniserede-stolpe-alu_k1-sanded_" + value.heights + ".glb";
												if (value.heights > 13) {
													row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/NEW-galvaniserede-stolpe-alu_k1-sanded_9/NEW-galvaniserede-stolpe-alu_k1-sanded_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/NEW-galvaniserede-stolpe-alu_k1-sanded_9/NEW-galvaniserede-stolpe-alu_k1-sanded_" + value.heights + ".glb";
												if (value.heights > 13) {
													row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/NEW-galvaniserede-stolpe-alu_k1-sanded_9/NEW-galvaniserede-stolpe-alu_k1-sanded_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/NEW-galvaniserede-stolpe-alu_k1-sanded_9/NEW-galvaniserede-stolpe-alu_k1-sanded_" + value.heights + ".glb";
												if (value.heights > 13) {
													row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/NEW-galvaniserede-stolpe-alu_k1-sanded_9/NEW-galvaniserede-stolpe-alu_k1-sanded_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/NEW-galvaniserede-stolpe-alu_k1-sanded_9/NEW-galvaniserede-stolpe-alu_k1-sanded_" + value.heights + ".glb";

												if (value.heights > 13) {

													row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/NEW-galvaniserede-stolpe-alu_k1-sanded_9/NEW-galvaniserede-stolpe-alu_k1-sanded_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/NEW-galvaniserede-stolpe-alu_k1-sanded_9/NEW-galvaniserede-stolpe-alu_k1-sanded_" + value.heights + ".glb";
												if (value.heights > 13) {
													row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/NEW-galvaniserede-stolpe-alu_k1-sanded_9/NEW-galvaniserede-stolpe-alu_k1-sanded_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/NEW-galvaniserede-stolpe-alu_k1-sanded_9/NEW-galvaniserede-stolpe-alu_k1-sanded_" + value.heights + ".glb";
												if (value.heights > 13) {
													row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/NEW-galvaniserede-stolpe-alu_k1-sanded_9/NEW-galvaniserede-stolpe-alu_k1-sanded_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/NEW-galvaniserede-stolpe-alu_k1-sanded_9/NEW-galvaniserede-stolpe-alu_k1-sanded_" + value.heights + ".glb";

												if (value.heights > 13) {
													row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/NEW-galvaniserede-stolpe-alu_k1-sanded_9/NEW-galvaniserede-stolpe-alu_k1-sanded_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/NEW-galvaniserede-stolpe-alu_k1-sanded_9/NEW-galvaniserede-stolpe-alu_k1-sanded_" + value.heights + ".glb";
												if (value.heights > 13) {
													row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/NEW-galvaniserede-stolpe-alu_k1-sanded_9/NEW-galvaniserede-stolpe-alu_k1-sanded_13.glb";
												}
											} else if (index == '3') {
												jQuery("#squere").val(value.length);
												row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/NEW-galvaniserede-stolpe-alu_k1-sanded_9/NEW-galvaniserede-stolpe-alu_k1-sanded_" + 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/NEW-galvaniserede-stolpe-alu_k1-sanded_9/NEW-galvaniserede-stolpe-alu_k1-sanded_13.glb";
												}
											}
										}
									} else {
										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_Galvaniseret_new/Pulverlakeret_black_" + value.heights + ".glb";
											if (value.heights > 13) {
												row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_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_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_" + value.heights + ".glb";
												if (value.heights > 13) {
													row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_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_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_" + value.heights + ".glb";
												if (value.heights > 13) {
													row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_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_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_" + value.heights + ".glb";
												if (value.heights > 13) {
													row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_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_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_" + value.heights + ".glb";

												if (value.heights > 13) {

													row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_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_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_" + value.heights + ".glb";
												if (value.heights > 13) {
													row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_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_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_" + value.heights + ".glb";
												if (value.heights > 13) {
													row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_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_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_" + value.heights + ".glb";

												if (value.heights > 13) {
													row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_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_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_" + value.heights + ".glb";
												if (value.heights > 13) {
													row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_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_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_" + 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_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_13.glb";
												}
											}
										}
									}


								}
							});
						}
						else if (msg[38] == 'hardwood_alu') {
							jQuery('.custom_glb_type').val('hardwood');
							jQuery.each(msg[37], function (index, value) {
								console.log(value);
								if (msg[39][0]['sideprofil_product_name'] == "Kirkedal sideprofil") {
									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/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_" + value.heights + ".glb";
										if (value.heights > 11) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_11.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/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_11.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/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_11.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/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_11.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/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_" + value.heights + ".glb";

											if (value.heights > 11) {

												row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_11.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/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_11.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/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_11.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/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_" + value.heights + ".glb";

											if (value.heights > 11) {
												row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_11.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/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_11.glb";
											}
										} else if (index == '3') {
											jQuery("#squere").val(value.length);
											row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_" + value.heights + ".glb";
											//row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
											if (value.heights > 11) {
												row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_11.glb";
											}
										}
									}
								} else {
									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/Done_galvaniserede-stolpe-alu_k3_Hardwood/galvaniserede-stolpe-alu_k3_hardwood_" + value.heights + ".glb";
										if (value.heights > 11) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-alu_k3_Hardwood/galvaniserede-stolpe-alu_k3_hardwood_11.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/Done_galvaniserede-stolpe-alu_k3_Hardwood/galvaniserede-stolpe-alu_k3_hardwood_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-alu_k3_Hardwood/galvaniserede-stolpe-alu_k3_hardwood_11.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/Done_galvaniserede-stolpe-alu_k3_Hardwood/galvaniserede-stolpe-alu_k3_hardwood_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-alu_k3_Hardwood/galvaniserede-stolpe-alu_k3_hardwood_11.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/Done_galvaniserede-stolpe-alu_k3_Hardwood/galvaniserede-stolpe-alu_k3_hardwood_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-alu_k3_Hardwood/galvaniserede-stolpe-alu_k3_hardwood_11.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/Done_galvaniserede-stolpe-alu_k3_Hardwood/galvaniserede-stolpe-alu_k3_hardwood_" + value.heights + ".glb";

											if (value.heights > 11) {

												row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-alu_k3_Hardwood/galvaniserede-stolpe-alu_k3_hardwood_11.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/Done_galvaniserede-stolpe-alu_k3_Hardwood/galvaniserede-stolpe-alu_k3_hardwood_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-alu_k3_Hardwood/galvaniserede-stolpe-alu_k3_hardwood_11.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/Done_galvaniserede-stolpe-alu_k3_Hardwood/galvaniserede-stolpe-alu_k3_hardwood_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-alu_k3_Hardwood/galvaniserede-stolpe-alu_k3_hardwood_11.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/Done_galvaniserede-stolpe-alu_k3_Hardwood/galvaniserede-stolpe-alu_k3_hardwood_" + value.heights + ".glb";

											if (value.heights > 11) {
												row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-alu_k3_Hardwood/galvaniserede-stolpe-alu_k3_hardwood_11.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/Done_galvaniserede-stolpe-alu_k3_Hardwood/galvaniserede-stolpe-alu_k3_hardwood_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-alu_k3_Hardwood/galvaniserede-stolpe-alu_k3_hardwood_11.glb";
											}
										} else if (index == '3') {
											jQuery("#squere").val(value.length);
											row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-alu_k3_Hardwood/galvaniserede-stolpe-alu_k3_hardwood_" + value.heights + ".glb";
											//row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
											if (value.heights > 11) {
												row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-alu_k3_Hardwood/galvaniserede-stolpe-alu_k3_hardwood_11.glb";
											}
										}
									}
								}
							});

						}
						else if (msg[38] == 'Smoked_Oak_alu') {
							jQuery('.custom_glb_type').val('Smoked_Oak');
							jQuery.each(msg[37], function (index, value) {
								console.log(value);
								if (msg[39][0]['sideprofil_product_name'] == "Kirkedal sideprofil") {
									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/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_" + value.heights + ".glb";
										if (value.heights > 11) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_11.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/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_11.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/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_11.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/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_11.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/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_" + value.heights + ".glb";

											if (value.heights > 11) {

												row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_11.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/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_11.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/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_11.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/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_" + value.heights + ".glb";

											if (value.heights > 11) {
												row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_11.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/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_11.glb";
											}
										} else if (index == '3') {
											jQuery("#squere").val(value.length);
											row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_" + value.heights + ".glb";
											//row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
											if (value.heights > 11) {
												row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_11.glb";
											}
										}
									}
								} else {
									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/Done_galvaniserede-stolpe-alu_k3_Oak/galvaniserede-stolpe-alu_k3_Oak_" + value.heights + ".glb";
										if (value.heights > 11) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-alu_k3_Oak/galvaniserede-stolpe-alu_k3_Oak_11.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/Done_galvaniserede-stolpe-alu_k3_Oak/galvaniserede-stolpe-alu_k3_Oak_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-alu_k3_Oak/galvaniserede-stolpe-alu_k3_Oak_11.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/Done_galvaniserede-stolpe-alu_k3_Oak/galvaniserede-stolpe-alu_k3_Oak_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-alu_k3_Oak/galvaniserede-stolpe-alu_k3_Oak_11.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/Done_galvaniserede-stolpe-alu_k3_Oak/galvaniserede-stolpe-alu_k3_Oak_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-alu_k3_Oak/galvaniserede-stolpe-alu_k3_Oak_11.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/Done_galvaniserede-stolpe-alu_k3_Oak/galvaniserede-stolpe-alu_k3_Oak_" + value.heights + ".glb";

											if (value.heights > 11) {

												row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-alu_k3_Oak/galvaniserede-stolpe-alu_k3_Oak_11.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/Done_galvaniserede-stolpe-alu_k3_Oak/galvaniserede-stolpe-alu_k3_Oak_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-alu_k3_Oak/galvaniserede-stolpe-alu_k3_Oak_11.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/Done_galvaniserede-stolpe-alu_k3_Oak/galvaniserede-stolpe-alu_k3_Oak_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-alu_k3_Oak/galvaniserede-stolpe-alu_k3_Oak_11.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/Done_galvaniserede-stolpe-alu_k3_Oak/galvaniserede-stolpe-alu_k3_Oak_" + value.heights + ".glb";

											if (value.heights > 11) {
												row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-alu_k3_Oak/galvaniserede-stolpe-alu_k3_Oak_11.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/Done_galvaniserede-stolpe-alu_k3_Oak/galvaniserede-stolpe-alu_k3_Oak_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-alu_k3_Oak/galvaniserede-stolpe-alu_k3_Oak_11.glb";
											}
										} else if (index == '3') {
											jQuery("#squere").val(value.length);
											row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-alu_k3_Oak/galvaniserede-stolpe-alu_k3_Oak_" + value.heights + ".glb";
											//row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
											if (value.heights > 11) {
												row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-alu_k3_Oak/galvaniserede-stolpe-alu_k3_Oak_11.glb";
											}
										}
									}
								}
							});

						}
						else if (msg[38] == 'hardwood') {
							jQuery('.custom_glb_type').val('hardwood');
							jQuery.each(msg[37], function (index, value) {
								console.log(value);
								if (msg[39][0]['sideprofil_product_name'] == "Kirkedal sideprofil") {
									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/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_" + value.heights + ".glb";
										if (value.heights > 11) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_11.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/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_11.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/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_11.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/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_11.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/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_" + value.heights + ".glb";

											if (value.heights > 11) {

												row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_11.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/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_11.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/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_11.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/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_" + value.heights + ".glb";

											if (value.heights > 11) {
												row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_11.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/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_11.glb";
											}
										} else if (index == '3') {
											jQuery("#squere").val(value.length);
											row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_" + value.heights + ".glb";
											//row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
											if (value.heights > 11) {
												row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Hardwood/NEW-galvaniserede-stolpe-alu_k3_hardwood_11.glb";
											}
										}
									}
								} else {
									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/Done_galvaniserede-stolpe-black_k3_hardwood/galvaniserede-stolpe-black_k3_Hardwood_" + value.heights + ".glb";
										if (value.heights > 11) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_hardwood/galvaniserede-stolpe-black_k3_Hardwood_11.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/Done_galvaniserede-stolpe-black_k3_hardwood/galvaniserede-stolpe-black_k3_Hardwood_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_hardwood/galvaniserede-stolpe-black_k3_Hardwood_11.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/Done_galvaniserede-stolpe-black_k3_hardwood/galvaniserede-stolpe-black_k3_Hardwood_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_hardwood/galvaniserede-stolpe-black_k3_Hardwood_11.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/Done_galvaniserede-stolpe-black_k3_hardwood/galvaniserede-stolpe-black_k3_Hardwood_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_hardwood/galvaniserede-stolpe-black_k3_Hardwood_11.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/Done_galvaniserede-stolpe-black_k3_hardwood/galvaniserede-stolpe-black_k3_Hardwood_" + value.heights + ".glb";

											if (value.heights > 11) {

												row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_hardwood/galvaniserede-stolpe-black_k3_Hardwood_11.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/Done_galvaniserede-stolpe-black_k3_hardwood/galvaniserede-stolpe-black_k3_Hardwood_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_hardwood/galvaniserede-stolpe-black_k3_Hardwood_11.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/Done_galvaniserede-stolpe-black_k3_hardwood/galvaniserede-stolpe-black_k3_Hardwood_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_hardwood/galvaniserede-stolpe-black_k3_Hardwood_11.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/Done_galvaniserede-stolpe-black_k3_hardwood/galvaniserede-stolpe-black_k3_Hardwood_" + value.heights + ".glb";

											if (value.heights > 11) {
												row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_hardwood/galvaniserede-stolpe-black_k3_Hardwood_11.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/Done_galvaniserede-stolpe-black_k3_hardwood/galvaniserede-stolpe-black_k3_Hardwood_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_hardwood/galvaniserede-stolpe-black_k3_Hardwood_11.glb";
											}
										} else if (index == '3') {
											jQuery("#squere").val(value.length);
											row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_hardwood/galvaniserede-stolpe-black_k3_Hardwood_" + value.heights + ".glb";
											//row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
											if (value.heights > 11) {
												row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_hardwood/galvaniserede-stolpe-black_k3_Hardwood_11.glb";
											}
										}
									}
								}
							});

						}
						else if (msg[38] == 'Smoked_Oak') {
							jQuery('.custom_glb_type').val('Smoked_Oak');
							jQuery.each(msg[37], function (index, value) {
								console.log(value);
								if (msg[39][0]['sideprofil_product_name'] == "Kirkedal sideprofil") {
									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/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_" + value.heights + ".glb";
										if (value.heights > 11) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_11.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/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_11.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/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_11.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/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_11.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/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_" + value.heights + ".glb";

											if (value.heights > 11) {

												row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_11.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/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_11.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/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_11.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/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_" + value.heights + ".glb";

											if (value.heights > 11) {
												row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_11.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/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_11.glb";
											}
										} else if (index == '3') {
											jQuery("#squere").val(value.length);
											row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_" + value.heights + ".glb";
											//row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
											if (value.heights > 11) {
												row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/K3_Oak/NEW-galvaniserede-stolpe-alu_k3_Oak_11.glb";
											}
										}
									}
								} else {
									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/Done_galvaniserede-stolpe-black_k3_Oak/galvaniserede-stolpe-black_k3_oak_" + value.heights + ".glb";
										if (value.heights > 11) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_Oak/galvaniserede-stolpe-black_k3_oak_11.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/Done_galvaniserede-stolpe-black_k3_Oak/galvaniserede-stolpe-black_k3_oak_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_Oak/galvaniserede-stolpe-black_k3_oak_11.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/Done_galvaniserede-stolpe-black_k3_Oak/galvaniserede-stolpe-black_k3_oak_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_Oak/galvaniserede-stolpe-black_k3_oak_11.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/Done_galvaniserede-stolpe-black_k3_Oak/galvaniserede-stolpe-black_k3_oak_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_Oak/galvaniserede-stolpe-black_k3_oak_11.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/Done_galvaniserede-stolpe-black_k3_Oak/galvaniserede-stolpe-black_k3_oak_" + value.heights + ".glb";

											if (value.heights > 11) {

												row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_Oak/galvaniserede-stolpe-black_k3_oak_11.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/Done_galvaniserede-stolpe-black_k3_Oak/galvaniserede-stolpe-black_k3_oak_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_Oak/galvaniserede-stolpe-black_k3_oak_11.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/Done_galvaniserede-stolpe-black_k3_Oak/galvaniserede-stolpe-black_k3_oak_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_Oak/galvaniserede-stolpe-black_k3_oak_11.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/Done_galvaniserede-stolpe-black_k3_Oak/galvaniserede-stolpe-black_k3_oak_" + value.heights + ".glb";

											if (value.heights > 11) {
												row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_Oak/galvaniserede-stolpe-black_k3_oak_11.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/Done_galvaniserede-stolpe-black_k3_Oak/galvaniserede-stolpe-black_k3_oak_" + value.heights + ".glb";
											if (value.heights > 11) {
												row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_Oak/galvaniserede-stolpe-black_k3_oak_11.glb";
											}
										} else if (index == '3') {
											jQuery("#squere").val(value.length);
											row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_Oak/galvaniserede-stolpe-black_k3_oak_" + value.heights + ".glb";
											//row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
											if (value.heights > 11) {
												row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_galvaniserede-stolpe-black_k3_Oak/galvaniserede-stolpe-black_k3_oak_11.glb";
											}
										}
									}
								}
							});

						}
						fencerowheight = jQuery("#fencetype").val();
						if (fencerowheight != '') {
							myfunction();
						}
						jQuery('.tbl_custom_data tr:visible:odd').css('background', '#f5f5f5');
					}


				});



			});


			jQuery('.form_2').change(function () {

				jQuery('.form_2').val(jQuery(this).val()).attr('selected', true);
			});
			jQuery('.form_3').change(function () {

				jQuery('.form_3').val(jQuery(this).val()).attr('selected', true);
			});
			jQuery('.form_4').change(function () {

				jQuery('.form_4').val(jQuery(this).val()).attr('selected', true);
			});
			jQuery('.form_6').change(function () {

				jQuery('.form_6').val(jQuery(this).val()).attr('selected', true);
			});
			jQuery('.form_8').change(function () {

				jQuery('.form_8').val(jQuery(this).val()).attr('selected', true);
			});
			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_box44').click(function () {
				jQuery('.calculator-box').hide(); jQuery('.calculator-box.calculator-44').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_box5').find('img').hide();
			});
			jQuery('.active-list.sidebar_calc_box6').click(function () {
				jQuery('.calculator-box').hide(); jQuery('.calculator-box.calculator-6').hide();
				jQuery('.calculator-box.calculator-6').find('img').hide();
			});
			jQuery('.active-list.sidebar_calc_box7').click(function () {
				jQuery('.calculator-box').hide(); jQuery('.calculator-box.calculator-7').show();
			});



		});
	</script>
	<script>
		function resizetextbox() {
			jQuery("#tbl_custom_data input").each(function () {
				var txt_val = jQuery(this).val().length;
				var width_val = ((txt_val + 1) * 12) + 'px';

				jQuery(this).css('width', width_val);
			});
			jQuery("#tbl_custom_data span[id$=_rate]").each(function () {
				//alert(jQuery(this).attr('id'));
				var price_valtxt = jQuery(this).text();
				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>
	<script>
		/*  jQuery(window).load(function()
		  {
			  jQuery("#accordion" ).accordion({
				  collapsible: true,
				  active: false
			  });
		  });*/
		function switchMap() {
			jQuery("#lengthsTable").toggle();
			jQuery("#mapTable").toggle();
		}
		jQuery(document).ready(function () {
			jQuery("#lengthsTable").css("display", "none");
		});

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

		}


		function add_to_cart() {
			var 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 mainHeight = '';
			jQuery("[id*=height_]").each(function () {
				if (jQuery(this).val() != '') {

					mainHeight = jQuery(this).val();
				}
			});

			/* var profils = {
			 //    K1s:{product_id:1694,variations:{black:1697,white:1698}},
			  K1s:{product_id:1694,variations:{black:1697}},
				 K1:{product_id:9,variations:{black:19,coffee:20,dark_teak:21,grey:22,light_teak:23,red:24,white:25}},
				 K2:{product_id:59,variations:{black:61,coffee:62,dark_teak:63,grey:64,light_teak:65,red:66,white:67}},
				 K3:{product_id:70,variations:{black:71,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}},
				 K6:{product_id:134,variations:{black:136,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}},
				 K14:{product_id:800,variations:{black:801,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}},
				 K82:{product_id:160,variations:{black:166,coffee:161,dark_teak:163,grey:168,light_teak:164,red:165,white:167}},
				 K200:{product_id:3912,variations:{2570:3913,2238:3914,1906:3915}},
				 K201:{product_id:3916,variations:{2570:3919,2238:3918,1906:3917}},
				 K202:{product_id:3920,variations:{2570:3923,2238:3922,1906:3921}}
			 };*/




			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}},
				K4: { product_id: 88, variations: { 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}},
				// K300:{product_id:1274,variations:{2570:1301,2238:1302,1906:1303}},
				// K301:{product_id:1275,variations:{2570:1365,2238:1366,1906:1367}},
				// K302:{product_id:1276,variations:{2570:5094,2238:5095,1906:5096}}

			};

			var profil_id = profils[jQuery("input#model").val()].product_id;
			//var profil_variation_id = profils[jQuery("input#model").val()].variations[jQuery("#farve1").val().toLowerCase().replace(" ","_")];
			//alert(profil_color);
			var profil_variation_id = profils[jQuery("input#model").val()].variations[profil_color];

			var top_profil_id = 0;
			var top_profil_variation_id = 0;
			if (jQuery("#top1").val() != 0 && jQuery("input#topmodel").val()) {
				top_profil_id = profils[jQuery("input#topmodel").val().replace("40x120mm", "")].product_id;
				top_profil_variation_id = profils[jQuery("input#topmodel").val().replace("40x120mm", "")].variations["black"];
			}
			var start_slut_id = start_slut_variation_id = 0;
			if (k200_id == 'K200') {
				start_slut_id = profils["K200"].product_id;

				if (mainHeight == '1.8')
					start_slut_variation_id = profils["K200"].variations[2570];
				if (mainHeight == '0.9')
					start_slut_variation_id = profils["K200"].variations[1906];
				if (mainHeight == '1.4')
					start_slut_variation_id = profils["K200"].variations[2238];

			}
			if (k200_id == 'K300') {
				start_slut_id = profils["K300"].product_id;

				if (mainHeight == '1.8')
					start_slut_variation_id = profils["K300"].variations[2570];
				if (mainHeight == '0.9')
					start_slut_variation_id = profils["K300"].variations[1906];
				if (mainHeight == '1.4')
					start_slut_variation_id = profils["K300"].variations[2238];

			}


			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;

					if (mainHeight == '1.8')
						kirkedal_variation_id = profils["K201"].variations[2570];
					if (mainHeight == '0.9')
						kirkedal_variation_id = profils["K201"].variations[1906];
					if (mainHeight == '1.4')
						kirkedal_variation_id = profils["K201"].variations[2238];




				}
				else if (k200_id == 'K300') {
					kirkedal_id = profils["K301"].product_id;

					if (mainHeight == '1.8')
						kirkedal_variation_id = profils["K301"].variations[2570];
					if (mainHeight == '0.9')
						kirkedal_variation_id = profils["K301"].variations[1906];
					if (mainHeight == '1.4')
						kirkedal_variation_id = profils["K301"].variations[2238];




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


				if (mainHeight == '1.8')
					hornestolper_variation_id = profils["K202"].variations[2570];
				if (mainHeight == '0.9')
					hornestolper_variation_id = profils["K202"].variations[1906];
				if (mainHeight == '1.4')
					hornestolper_variation_id = profils["K202"].variations[2238];

			}
			else if (k200_id == 'K300') {
				hornestolper_id = profils["K302"].product_id;


				if (mainHeight == '1.8')
					hornestolper_variation_id = profils["K302"].variations[2570];
				if (mainHeight == '0.9')
					hornestolper_variation_id = profils["K302"].variations[1906];
				if (mainHeight == '1.4')
					hornestolper_variation_id = profils["K302"].variations[2238];
			}
			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();
			//alert(datastring);
			datastring += "|" + top_profil_id + "," + top_profil_variation_id + "," + jQuery("#top1").val();
			//datastring += "|"+bundskinne_product_id+",0,"+jQuery("#alu_bundskinne").val();
			if (jQuery("#alu_montageklaeb").val() != "") {
				datastring += "|" + montageklaeb_product_id + ",0," + jQuery("#alu_montageklaeb").val();
			}
			if (jQuery("#montage_klaeb").val() != "") {
				datastring += "|" + montageklaeb_product_id + ",0," + jQuery("#montage_klaeb").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;
					if (mainHeight == '1.8')
						kirkedal_variation_id = profils["K201"].variations[2570];
					if (mainHeight == '0.9')
						kirkedal_variation_id = profils["K201"].variations[1906];
					if (mainHeight == '1.4')
						kirkedal_variation_id = profils["K201"].variations[2238];

				}
				else if (k200_id == 'K300') {
					kirkedal_id = profils["K301"].product_id;
					if (mainHeight == '1.8')
						kirkedal_variation_id = profils["K301"].variations[2570];
					if (mainHeight == '0.9')
						kirkedal_variation_id = profils["K301"].variations[1906];
					if (mainHeight == '1.4')
						kirkedal_variation_id = profils["K301"].variations[2238];

				}

				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();
			}
			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 = 1142;

			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 = 1124;
			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();

			acc11_id = 0;
			if (mainHeight == '0.9')
				// acc11_id = 1224;
				if (mainHeight == '1.4')
					// acc11_id = 1225;
					if (mainHeight == '1.8')
						// acc11_id = 1226;

						acc11_cnt = jQuery("#acc11_cnt").val();

			//topbundskinne_id = 3924;
			if (k200_id == 'K300') {
				// topbundskinne_id = 1277;
			} else {
				//topbundskinne_id = 1223;
			}
			topbundskinne_cnt = jQuery("#alu_bundskinne").val();

			if (acc1_cnt != "0") {
				datastring += "|" + acc1_id + "," + acc1_var_id1 + "," + acc1_cnt;
			}
			if (acc2_cnt != "0") {
				datastring += "|" + acc1_id + "," + acc1_var_id2 + "," + acc2_cnt;
			}
			if (acc3_cnt != "0") {
				datastring += "|" + acc3_id + "," + acc3_var_id1 + "," + acc3_cnt;
			}
			if (acc4_cnt != "0") {
				datastring += "|" + acc3_id + "," + acc3_var_id2 + "," + acc4_cnt;
			}
			if (acc11_cnt != "0") {
				datastring += "|" + acc11_id + ",," + acc11_cnt;
			}
			if (topbundskinne_cnt != "0") {
				datastring += "|" + topbundskinne_id + ",," + topbundskinne_cnt;
			}
			console.log(datastring);
			//return false;
			jQuery.post("/wp-content/add_to_cart.php", { data: datastring }, function (result) {
				//window.location.href="/kurv/";
				window.location.href = "/beregn-dit-galvaniserede-hegn-new/";
			});
		}
		var drawing_mode = "Linje";
		jQuery('.drawing-mode-btn').bind('click', function () {
			jQuery('.drawing-mode-btn').css("background-color", "");
			jQuery(this).css("background-color", "lightblue");
			drawing_mode = jQuery(this).val();
			clearShape();
		});

		var map;

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

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



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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

			}
			html += "</table>";
			jQuery("#angles_div").html(html);

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

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

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

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

		function update_calculation() {
			//update calculations
		}

		function set_colors() {
			var profil_color = jQuery("#profil_color").val();
			//alert(jQuery("#profil_color").val());
			if (profil_color != "") {
				/*jQuery("#topprofil_color").val(profil_color);
				 jQuery("#k5_color").val(profil_color);
				 jQuery("#k6_color").val(profil_color);
				 jQuery("#k7_color").val(profil_color);
				 jQuery("#k14_color").val(profil_color);
				 jQuery("#skruer1_color").val(profil_color);
				 jQuery("#skruer2_color").val(profil_color);
				 jQuery("#endekap_color").val(profil_color);
				 jQuery("#topklods_color").val(profil_color);*/
				jQuery("#hidColor").val(profil_color);
				if (profil_color != 'Black') {
					jQuery("#bundskinne_color").val('alu');
					jQuery("#alu_color").val('alu');
				} else {
					jQuery("#bundskinne_color").val('black');
					jQuery("#alu_color").val('black');
				}
			}
		}
		/*
		jQuery("#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 guid() {
			function s4() {
				return Math.floor((1 + Math.random()) * 0x10000)
					.toString(16)
					.substring(1);
			}
			return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
				s4() + '-' + s4() + s4() + s4();
		}
	</script>
	<script>
		function pdf2() {
			if (jQuery("#profil_color").val() == "" || jQuery("#profil_color").val() == 'undefined') {
				alert("Please select color");
				jQuery("#profil_color").focus();
				return false;
			}
			if (jQuery("#topprofil_color").val() == "" || jQuery("#topprofil_color").val() == 'undefined') {
				alert("Please select color");
				jQuery("#topprofil_color").focus();
				return false;
			}
			if (jQuery("#k5_color").val() == "" || jQuery("#k5_color").val() == 'undefined') {
				alert("Please select color");
				jQuery("#k5_color").focus();
				return false;
			}
			if (jQuery("#k6_color").val() == "" || jQuery("#k6_color").val() == 'undefined') {
				alert("Please select color");
				jQuery("#k6_color").focus();
				return false;
			}
			if (jQuery("#alu_color").val() == "" || jQuery("#alu_color").val() == 'undefined') {
				alert("Please select color");
				jQuery("#alu_color").focus();
				return false;
			}
			if (jQuery("#k7_color").val() == "" || jQuery("#k7_color").val() == 'undefined') {
				alert("Please select color");
				jQuery("#k7_color").focus();
				return false;
			}
			if (jQuery("#k14_color").val() == "" || jQuery("#k14_color").val() == 'undefined') {
				alert("Please select color");
				jQuery("#k14_color").focus();
				return false;
			}
			if (jQuery("#skruer1_color").val() == "" || jQuery("#skruer1_color").val() == 'undefined') {
				alert("Please select color");
				jQuery("#skruer1_color").focus();
				return false;
			}
			if (jQuery("#skruer2_color").val() == "" || jQuery("#skruer2_color").val() == 'undefined') {
				alert("Please select color");
				jQuery("#skruer2_color").focus();
				return false;
			}
			if (jQuery("#endekap_color").val() == "" || jQuery("#endekap_color").val() == 'undefined') {
				alert("Please select color");
				jQuery("#endekap_color").focus();
				return false;
			}
			if (jQuery("#topklods_color").val() == "" || jQuery("#topklods_color").val() == 'undefined') {
				alert("Please select color");
				jQuery("#topklods_color").focus();
				return false;
			}
			return true;
		}
		function pdf1() {
			profil_color = jQuery("#profil_color").val().toLowerCase();
			console.log(profil_color);
			var mainHeight = '';
			jQuery("[id*=height_]").each(function () {
				if (jQuery(this).val() != '') {

					mainHeight = jQuery(this).val();
				}
			});

			var profils = {
				//  K1s:{product_id:1694,variations:{black:1697,white:1698}},
				K1s: { product_id: 1131, variations: { black: 1322 } },
				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}},
				K3: { product_id: 2529, variations: { black: 2419, hardwood: 2420, smoked_oak: 2421 } },
				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 } }

			};

			var profil_id = profils[jQuery("input#model").val()].product_id;

			var profil_variation_id = profils[jQuery("input#model").val()].variations[profil_color];

			//alert(profil_variation_id);
			jQuery("#pdf_product_id").val(profil_variation_id);

			var top_profil_variation_id = 0;
			/*if (jQuery("#top1").val() != 0 && jQuery("input#topmodel").val() != 0) {
				top_profil_id = profils[jQuery("input#topmodel").val().replace("40x120mm", "")].product_id;
				top_profil_variation_id = profils[jQuery("input#topmodel").val().replace("40x120mm", "")].variations["black"];
			}*/

			jQuery("#pdf_topprofil_id").val(top_profil_variation_id);


			jQuery("#pdf_montage_klaeb").val(jQuery("#montage_klaeb").val());



			jQuery("#pdf_profil_color").val(jQuery("#profil_color").val());

			//	 if (jQuery("#alu_color").val() == "Alu")


			// {
			//  jQuery("#pdf_topprofil_color").val('White');
			// }
			//else if(
			//   jQuery("#pdf_topprofil_color").val('Black');

			//}




			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("#pdfprotopbundskinne").val(jQuery("#alu_bundskinne").val());
			jQuery("#pdf_montageklaeb").val(jQuery("#alu_montageklaeb").val());
			jQuery("#pdf_acc1_cnt").val(jQuery("#acc1_cnt").val());
			jQuery("#pdf_acc2_cnt").val(jQuery("#acc2_cnt").val());
			jQuery("#pdf_acc3_cnt").val(jQuery("#acc3_cnt").val());
			jQuery("#pdf_acc4_cnt").val(jQuery("#acc4_cnt").val());
			jQuery("#pdf_acc11_cnt").val(jQuery("#acc11_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('pdfstolpetykkelse').value =
				document.getElementById("postsizetype1").value;

			/*document.getElementById('pdfskruer').value =
				document.getElementById("topskruer1").value;*/

			/*document.getElementById('pdfskrue1').value =
				document.getElementById("skruer1").value;*/

			/*document.getElementById('pdfendekap').value =
				document.getElementById("endekap1").value;*/

			/*document.getElementById('pdftopklods').value =
				document.getElementById("topklods1").value;*/

			document.getElementById('pdfpowersupply').value =
				document.getElementById("power1").value;

			document.getElementById('pdfled').value =
				document.getElementById("led1").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;


			var k200_id_1 = jQuery("#pdf_k200_id").val();

			if (k200_id_1 == 'K200') {


				if (mainHeight == '1.8') {
					// document.getElementById( 'pdf_slutstolpe_id' ).value = 1342;
					// document.getElementById( 'pdf_kirkedalstolpe_id' ).value = 1346;
					// document.getElementById( 'pdf_hjornestolpe_id' ).value = 1349;
				}
				if (mainHeight == '0.9') {
					// document.getElementById( 'pdf_slutstolpe_id' ).value = 1344;
					// document.getElementById( 'pdf_kirkedalstolpe_id' ).value = 1348;
					// document.getElementById( 'pdf_hjornestolpe_id' ).value = 1351;
				}
				if (mainHeight == '1.4') {
					// document.getElementById( 'pdf_slutstolpe_id' ).value = 1343;
					// document.getElementById( 'pdf_kirkedalstolpe_id' ).value = 1347;
					// document.getElementById( 'pdf_hjornestolpe_id' ).value = 1350;
				}



			}
			if (k200_id_1 == 'K300') {


				if (mainHeight == '1.8') {
					// document.getElementById( 'pdf_slutstolpe_id' ).value = 1301;
					// document.getElementById( 'pdf_kirkedalstolpe_id' ).value = 1365;
					//document.getElementById( 'pdf_hjornestolpe_id' ).value = 1349;
					// document.getElementById( 'pdf_hjornestolpe_id' ).value = 1369;
				}
				if (mainHeight == '0.9') {
					// document.getElementById( 'pdf_slutstolpe_id' ).value = 1303;
					// document.getElementById( 'pdf_kirkedalstolpe_id' ).value = 1367;
					//document.getElementById( 'pdf_hjornestolpe_id' ).value = 1351;
					// document.getElementById( 'pdf_hjornestolpe_id' ).value = 1371;
				}
				if (mainHeight == '1.4') {
					// document.getElementById( 'pdf_slutstolpe_id' ).value = 1302;
					// document.getElementById( 'pdf_kirkedalstolpe_id' ).value = 1366;
					//document.getElementById( 'pdf_hjornestolpe_id' ).value = 1350;
					// document.getElementById( 'pdf_hjornestolpe_id' ).value = 1370;
				}



			}



			/*  if(mainHeight == '0.9'){
			  document.getElementById( 'pdf_lager_id' ).value = 1224;

			  }
			  if(mainHeight == '1.4'){
			  document.getElementById( 'pdf_lager_id' ).value = 1225;

			  }
			  if(mainHeight == '1.8'){
			  document.getElementById( 'pdf_lager_id' ).value = 1226;

			  }*/



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


				var envTexture = new BABYLON.CubeTexture("https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/environmentSpecular.env", scene);
				var DefaultSkybox_obj = scene.createDefaultSkybox(envTexture, true, 1000);
				console.log('************************************');
				console.log(DefaultSkybox_obj);
				DefaultSkybox_obj.isVisible = false;
				console.log('************************************');
				envTexture.isVisible = false;
				//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 = jQuery("#instanceCounti").val(); //17
				let instanceCountlw = jQuery("#instanceCountl").val(); //12
				let instanceCountuw = jQuery("#instanceCountu").val(); //3
				var squerew = jQuery("#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.upperBetaLimit = 1.5;
				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 = jQuery("#instanceCounti").val(); //17
				let instanceCountl = jQuery("#instanceCountl").val(); //12
				let instanceCountu = jQuery("#instanceCountu").val(); //3
				var squere = jQuery("#squere").val();
				scene.clearColor = BABYLON.Color4(0.5, 0.8, 0.6, 0.8);
				light.intensity = 1;

				console.log(light);
				var updateins = 0;
				let value = 99;
				var position = 0;

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

				glb_data1 = row_url_1;
				var glbdatasplit = glb_data1.split('/');
				const getimagename = glbdatasplit[8];

				if (getimagename == "Done_galvaniserede-stolpe-alu_k3_black" || getimagename == "Done_galvaniserede-stolpe-alu_k3_Hardwood" || getimagename == "Done_galvaniserede-stolpe-alu_k3_Oak" || getimagename == "Done_galvaniserede-stolpe-black_k3_black" || getimagename == "Done_galvaniserede-stolpe-black_k3_hardwood" || getimagename == "Done_galvaniserede-stolpe-black_k3_Oak" || getimagename == "K1_K2_Black" || getimagename == "K3_Black" || getimagename == "K3_Hardwood" || getimagename == "K3_Oak" || getimagename == "NEW-galvaniserede-stolpe-alu_k1-sanded_9") {

					BABYLON.SceneLoader.ImportMesh("", "", glb_data1, scene, function (newMeshes) {
						newMeshes.forEach(function (mesh, index1) {

							mesh.isVisible = false;
							for (var index = 0; index < instanceCounti; index++) {

								var newInstance = mesh.createInstance("fence" + index);
								if (instanceCountl > 0) {
									newInstance.position.x = 0.915;
								} else {
									newInstance.position.x = 0;
								}

								newInstance.position.z = index * -1.83;
							}

							for (var index2 = 0; index2 < instanceCountl; index2++) {

								var newInstancel = mesh.createInstance("fencel" + index2);
								newInstancel.rotate(new BABYLON.Vector3(0, 1, 0), Math.PI * 0.50);
								newInstancel.position.x = (index2 * -1.83);
								newInstancel.rotation.y = 0;
								newInstancel.position.z = 0.915;
							}
							for (var index3 = 0; index3 < instanceCountu; index3++) {

								var newInstanceu3 = mesh.createInstance("fenceu" + index3);
								newInstanceu3.position.x = (instanceCountl * -1.83) + 0.915;
								newInstanceu3.position.z = (index3 * -1.83);
								newInstanceu3.rotation.y = 0;
							}

							for (var index34 = 0; index34 < squere; index34++) {

								var newInstancel = mesh.createInstance("fenced" + index34);

								newInstancel.rotate(new BABYLON.Vector3(0, 1, 0), Math.PI * 0.50);
								newInstancel.position.x = (index34 * -1.83);
								newInstancel.position.z = (instanceCountu * -1.83) + 0.915;
								newInstancel.rotation.y = 0;

							}


						});

					});


				} else {

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

							fencecount = counttt[0].split('.');
							console.log("fencecount=" + fencecount[0]);
							if (getimagename == "ALU_BlackProfil_SilverStolpe_Galvaniseret_new") {
								if (fencecount[0] == 13) {
									newInstance.position.y = 0.15;
								} else if (fencecount[0] == 11) {
									newInstance.position.y = -0.15;
								} else if (fencecount[0] == 9) {
									newInstance.position.y = -0.45;
								}


							} else if (getimagename == "ALU_GrayProfil_SilverStolpe_Galvaniseret_new") {

								if (fencecount[0] == 13) {
									newInstance.position.y = 0.15;
								} else if (fencecount[0] == 11) {
									newInstance.position.y = -0.15;
								} else if (fencecount[0] == 9) {
									newInstance.position.y = -0.45;
								}
							}
							//console
							if (color1[index_id1] == 'door') {
							}
							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.320;
									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 == 'ALU_BlackProfil_BlackStolpe') {
									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.rotate(new BABYLON.Vector3(0, 90, 0), 1.5);
									plane.position.y = -0.300;
									//plane.position.x =  0.300;

									plane.position.x = -0.320;
									plane.position.z = -1.4;
								}

								if (getimagename == 'ALU_GrayProfil_BlackStolpe_Galvaniseret_new') {

									//alert(filenameee);
									if (filenameee == "Pulverlakeret_grey_13.glb") {
										newInstance.position.x = -0.915;
										newInstance.position.z = ((index_id1 + 1) * -1.826);

										plane.position.y = 4.5;
										plane.position.z = 0.4;
									}

								}


								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_BlackStolpe') {
									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;
								if (getimagename == 'ALU_GrayProfil_BlackStolpe_Galvaniseret_new') {
									if (filenameee == "Pulverlakeret_grey_13.glb") {
										plane2.position.y = 4.5;
										plane2.position.z = 3.2;
									}
								}
								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);

							if (getimagename == 'ALU_GrayProfil_BlackStolpe_Galvaniseret_new') {
								if (filenameee == "Pulverlakeret_grey_13.glb") {
									rect1.height = "300px";
									rect2.height = "300px";
								}
							}

							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 = 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://kirkedalkomposit.dk/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), Math.PI * 0.50);
							}
							//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);
							}
							//not used
							newInstancel.position.z = 0.915;
							if (getimagename == "ALU_GrayProfil_SilverStolpe_Galvaniseret_new" || getimagename == "ALU_BlackProfil_SilverStolpe_Galvaniseret_new") {
								fencecount = counttt[0].split('.');
								console.log("fencecount=" + fencecount[0]);

								if (fencecount[0] == 13) {
									newInstancel.position.y = 0.15;
								} else if (fencecount[0] == 11) {
									newInstancel.position.y = -0.15;
								} else if (fencecount[0] == 9) {
									newInstancel.position.y = -0.45;
								}
							}

							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;

								if (getimagename == 'ALU_GrayProfil_BlackStolpe_Galvaniseret_new') {

									//alert('hiii');

									// newInstancel.position.x = -0.915;
									// newInstancel.position.z = 1;
									if (filenameee == "Pulverlakeret_grey_13.glb") {
										if (index_id22 == 0) {
											newInstancel.position.x = -1.83;
										} else {
											newInstancel.position.x = -1.83 + (index_id22 * 1.83);
										}
										plane.position.y = 4.5;
										plane.position.z = 0.4;
										//newInstancel.position.x = ((index_id22)*-1.826)+1.83;
									}
								}


								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_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] > 10) {
										plane2se.position.y = 1.2;
									}
								}
								else {
									plane2se.position.y = -0.300;
								}
								plane2se.position.z = 1.400;

								if (getimagename == 'ALU_GrayProfil_BlackStolpe_Galvaniseret_new') {
									if (filenameee == "Pulverlakeret_grey_13.glb") {
										plane2se.position.y = 4.5;
										plane2se.position.z = 3.2;
									}
								}
								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);

							if (getimagename == 'ALU_GrayProfil_BlackStolpe_Galvaniseret_new') {
								if (filenameee == "Pulverlakeret_grey_13.glb") {
									rect12.height = "300px";
									rect012.height = "300px";
								}
							}

							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 = 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 {
							}
							if (getimagename == "ALU_GrayProfil_SilverStolpe_Galvaniseret_new" || getimagename == "ALU_BlackProfil_SilverStolpe_Galvaniseret_new") {
								fencecount = counttt[0].split('.');
								console.log("fencecount=" + fencecount[0]);

								if (fencecount[0] == 13) {
									newInstanceu3.position.y = 0.15;
								} else if (fencecount[0] == 11) {
									newInstanceu3.position.y = -0.15;
								} else if (fencecount[0] == 9) {
									newInstanceu3.position.y = -0.45;
								}
							}
							//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_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] > 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";

								if (getimagename == 'ALU_GrayProfil_BlackStolpe_Galvaniseret_new') {

									if (filenameee == "Pulverlakeret_grey_13.glb") {
										//newInstanceu3.position.x = -0.915;
										newInstanceu3.position.z = ((index_idd3 + 1) * -1.826);
										plane.position.y = 4.5;
										plane.position.z = 0.4;
									}
								}

								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_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;
							}*/
									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;

								if (getimagename == 'ALU_GrayProfil_BlackStolpe_Galvaniseret_new') {
									if (filenameee == "Pulverlakeret_grey_13.glb") {
										plane2.position.y = 4.5;
										plane2.position.z = 3.2;
									}
								}

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

							if (getimagename == 'ALU_GrayProfil_BlackStolpe_Galvaniseret_new') {
								if (filenameee == "Pulverlakeret_grey_13.glb") {
									rect1.height = "300px";
									rect01.height = "300px";
								}
							}

							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 = 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++) { //alert("hi");
						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://kirkedalkomposit.dk/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("fencel04" + 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);
							}

							if (data_id4 == '1') {
								if (color4[index_id332] == 'door') {
									newInstancel.position.x = (index_id332 * 1.83 - 0.43);
								} else {
									newInstancel.position.x = (index_id332 * 1.83 - 0.855);
									// newInstancel.rotate(new BABYLON.Vector3(0, 1, 0), Math.PI * 0.50);  
								}
							}

							if (getimagename == "ALU_GrayProfil_SilverStolpe_Galvaniseret_new" || getimagename == "ALU_BlackProfil_SilverStolpe_Galvaniseret_new") {

								fencecount = counttt[0].split('.');
								console.log("fencecount=" + fencecount[0]);

								if (fencecount[0] == 13) {
									newInstancel.position.y = 0.15;
								} else if (fencecount[0] == 11) {
									newInstancel.position.y = -0.15;
								} else if (fencecount[0] == 9) {
									newInstancel.position.y = -0.45;
								}

							}

							//  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_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] > 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;

								if (getimagename == 'ALU_GrayProfil_BlackStolpe_Galvaniseret_new') {

									if (filenameee == "Pulverlakeret_grey_13.glb") {
										if (index_id332 == 0) {
											newInstancel.position.x = -1.83;
										} else {
											newInstancel.position.x = -1.83 + (index_id332 * 1.83);
										}
										//newInstancel.position.x = ((index_id22)*-1.826)+1.83;

										plane.position.y = 4.5;
										plane.position.z = 0.4;
									}
								}
								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_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;
									}
								}
								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;

								if (getimagename == 'ALU_GrayProfil_BlackStolpe_Galvaniseret_new') {
									if (filenameee == "Pulverlakeret_grey_13.glb") {
										plane2.position.y = 4.5;
										plane2.position.z = 3.2;
									}
								}
							}
							// 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);

							if (getimagename == 'ALU_GrayProfil_BlackStolpe_Galvaniseret_new') {
								if (filenameee == "Pulverlakeret_grey_13.glb") {
									rect12.height = "300px";
									rect120.height = "300px";
								}
							}
							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 = 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: true,
				// embedMode: false,
			});
				//scene.debugLayer.show();



		return scene;

			};
		//fencecolor

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

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

		/*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_box44,.sidebar_calc_box4,.sidebar_calc_box5").click(function () {
			scene.dispose();
			custom_mesh = '';
			custom_button = '';
			//custom_advancedTexturee.dispose();
			row1_array = [];
			row1_array1 = [];
			row2_array = [];
			row2_array1 = [];
			row3_array = [];
			row3_array1 = [];
			row4_array = [];
			row4_array1 = [];
			var custom_type = 'fence';
			color1 = [];
			color2 = [];
			color3 = [];
			color4 = [];
			custom_height_image1 = [];
			custom_height_image2 = [];
			custom_height_image3 = [];
			custom_height_image4 = [];
			jQuery("#instanceCounti").val('0');
			jQuery("#instanceCountl").val('0');
			jQuery("#instanceCountu").val('0');
			jQuery("#squere").val('0');
			jQuery("#fencetype").val('');


		});

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

		});



		}


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

			setTimeout(function () {

				location.reload();

			}, 500);



		});



	</script>





	<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: inherit;margin: auto;text-align: justify;    font-weight: 600;margin-top: 15px;">Indtast
				højde: </label>

			<select class="custom_height" id="custom_height" name="custom_height">
				<option value="1.8">1.8</option>
				<option value="1.4">1.4</option>
				<option value="0.9">0.9</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 (jQuery("input[name=custom_type]:checked").val() == "door") {
				custom_type = 'door';

				//jQuery(".custom_height").hide();
			}
			else if (jQuery("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);
			//console.log("fencee"+fencee);
			//console.log("jsondata"+jsondata);
			myJsonString = {};
			jQuery.each(jsondata, function (key, value) {

				if (key == (file - 1)) {
					jQuery.each(value, function (index, valuee) {

						if (index == colors) {
							console.log("index" + index);
							// alert("hii");
							if (custom_type == 'fence') {

								fencelength = valuee.lengthss;
								//console.log("fencelength"+fencelength);
								height = jQuery("#custom_height option:selected").val();
								//console.log("height"+height);
								if (height == 1.8) {
									lengthtotal = 13;
								} else if (height == 1.4) {
									lengthtotal = 10;
								} else if (height == 0.9) {
									lengthtotal = 7;
								}

								//console.log("lengthtotal"+lengthtotal);
								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 = 13 * height / 1.8;

								valuee.heigth = height;
								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');

			if (custom_height == 1.8) {
				lengthtotal = 13;
			} else if (custom_height == 1.4) {
				lengthtotal = 10;
			} else if (custom_height == 0.9) {
				custom_height = 7;
			}
			heigth = Math.ceil(lengthtotal);

			if (custom_type == 'fence') {
				if (name == 'grey' && slop == 'alu') {
					if (heigth > 13) {
						images_fence = "https://kirkedalkomposit.dk/wp-content/themes/kallyas-child/image/3d/ALU_GrayProfil_SilverStolpe_Galvaniseret_new/Galvaniseret_Grey_13.glb";
					} else {
						images_fence = "https://kirkedalkomposit.dk/wp-content/themes/kallyas-child/image/3d/ALU_GrayProfil_SilverStolpe_Galvaniseret_new/Galvaniseret_Grey_" + heigth + ".glb";
					}
				} else if (name == 'grey' && slop == 'black') {
					if (heigth > 13) {
						images_fence = "https://kirkedalkomposit.dk/wp-content/themes/kallyas-child/image/3d/ALU_GrayProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_grey_13.glb";
					} else {
						images_fence = "https://kirkedalkomposit.dk/wp-content/themes/kallyas-child/image/3d/ALU_GrayProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_grey_" + heigth + ".glb";
					}
				} else if (name == 'black' && slop == 'black') {
					if (heigth > 13) {
						images_fence = "https://kirkedalkomposit.dk/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_13.glb";
					} else {
						images_fence = "https://kirkedalkomposit.dk/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_" + heigth + ".glb";
					}
				} else if (name == 'black' && slop == 'alu') {

					if (heigth > 13) {
						images_fence = "https://kirkedalkomposit.dk/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_SilverStolpe_Galvaniseret_new/Galvaniseret_Black_13.glb";
					} else {
						images_fence = "https://kirkedalkomposit.dk/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_SilverStolpe_Galvaniseret_new/Galvaniseret_Black_" + heigth + ".glb";
					}
				} else {
					if (heigth > 13) {
						images_fence = "https://kirkedalkomposit.dk/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_13.glb";
					} else {
						images_fence = "https://kirkedalkomposit.dk/wp-content/themes/kallyas-child/image/3d/ALU_BlackProfil_BlackStolpe_Galvaniseret_new/Pulverlakeret_black_" + heigth + ".glb";
					}
				}
			} else {
				if (name == 'grey' && slop == 'alu') {

					//images_door = "https://kirkedalkomposit.dk/wp-content/themes/kallyas-child/image/3d/door/Door_1_tex_1.glb";
					images_door = "https://kirkedalkomposit.dk/wp-content/themes/kallyas-child/image/3d/galvaniserede_door/Door_2_tex_2.glb";
					//--images_door = "https://kirkedalkomposit.dk/wp-content/themes/kallyas-child/image/3d/door/Door_2_tex_2.glb";
				} else if (name == 'grey' && slop == 'black') {
					//images_door = "https://kirkedalkomposit.dk/wp-content/themes/kallyas-child/image/3d/door/Door_1_tex_1.glb";
					images_door = "https://kirkedalkomposit.dk/wp-content/themes/kallyas-child/image/3d/galvaniserede_door/Door_2_tex_2.glb";

				} else if (name == 'black' && slop == 'alu') {
					//images_door = "https://kirkedalkomposit.dk/wp-content/themes/kallyas-child/image/3d/door/Door_1_tex_1.glb";
					images_door = "https://kirkedalkomposit.dk/wp-content/themes/kallyas-child/image/3d/galvaniserede_door/Door_1_tex_1.glb";
					//---images_door = "https://kirkedalkomposit.dk/wp-content/themes/kallyas-child/image/3d/door/Door_1_tex_1.glb";
				} else if (name == 'black' && slop == 'black') {
					//--images_door = "https://kirkedalkomposit.dk/wp-content/themes/kallyas-child/image/3d/door/Door_1_tex_2.glb";
					//images_door = "https://kirkedalkomposit.dk/wp-content/themes/kallyas-child/image/3d/door/Door_1_tex_1.glb";
					images_door = "https://kirkedalkomposit.dk/wp-content/themes/kallyas-child/image/3d/galvaniserede_door/Door_1_tex_1.glb";
				} else {
					//---images_door = "https://kirkedalkomposit.dk/wp-content/themes/kallyas-child/image/3d/door/Door_1_tex_1.glb";
					images_door = "https://kirkedalkomposit.dk/wp-content/themes/kallyas-child/image/3d/galvaniserede_door/Door_1_tex_1.glb";
					//images_door = "https://kirkedalkomposit.dk/wp-content/themes/kallyas-child/image/3d/door/Door_1_tex_2.glb";
				}
			}



			if (heigth > 13) {
				if (custom_type == 'door') {
					//image_name = "https://kirkedalkomposit.dk/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1 (1).glb";
					image_name = "https://kirkedalkomposit.dk/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;

						}
					}





					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://kirkedalkomposit.dk/wp-content/themes/kallyas-child/image/3d/gray/round_I_GLB_silver_grey_v05_13.glb";
				}
			} else {
				if (custom_type == 'door') {
					//image_name = "https://kirkedalkomposit.dk/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1 (1).glb";
					image_name = "https://kirkedalkomposit.dk/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://kirkedalkomposit.dk/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');
							jQuery('#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');
							jQuery('#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');
							jQuery('#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');
							jQuery('#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 (jQuery(window).width() < 767) {
				//jQuery('.renderCanvas').css('heights','350px');
				// change functionality for smaller screens
			} else {
				document.body.style.overflow = 'hidden';
			}

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



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

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

			jQuery(".minimizebutton").hide();
		});
		jQuery('body').on('mouseover', '#renderCanvas', function () {
			jQuery('body, html').css('overflow', 'hidden');
		}).on('mouseout', '#renderCanvas', function () {
			jQuery('body, html').css('overflow', 'auto');
		});
	</script>



	<style>
		.gift-wrap-optionmcmc {
			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;
			margin: 0;
			min-height: 300px;
			padding: 0;
			width: 50%;
			z-index: 999999999;
			position: fixed;
			top: 50% !important;
			left: 50%;
			transform: translate(-50%, -50%);
			max-width: 700px;
		}

		.shield-engravingmcmc {
			width: 100%;
		}

		.close-popupmcmc {
			color: #fff !important;
			background-color: #000 !important;
			border: none !important;
			float: right !important;
			width: 35px !important;
			height: 35px !important;
			/* font-size: 24px !important; */
			/* font-weight: 700 !important; */
			/* line-height: 1 !important; */
			/*opacity: 0.2 !important;*/
			text-shadow: 0 1px 0 #fff;
			cursor: pointer !important;
			padding: 0px !important;
			border-radius: 20px !important;
			margin: 0px !important;
			box-sizing: border-box !important;
			font: 400 30px/24px Helvetica, sans-serif !important;
			position: relative;
			top: -16px;
			right: -16px;
		}

		#ModalTitlemcmc,
		.ModalTitlemcmc {
			font: 400 14px/24px Helvetica, sans-serif;
			min-height: 30px;
			width: 100%;
			/* background: #6CC7BE; */
			border-bottom: 1px solid #fff;
			border-radius: 7px 7px 0 0;
			color: #fff;
			padding: 1%;
			text-align: left;
		}

		#ModalButtonRowmcmc,
		.ModalButtonRowmcmc {
			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;
		}

		#ModalButtonRowmcmc .Buttonmcmc {
			background: #ff0000 none repeat scroll 0 0;
			border: 1px solid #ff0000;
			border-radius: 2px;
			box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2) inset;
			color: #fff !important;
			cursor: pointer;
			/* display: inline-block; */
			display: flex;
			float: right;
			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: auto;
			height: 34px;
		}

		.cleardivmcmc {
			clear: both;
		}

		.file-addon-wrapmcmc {
			padding: 15px;
		}


		@media (max-width: 1240px) {
			.gift-wrap-optionmcmc {
				width: 60%;
			}
		}

		@media (max-width: 767px) {
			.gift-wrap-optionmcmc {
				width: 80%;
			}
		}

		@media (max-width: 500px) {
			.gift-wrap-optionmcmc {
				width: 90%;
			}
		}
	</style>


	<div id="gift-wrap-optionmcmc" class="gift-wrap-optionmcmc" style="display:none;">

		<div id="ModalTitlegmcmc">
			<button id="popupBoxCloseengravingmcmc" class="close-popupmcmc" type="button">
				<span aria-hidden="true">&times;</span>
			</button>
		</div>

		<div class="file-addon-wrapmcmc">
			<iframe width="700" height="315" src="https://www.youtube.com/embed/6IRw19W4uig"
				title="YouTube video player" frameborder="0"
				allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
				allowfullscreen></iframe>
		</div>
	</div>


	<script>
		jQuery(document).on("click", ".video_show_button_mcmcmc", function () {
			load_service_PopupBox1mcmc();
		});

		jQuery('.close-popupmcmc').click(function () {
			unload_service_PopupBox1mcmc();
		});

		function unload_service_PopupBox1mcmc() {
			jQuery('#gift-wrap-optionmcmc').fadeOut("slow");
			jQuery(".shield-engravingmcmc").css({
				"opacity": "1"
			});
			jQuery(".shield-engravingmcmc").css({
				"display": "none"
			});

		}
		function load_service_PopupBox1mcmc() {
			jQuery('#gift-wrap-optionmcmc').fadeIn("slow");
			jQuery(".shield-engravingmcmc").css({ // this is just for style
				"opacity": "0.59"
			});

			jQuery(".shield-engravingmcmc").css({ // this is just for style       
				"position": "fixed"
			});
			jQuery(".shield-engraving").css({ // this is just for style       
				"display": "block"
			});
		}

	</script>{"id":1104,"date":"2021-01-05T10:43:40","date_gmt":"2021-01-05T10:43:40","guid":{"rendered":"https:\/\/kirkedal.se\/?page_id=1104"},"modified":"2025-05-12T05:21:00","modified_gmt":"2025-05-12T05:21:00","slug":"berechnen-sie-ihren-verzinkten-zaun","status":"publish","type":"page","link":"https:\/\/kirkedal.de\/de\/beregn-dit-galvaniserede-hegn\/","title":{"rendered":"Berechnen Sie Ihren verzinkten Zaun"},"content":{"rendered":"<p><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\"><\/span><\/span><\/p>","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-1104","page","type-page","status-publish","hentry","prodpage-classic"],"acf":[],"_links":{"self":[{"href":"https:\/\/kirkedal.de\/de\/wp-json\/wp\/v2\/pages\/1104","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=1104"}],"version-history":[{"count":4,"href":"https:\/\/kirkedal.de\/de\/wp-json\/wp\/v2\/pages\/1104\/revisions"}],"predecessor-version":[{"id":2560,"href":"https:\/\/kirkedal.de\/de\/wp-json\/wp\/v2\/pages\/1104\/revisions\/2560"}],"wp:attachment":[{"href":"https:\/\/kirkedal.de\/de\/wp-json\/wp\/v2\/media?parent=1104"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}