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

<style>
	.calculator-box.calculator-3 .ccb-text-box img,
	.calculator-box.calculator-4 .ccb-text-box img,
	.calculator-box.calculator-5 .ccb-text-box img,
	.calculator-box.calculator-6 .ccb-text-box img {
		height: 200px;
		object-fit: contain;
	}

	#embed-host {
		display: none;
	}

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

		padding: 0;
		position: fixed;

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

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

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

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

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

		padding: 1%;
		text-align: left;

		height: 20px;
	}

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

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

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

	.cleardiv {
		clear: both;
	}
</style>
<style type="text/css">
	.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;
	}

	.d3d-width {
		width: 100%;
	}

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

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

	.ccb-list .ccb-list-box h2 {
		display: none;
	}

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

	.ccb-list .ccb-list-box ul {
		padding: 125px;
		margin-top: 15px;
		margin-bottom: 15px;
	}

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

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

	.ccb-text-box .stolper_selection_step_wrap {
		/*margin-top: 87px;*/
	}

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

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

	}

	.vaelg-form ul li {
		/*width:32.33%;*/
		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;
	}

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

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

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

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

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

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

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

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

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

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

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

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

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

	.df-row label {
		font-size: 18px;
		margin-bottom: 5px;
		color: #000;
		font-weight: unset;
	}

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

	.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;
		/*border-left:none;
	background:#fff;*/
		text-align: center;
		line-height: 35px;
		width: 25%;
		border-top-right-radius: 5px;
		border-bottom-right-radius: 5px;
		background: #f4f4f4;
	}

	.df-row {
		/*width:100%;*/
		width: 70%;
		float: left;
		padding: 0 40px;
	}

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

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

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

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

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

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

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

	}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	.vaelg-tilbehor-1-img {
		width: 33.333%;
		/*width:48%;*/
		float: left;
		text-align: center;
		/*margin: 1%;*/
		/*border:1px solid #e1e1e1;*/
		border: 1px solid rgb(244, 244, 244);
		margin-bottom: 50px;
	}

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

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

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

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

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

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

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

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

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

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

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

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

	.button-row {
		width: 100%;
		float: left;
		margin-top: 40px;
		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: 80%;
		float: none;
		margin: auto;
		padding: 70px 0;
		display: table;
	}

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

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

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

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

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

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

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

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

	.wqs_div {
		/*float: left;
		height: 300px;
		/*width: 300px;
		padding: 15px;
		border: 1px solid #817e7e;
		margin: 2px;*/
		/* background: #fff;*/
	}

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

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

	.stolper_selection_step_wrap>ul {
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.stolper_selection_step_wrap>ul>li {
		/*display: flex;
  align-items: center;
  justify-content: center;border-color: #e1e1e1;
	 
	height: 280px;*/
		/*  width: 400px;*/

	}

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

	.vaelg-top_profil_wrap {
		margin: 0 auto;
		float: unset;
		/*display: flex;
  align-items: center;
  justify-content: center;*/
	}

	.vaelg-top_profil_wrap .wqs_div {
		/*border:1px solid #e1e1e1;*/
	}

	.btn_beregn_vaelg_tilbehor_step {
		text-align: center;
		padding-top: 60px;
	}

	.btn_beregn_vaelg_tilbehor_step {
		/*width: 75%;*/
	}

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

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

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

	.renderCanvas {
		height: 800px;
	}

	.stk {
		height: 33px;

		border: 1px solid #ddd;
		border-left: none;
		background: #fff;
		text-align: center;
		line-height: 2;
		width: 29px;
		float: left;
		border-top-right-radius: 6px;
		border-bottom-right-radius: 6px;
	}

	.stokdiv input {
		width: 28%;
		height: 33px;
		border: 1px solid #ddd;
		float: left;
	}

	.stokdiv {
		position: absolute;
		right: -60px;
		top: 34px;
		width: 45%;
		height: 33px;
	}

	.vaelg-tilbehor-2 .form-control {
		height: 35px;
		border-radius: 0;
		border: 1px solid #777;
		background: #fff;
		float: left;
		margin: 0px;
		width: 50%;
		border-top-left-radius: 4px;
		border-bottom-left-radius: 4px;
	}

	.vaelg-tilbehor-2 .w-70 {
		width: 100%;
		padding: 0;
	}

	.vaelg-tilbehor-2 .w-70 span {
		height: 35px;
		border-radius: 0;
		float: left;
		border: 1px solid #777;
		border-left: none;
		background: #fff;
		text-align: center;
		line-height: 35px;
		width: 25%;
		border-top-right-radius: 4px;
		border-bottom-right-radius: 4px;
		background: #f4f4f4;
	}

	p.magic-optn {
		padding-top: 5px;
		padding-bottom: 5px;
		padding-left: 5px;
		background-color: #fff;
		border: 1px solid #e1e1e1;
	}

	.magic-select-gup {
		padding-top: 50px;
		padding-bottom: 13px;
		width: 75%;
	}

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

	.btn_custom_bereng {
		float: unset;
		background: #fff;
		border: 1px solid #E1E1E1 !important;
		padding: 6px 8px 7px 8px;
		width: 68%;
		border-radius: 0px;
		font-weight: 700;
	}

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

	.all-data-list-finel {
		padding: 0px 60px 0 58px;
	}

	/*#Acc1s{display: none;}
#Acc3s{display: none;}
#Alu_led_80x80s{display: none;}
#T_clips_til_bort_40x50s{display: none;}*/
	#gift-wrap-option1 {
		position: fixed;
		top: 50% !important;
		left: 50%;
		transform: translate(-50%, -50%);
		max-width: 500px;
	}

	@media screen and (min-width:2560px) {
		.df-row label {
			font-size: 18px;
		}

		.dimensioner-form {}

		.calculator-7 .col-4 {
			min-width: 588px;
		}
	}

	/*@media screen and (min-width:1800px) {
	.df-row label {
 font-size: 10px;}
 .dimensioner-form {}
}*/
	@media screen and (max-width:1800px) {
		.stokdiv input {
			width: 45%;
		}

		.stokdiv {
			right: -33px;
		}

		.wqs_div {
			/* float: left;
	   height: auto;*/
			/* width: 250px;*/
		}

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

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

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

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

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

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

		.ccb-list .ccb-list-box ul {
			padding: 60px;
		}

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

		.ccb-list .ccb-list-box ul {
			padding: 60px 60px 0 60px;
		}

		.ccb-list .ccb-list-box ul.all-data-list-finel {
			padding: 0px 60px 0 60px;
		}

		.calculator-7 .col-4 {
			min-width: 588px;
		}
	}

	@media screen and (max-width:1400px) {
		.stokdiv {
			right: -22px;
			top: 15px;
		}

		.df-row {

			padding: 0 6px;
		}

		.df-row .w-50 {

			padding: 6px;
		}

		.df-row .w-50 label {
			font-size: 11px;
		}

		.ccb-list .ccb-list-box ul {
			padding: 60px 49px 0 49px;
		}

		.ccb-list .ccb-list-box ul.all-data-list-finel {
			padding: 0px 49px 0 49px;
		}

		.ccb-text-box .stolper_selection_step_wrap {
			/* width: 80%;
	margin: auto;*/
		}

		.stolper_selection_step_wrap>ul>li {
			/*height: 224px;*/
		}

		.cursurpointers {
			width: 60%;
		}

		/*#Acc1s{display: none;}
#Acc3s{display: none;}
#Alu_led_80x80s{display: none;}
#T_clips_til_bort_40x50s{display: none;}*/
		.calculator-6 .calculator-contact-box .ccb-text-box {
			/*margin: 22px 5px 14px 170px;*/
		}

		.vaelg-tilbehor-2 .form-control {
			border: 1px solid #ddd;
		}

		.vaelg-tilbehor-2 .w-70 span {
			border: 1px solid #ddd;
		}

		.calculator-7 .col-4 {
			min-width: 588px;
		}
	}

	@media screen and (max-width:1200px) {
		.wqs_div {
			float: left;
			height: 160px;
			width: 200px;
		}

		.col-8 {
			width: 58%;
		}

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

		.col-4 {
			width: 44%;
		}

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

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

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

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

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

		.df-row {
			width: 36%;
		}

		.id-box-50 img {
			/*margin: 14px auto;*/
			margin: 0px auto;
		}

		.ccb-list .ccb-list-box ul {
			padding: 48px 29px 0 29px;
		}

		.ccb-list .ccb-list-box ul.all-data-list-finel {
			padding: 0px 29px 0 29px;
		}

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

		.calculator-4 .calculator-contact-box .ccb-text-box h2 {
			margin: 0;
			padding: 38px;
		}

		.ccb-text-box .stolper_selection_step_wrap {
			width: 61%;
		}

		.calculator-4 .stolper_selection_step_wrap>ul>li {
			height: 185px;
		}

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

		.vaelg-tilbehor-2 {
			border: 1px solid #ddd !important;
		}

		.btn_beregn_vaelg_tilbehor_step {
			width: 100%;
		}

		.btn_beregn_vaelg_tilbehor_step {
			text-align: inherit;
			padding-top: 45px;
			margin-bottom: 8px;
		}

		p.magic-optn {
			padding-top: 0px;
			padding-bottom: 0px;
			padding-left: 4px;
		}

		.magic-select-gup {
			width: 88%;
		}

		.calculator-7 .col-4 {
			min-width: 588px;
		}
	}

	@media screen and (max-width:1150px) {
		.df-row .form-control {
			width: 60%;
		}

		.df-row span {
			width: 15%;
		}

		.stolper_selection_step_wrap>ul>li {
			height: 50%;
			width: 50%;
		}

		.calculator-7 .col-4 {
			min-width: 588px;
		}
	}

	@media screen and (max-width:1100px) {
		.wqs_div {
			float: left;
			height: 170px;
			width: 200px;
		}

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

		.vaelg-tilbehor-2 {
			border: 1px solid #f4f4f4 !important;
			padding: 0px 139px 0px 0px;
		}

		.custom-tilberor {
			border: 1px solid #ddd;
			padding: 12px;
			text-align: center;
		}

		.vaelg-tilbehor-2 .w-70 {
			float: none;
			display: table;
			margin: auto;
			width: auto;
		}

		.vaelg-tilbehor-2 .w-70 input {
			width: 75%;
		}

		p.magic-optn {
			padding-top: 5px;
			padding-bottom: 5px;
			padding-left: 5px;
		}

		.magic-select-gup {
			width: 100%;
		}

		.calculator-7 .col-4 {
			min-width: 588px;
		}
	}

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

		.calculator-7 .col-4 {
			min-width: 588px;
		}

	}

	@media screen and (max-width:900px) {
		.cursurpointers {
			max-width: 66%;
		}

		.stokdiv {
			right: -8px;
			top: 15px;
		}

		.stk {
			height: 23px;
			font-size: 10px;
			line-height: 20px;
		}

		.stokdiv input {
			width: 45%;
			height: 23px;
		}

		.stolper_selection_step_wrap>ul>li {
			display: flex;
			align-items: center;
			justify-content: center;
			border-color: #e1e1e1;

			height: 50%;
			width: 50%;

		}

		.te-price span {
			font-size: 36px;
			line-height: normal;
		}

		.wqs_div {
			float: left;
			height: 150px;
			width: 154px;
		}

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

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

		.vaelg-tilbehor-2 {
			padding: 3px 12px 0px 0px;
		}
	}

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

		.mouse_gest {
			display: none;
		}

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

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

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

		.custom-tilberor {
			border: none;
		}

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

		.col-8 {
			width: 100%;
		}

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

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

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

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

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

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

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

		.calculator-box.calculator-7 {
			display: -webkit-box;
			display: -moz-box;
			display: -ms-flexbox;
			display: -webkit-flex;
			display: flex;
			-webkit-box-orient: vertical;
			-moz-box-orient: vertical;
			-webkit-flex-direction: column;
			-ms-flex-direction: column;
			flex-direction: column;
			/* optional */
			-webkit-box-align: start;
			-moz-box-align: start;
			-ms-flex-align: start;
			-webkit-align-items: flex-start;
			align-items: flex-start;
		}

		.calculator-contact-box.desktop-vo {
			-webkit-box-ordinal-group: 2;
			-moz-box-ordinal-group: 2;
			-ms-flex-order: 2;
			-webkit-order: 2;
			order: 2;
		}

		.calculator-box.calculator-7 .tbl_custom_data {
			-webkit-box-ordinal-group: 1;
			-moz-box-ordinal-group: 1;
			-ms-flex-order: 1;
			-webkit-order: 1;
			order: 1;
		}

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

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

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

		.calculator-box.calculator-2 .id-box-50 img {
			width: 60%;
		}

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

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

		.vaelg-tilbehor-2 {
			padding: 16px 18px;
			margin: 11px 0px 0px 0px;
			border: 1px solid #d7d7d7 !important;
		}

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

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

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

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

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

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

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

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

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

		.calculator-7 .col-4 {
			min-width: auto;
		}

		.indsaet-dimensioner .df-row {
			width: auto;
			margin: 0 auto;
			float: unset;
		}

		.ccb-text-box .stolper_selection_step_wrap {
			width: auto;
			margin: 0;
		}

		.stolper_selection_step_wrap>ul>li {
			display: inline-block;
			height: 148px !important;
		}

		.ccb-text-box .stolper_selection_step_wrap .id-box-50 img {
			height: auto;
		}

		div#ModalButtonRow1 label {
			float: unset;
			text-align: center !important;
			width: auto !important;
		}

		div#ModalButtonRow1 select {
			width: auto;
		}

		div#ModalButtonRow1 input {
			width: 70%;
		}

		div#ModalButtonRow1 .custom_ok_button {
			width: auto !important;
		}

		.custom_radio_button {
			display: inherit;
			width: auto;
		}

	}

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

	.cursurpointer {
		cursor: pointer;
	}

	@media screen and (max-width:450px) {
		.wqs_div {
			float: left;
			height: 96%;
			width: 96%;
			padding: 3px;
			border: 1px solid #817e7e;
			margin: 7px;
			background: #fff;
		}
	}

	body::-webkit-scrollbar {
		display: none;
	}

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

	.vaelg-top_profil_wrap .product_item.wqs_div {
		padding: 15px;
	}

	.vaelg-top_profil_wrap ul {
		align-items: center;
		justify-content: center;
		display: flex;
	}

	.cursurpointers {
		width: 60%;
	}



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

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

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

		/*.ccb-text-box h2{font-size: 26px;
	line-height: 60px;}*/
		.calculator-box.calculator-7 .total-tab-finel tr td {
			font-size: 18px;
			line-height: 24px;
		}
	}
</style>
<input type="hidden" id="instanceCounti" value="0" />
<input type="hidden" id="instanceCountl" value="0" />
<input type="hidden" id="instanceCountu" value="0" />
<input type="hidden" id="squere" value="0" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script type="text/javascript">



	var c_color = "";
	var stolpestorrelse_color = '';
	var ready_for_pdf = false;
	var skus = [{"2578":"2513052"},{"2577":"2513048"},{"2576":"2513045"},{"2575":"2513047"},{"2574":"2512988"},{"2573":"2513050"},{"2567":"2412510"},{"2566":"2412509"},{"2565":"2412508"},{"2564":"2412503"},{"2563":"2412502"},{"2562":"2412500"},{"2499":""},{"2429":"2403029"},{"2430":"2403031"},{"2431":"2403030"},{"2432":"2403033"},{"2433":"2403034"},{"2434":"2403032"},{"2424":""},{"2425":"2399087"},{"2426":"2399086"},{"2427":"2399085"},{"2423":""},{"2489":"2456368"},{"2487":"2456369"},{"2488":"2399089"},{"2428":"2399088"},{"2418":""},{"2419":"2399186"},{"2420":"2395226"},{"2421":"2395228"},{"2307":"2275640"},{"2309":"2273516"},{"2308":"2273515"},{"2214":""},{"2225":"2262790"},{"2226":"2262794"},{"2213":""},{"2223":"2262802"},{"2224":"2262806"},{"2212":""},{"2222":"2262796"},{"2221":"2262797"},{"2211":""},{"2220":"2262803"},{"2219":"2262807"},{"2210":""},{"2217":"2262799"},{"2218":"2262800"},{"2209":""},{"2215":"2262805"},{"2216":"2262808"},{"2249":"2297661"},{"1122":""},{"1307":"1826497"},{"1304":"1894083"},{"1123":""},{"1309":"1894084"},{"1312":"1826500"},{"2288":""},{"2289":"2310801"},{"2290":"2310800"},{"2291":"2310799"},{"2292":"2310789"},{"1141":"1869000"},{"1142":"1868999"},{"1139":"1869002"},{"1140":"1869001"},{"1253":"2019160"},{"2160":"2140918"},{"1851":"2294265"},{"1294":"2122784"},{"1252":"2019158"},{"1251":"2039152"},{"1262":"2085557"},{"1151":"1894082"},{"1244":"2020775"},{"2572":"1826540"},{"1150":"1882794"},{"1149":"1882793"},{"1133":"1841018"},{"1130":"1868998"}];
	var form_lengths = [];
	var form_heights = [];
	var selected_form_id = "";
	var corners_cnt = 0;
	var widthT = 0;
	var pointCounter = 0;
	var map_init = false;
	var switch_map_val = 0;

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

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

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

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


</script>

<input type="hidden" name="alu_color" id="alu_color" value="black">
<!--<input type="hidden" name="alu_design_stlope" id="alu_design_stlope" value="">-->
<input type="hidden" name="alu_bundskinne" id="alu_bundskinne">
<input type="hidden" name="bundskinne_color" id="black" />
<input type="hidden" name="wqs_control_segment_1" id="wqs_control_segment_1" />
<div id='accordion'>
	<div id="map_div" style="height: 800px;display:none;">
		<input id="color" type="hidden" value="" />
		<input id="model" type="hidden" value="" />
		<input id="topmodel" type="hidden" value="" />
		<input id="post" type="hidden" value="" />
		<input id="led" type="hidden" value="" />
		<input id="skruer" type="hidden" value="" />
		<input id="postsize" type="hidden" value="" />
		<input id="endekap" type="hidden" value="" />
		<input type="hidden" id="fencetype" name="fencetype" value="" />
		<!-- HIDDEN INPUT TYPE TOTAL-->
		<input id="fencetype1" name="fencetype1" type="hidden" value="" />
		<!-- HIDDEN INPUT TYPE topprofile-->
		<input id="topprofiletype1" name="topprofiletype1" type="hidden" value="" />
		<!-- HIDDEN INPUT TYPE postsize-->
		<input id="postsize1" name="postsize1" type="hidden" value="" />
		<!-- HIDDEN INPUT TYPE endekaptype-->
		<input id="endekaptype1" name="endekaptype1" type="hidden" value="" />
		<input id="switchMap" style="display: none;" name="switchMap" type="checkbox" value="Values or Map?" />
		<div id="angles_div" style="margin-top: 20px; float: left; min-width: 800px;"></div>
		<div id="lengths_div" style="margin-top: 20px; float: left; min-width: 800px;"></div>
		<div id="forms_table" style="display: none;"> </div>
	</div>
	<div class="calculator-box calculator-1">
		<div class="calculator-contact-box">
			<div class="col-8">
				<div class="ccb-text">
					<div class="ccb-text-box">
						<h2>Vælg form</h2>
						<div class="vaelg-form">
							<input id="wqs_control_segment" name="wqs_control_segment" type="hidden" value="" />
							<ul>
								<li data_id="1"><img src="https://kirkedal.de/wp-content/images/form1_1.jpg" alt=""
										title=""></li>
								<li data_id="2"><img src="https://kirkedal.de/wp-content/images/form2_2.jpg" alt=""
										title=""></li>
								<li data_id="3"><img src="https://kirkedal.de/wp-content/images/form3_3.jpg" alt=""
										title=""></li>
								<li data_id="4"><img src="https://kirkedal.de/wp-content/images/form4_4.jpg" alt=""
										title=""></li>
								<!-- <li data_id="5"><img src="https://kirkedal.de/wp-content/images/opform2_2.png" alt="" title=""></li>
				<li data_id="6"><img src="https://kirkedal.de/wp-content/images/opform3_3.png" alt="" title=""></li> -->
							</ul>
						</div>
					</div>
				</div>
			</div>
			<div class="col-4">
				<div class="ccb-list">
					<div class="ccb-list-box">
						<h2>DIT VALG</h2>
						<ul>
							<li class="active-list active-list-home"><span>1. Serie / Alu Hegn</span> <img
									src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li id="Volgform"><span class="sidebar_calc_box1 ">2. Vælg form</span> <img
									src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li><span>3. Dimensioner</span> <img
									src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li><span>4. Stolpe mål</span> </li>
							<li><span>5. Vælg profil</span> <img
									src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li><span>6. Vælg stolper</span> <img
									src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li><span>7. Vælg Top/bundskinne</span> <img
									src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li><span>8. Vælg tilbehør</span> <img
									src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
						</ul>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="calculator-box calculator-2" style="display:none">
		<div class="calculator-contact-box">
			<div class="col-8">
				<div class="ccb-text">
					<div class="ccb-text-box">
						<h2>indsæt Dimensioner</h2>
						<div class="indsaet-dimensioner">
							<div class="id-box-50 indsaet-dimensioner_image_wrap"> <img
									src="https://kirkedal.de/wp-content/images/form3.jpg" alt="" title=""> </div>
							<div class="id-box-50 indsaet-dimensioner_input_wrap">
								<div class="dimensioner-form">
									<div class="df-row" id="form1_1" style="display:none;">
										<input class="hidPost" type="hidden" value="form1">
										<div class="w-50 ">
											<label>Side A - Højde </label>
											<input class="form-control inputval_vld" type="number" name="Højde"
												id="Højde">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side A - Længde</label>
											<input type="number" class="form-control" name="Laengde" id="Laengde">
											<span>mtr</span>
										</div>
									</div>
									<div class="df-row" id="form2_2" style="display:none;">
										<input class="hidPost" type="hidden" value="form2">
										<div class="w-50 ">
											<label>Side A - Højde</label>
											<input type="number" class="form-control inputval_vld">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side A - Længde</label>
											<input type="number" class="form-control">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side B - Højde</label>
											<input type="number" class="form-control inputval_vld">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side B - Længde</label>
											<input type="number" class="form-control">
											<span>mtr</span>
										</div>
									</div>
									<div class="df-row" id="form3_3" style="display:none;">
										<input class="hidPost" type="hidden" value="form3">
										<div class="w-50 ">
											<label>Side A - Højde</label>
											<input type="number" class="form-control inputval_vld">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side A - Længde</label>
											<input type="number" class="form-control">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side B - Højde</label>
											<input type="number" class="form-control inputval_vld">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side B - Længde</label>
											<input type="number" class="form-control">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side C - Højde</label>
											<input type="number" class="form-control inputval_vld">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side C - Længde</label>
											<input type="number" class="form-control">
											<span>mtr</span>
										</div>
									</div>
									<div class="df-row" id="form4_4" style="display:none;">
										<input class="hidPost" type="hidden" value="form4">
										<div class="w-50 ">
											<label>Side A - Højde</label>
											<input type="number" class="form-control inputval_vld">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side A - Længde</label>
											<input type="number" class="form-control">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side B - Højde</label>
											<input type="number" class="form-control inputval_vld">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side B - Længde</label>
											<input type="number" class="form-control">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side C - Højde</label>
											<input type="number" class="form-control inputval_vld">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side C - Længde</label>
											<input type="number" class="form-control">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side D - Højde</label>
											<input type="number" class="form-control inputval_vld">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Side D - Længde</label>
											<input type="number" 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>Højde for part A</label>
											<input type="number" class="form-control inputval_vld">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Længde for part A</label>
											<input type="number" class="form-control">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Højde for part B</label>
											<input type="number" class="form-control inputval_vld">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Længde for part B</label>
											<input type="number" class="form-control">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Højde for part C</label>
											<input type="number" class="form-control inputval_vld">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Længde for part C</label>
											<input type="number" class="form-control">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Højde for part D</label>
											<input type="number" class="form-control inputval_vld">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Længde for part D</label>
											<input type="number" class="form-control">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Højde for part E</label>
											<input type="number" class="form-control inputval_vld">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Længde for part E</label>
											<input type="number" class="form-control">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Højde for part F</label>
											<input type="number" class="form-control inputval_vld">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Længde for part F</label>
											<input type="number" class="form-control">
											<span>mtr</span>
										</div>
									</div>
									<div class="df-row" id="form6_6" style="display:none;">
										<input class="hidPost" type="hidden" value="opform3">
										<div class="w-50 ">
											<label>Højde for part A</label>
											<input type="number" class="form-control inputval_vld">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Længde for part A</label>
											<input type="number" class="form-control">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Højde for part B</label>
											<input type="number" class="form-control inputval_vld">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Længde for part B</label>
											<input type="number" class="form-control">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Højde for part C</label>
											<input type="number" class="form-control inputval_vld">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Længde for part C</label>
											<input type="number" class="form-control">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Højde for part D</label>
											<input type="number" class="form-control inputval_vld">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Længde for part D</label>
											<input type="number" class="form-control">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Højde for part E</label>
											<input type="number" class="form-control inputval_vld">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Længde for part E</label>
											<input type="number" class="form-control">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Højde for part F</label>
											<input type="number" class="form-control inputval_vld">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Længde for part F</label>
											<input type="number" class="form-control">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Højde for part G</label>
											<input type="number" class="form-control inputval_vld">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Længde for part G</label>
											<input type="number" class="form-control">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Højde for part H</label>
											<input type="number" class="form-control inputval_vld">
											<span>mtr</span>
										</div>
										<div class="w-50 ">
											<label>Længde for part H</label>
											<input type="number" class="form-control">
											<span>mtr</span>
										</div>
									</div>
								</div>
							</div>
						</div>
						<div class="btn-center" style="
	float: left;
	width: 100%;
">
							<ul style="
	max-width: 300px;
	margin: auto;
	display: table;
	margin-top: 37px;
">
								<li style="float: left; margin-right: 20px;">
									<a href="javascript:void(0)" class="button btn btn_tilbage" style="    float: left;
	background: #fff;
	border: 1px solid #e1e1e1 !important;
	padding: 8px 11px 11px 10px;
	width: 120px;
	border-radius: 0px;
	font-weight: 700;">Tilbage</a>
								</li>
								<li style="float: left;">
									<a href="javascript:void(0)" class="button btn btn_nexttrigger" style="    float: left;
	background: #fff;
	border: 1px solid #e1e1e1 !important;
	padding: 8px 11px 11px 10px;
	width: 120px;
	border-radius: 0px;
	font-weight: 700;">Næste</a>
								</li>
							</ul>
						</div>
					</div>
				</div>
			</div>
			<div class="col-4">
				<div class="ccb-list">
					<div class="ccb-list-box">
						<h2>DIT VALG</h2>
						<ul>
							<li class="active-list active-list-home"><span>1. Serie / Alu Hegn</span> <img
									src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li class="active-list sidebar_calc_box1"><span>2. Vælg form</span> <img
									src="https://kirkedal.de/wp-content/images/form3.jpg" alt="" title=""></li>
							<li><span>3. Dimensioner</span>
								<!--<img src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt="" title="">-->
							</li>
							<li><span>4. Stolpe mål</span> </li>
							<li><span>5. Vælg profil</span> <img
									src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li><span>6. Vælg stolper</span> <img
									src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li><span>7. Vælg Top/bundskinne</span> <img
									src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li><span>8. Vælg tilbehør</span> <img
									src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
						</ul>
					</div>
				</div>
			</div>
		</div>
		<button class="button btn btn_next" style="display:none;">Næste</button>
	</div>
	<div class="calculator-box calculator-stolpe_mal" style="display:none">
		<div class="calculator-contact-box">
			<div class="col-8">
				<div class="ccb-text">
					<div class="ccb-text-box">
						<h2>stolpe mål</h2>
						<div class="vaelg-profil col-md-12 stolper_selection_step_wrap">
							<ul>
								<li class="id-box-50  product_item wqs_div non_co_ex"> <img
										class="fencePostsize wqs_size1 cursurpointer" color_val="alu"
										src="https://kirkedal.de/wp-content/uploads/2022/02/Stolper-Black.png" alt=""
										title="" style="width: 65%;">
									<input class="hidPostsize1" type="hidden" value="80x80mm" show="1">
									<p style="text-align:center;">80x80 mm Alu</p>
								</li>
								<li class="id-box-50  product_item wqs_div non_co_ex"> <img
										class="fencePostsize wqs_size1 cursurpointer" color_val="black"
										src="https://kirkedalkomposit.dk/wp-content/uploads/2023/08/alu_ligth_stolpe.png"
										alt="" title="" style="width: 65%;">
									<input class="hidPostsize1" type="hidden" value="80x80mm" show="0">
									<p style="text-align:center;">Alu Design Stolpe Light 60x60</p>
								</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 active-list-home"><span>1. Serie / Alu Hegn</span> <img
									src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li class="active-list sidebar_calc_box1"><span>2. Vælg form</span> <img
									src="https://kirkedal.de/wp-content/images/form1_1.jpg" alt="" title=""></li>

							<li class="active-list sidebar_calc_box2"><span heightt_width_strr="1.8X2"
									form_heights="1.8" form_lengths="2" vælgform="form1">3. Dimensioner</span>
								<!--<img src="https://kirkedal.de/wp-content/uploads/2021/07/cal.png" alt="" title="">-->
								<b class="dimention" style="    width: 21%;font-size: 10px;margin: auto;">
									<ul class="myarraydata" style="padding:0;margin:0;">
										<li
											style="height:unset;    margin: 0;background-color: #f4f4f4;    margin-top: -5px;box-shadow: none;">
											A : 1.8X2</li>
									</ul>
								</b>
							</li>
							<li><span>4. Stolpe mål</span> <img src="" alt="" title=""></li>
							<li class="sidebar_calc_box3"><span>5. Vælg profil</span> <img
									src="https://kirkedal.de/wp-content/uploads/2022/04/k1_black-1.png" alt="" title=""
									hidfence="K1" hidcolor="Black"></li>
							<li><span>6. Vælg stolper</span> <img
									src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li><span>7. Vælg Top/bundskinne</span> <img
									src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li><span>8. Vælg tilbehør</span> <img
									src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
						</ul>
					</div>
				</div>
			</div>
		</div>
		<button class="button btn btn_next" style="display:none;">Næste</button>
	</div>
	<div class="calculator-box calculator-3" style="display:none">
		<div class="calculator-contact-box">
			<div class="col-8">
				<div class="ccb-text">
					<div class="ccb-text-box">
						<h2>Vælg profil</h2>
						<div class="vaelg-profil col-md-12 profile_selection_step_wrap">
							<div class="id-box-50 product_item cursurpointer show_item_ki">
																								<img class="fenceImg"
									src="https://kirkedal.de/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 cursurpointer show_item_ki"> <img class="fenceImg"
									src="https://kirkedal.de/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 cursurpointer show_item_ki" > <img class="fenceImg" src="https://kirkedal.de/wp-content/uploads/2021/10/Alu-Light-Design-Hardwood-Close-Up.png" alt="" title="">
				<input class="hidFence" type="hidden" value="K10" />
				<input class="hidColor" type="hidden" value="hardwood" />
				<p style="text-align:center;">Hardwood</p>
			  </div>
			  <div class="id-box-50 product_item cursurpointer show_item_ki" > <img class="fenceImg" src="https://kirkedal.de/wp-content/uploads/2021/10/Alu-Light-Design-Smoked-Oak-Close-Up.png" alt="" title="">
				<input class="hidFence" type="hidden" value="K10" />
				<input class="hidColor" type="hidden" value="Smoked_Oak" />
				<p style="text-align:center;">Smoked Oak</p>
			  </div> -->
							<div class="id-box-50 product_item cursurpointer hide_item_ki"> <img class="fenceImg"
									src="https://kirkedal.de/wp-content/uploads/2022/09/k1_1500mm_side.jpg" alt=""
									title="">
								<input class="hidFence" type="hidden" value="K1" />
								<input class="hidColor" type="hidden" value="coex_light" />
								<!--<p style="text-align:center;">K1 CO-EX – Light</p>-->
								<p style="text-align:center;">K1 Black - Light</p>
							</div>
							<div class="id-box-50 product_item cursurpointer show_item_ki"> <img class="fenceImg"
									src="https://kirkedal.de/wp-content/uploads/2024/04/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 cursurpointer show_item_ki"> <img class="fenceImg"
									src="https://kirkedal.de/wp-content/uploads/2024/04/Kirkedal-k3-hardwood-600x475.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 cursurpointer show_item_ki"> <img class="fenceImg"
									src="https://kirkedal.de/wp-content/uploads/2024/04/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 cursurpointer show_item_ki"> <img class="fenceImg"
									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 active-list-home"><span>1. Serie / Alu Hegn</span> <img
									src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li class="active-list sidebar_calc_box1"><span>2. Vælg form</span> <img
									src="https://kirkedal.de/wp-content/images/form3.jpg" alt="" title=""></li>
							<li class="active-list sidebar_calc_box2"><span>3. Dimensioner</span> <b class="dimention"
									style="  ">A:5X6 B: 5X4 A:5X6 B: 5X4 A:5X6 B: 5X4</b></li>
							<li class="active-list sidebar_stolpe_mal"><span>4. Stolpe mål</span> <img src="" alt=""
									title=""></li>
							<li><span>5. Vælg profil</span> <img
									src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li><span>6. Vælg stolper</span> <img
									src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li><span>7. Vælg Top/bundskinne</span> <img
									src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li><span>8. Vælg tilbehør</span> <img
									src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
						</ul>
					</div>
				</div>
			</div>
		</div>
		<style type="text/css">
			.wqs_size1 {}
		</style>
			</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 stolper</h2>
						<div class="vaelg-profil col-md-12 stolper_selection_step_wrap">
							<ul>
								<li class="id-box-50  product_item wqs_div non_co_ex"> <img
										class="fencePostsize wqs_size1 cursurpointer" color_val="alu"
										src="https://kirkedal.de/wp-content/uploads/2022/02/Stolper-Alu.png" alt=""
										title="" style="width: 65%;">
									<input class="hidPostsize1" type="hidden" value="80x80mm" />
									<p style="text-align:center;">80x80 mm Alu</p>
								</li>
								<li class="id-box-50  product_item wqs_div non_co_ex"> <img
										class="fencePostsize wqs_size1 cursurpointer" color_val="black"
										src="https://kirkedal.de/wp-content/uploads/2022/02/Stolper-Black.png" alt=""
										title="" style="width: 65%;">
									<input class="hidPostsize1" type="hidden" value="80x80mm" />
									<p style="text-align:center;">80x80 mm Alu Black</p>
								</li>
								<li class="id-box-50  product_item wqs_div co_ex"> <img
										class="fencePostsize wqs_size1 cursurpointer" color_val="black"
										src="https://kirkedal.de/wp-content/uploads/2022/09/Alu_black1stolpe.jpg" alt=""
										title="" style="width: 65%;">
									<input class="hidPostsize1" type="hidden" value="60x60mm" />
									<p style="text-align:center;">Alu Design Stolpe Light 60x60</p>
								</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 active-list-home"><span>1. Serie / Alu Hegn</span> <img
									src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li class="active-list sidebar_calc_box1"><span>2. Vælg form</span> <img
									src="https://kirkedal.de/wp-content/images/form3.jpg" alt="" title=""></li>

							<li class="active-list sidebar_calc_box2"><span>3. Dimensioner</span>
								<!--<img src="https://kirkedal.de/wp-content/uploads/2021/07/cal.png" alt="" title="">-->
								<b class="dimention" style="    width: 21%;font-size: 10px;margin: auto;">A:5X6 B: 5X4
									A:5X6 B: 5X4 A:5X6 B: 5X4</b>
							</li>
							<li class="active-list sidebar_stolpe_mal"><span>4. Stolpe mål</span> <img src="" alt=""
									title=""></li>
							<li class="active-list sidebar_calc_box3"><span>5. Vælg profil</span> <img
									src="https://kirkedal.de/wp-content/uploads/2021/07/vaelg-profil-1.jpg" alt=""
									title=""></li>
							<li><span>6. Vælg stolper</span> <img
									src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li><span>7. Vælg Top/bundskinne</span> <img
									src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li><span>8. Vælg tilbehør</span> <img
									src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
						</ul>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="calculator-box calculator-5" style="display:none">
		<div class="calculator-contact-box">
			<div class="col-8">
				<div class="ccb-text">
					<div class="ccb-text-box">
						<h2>Vælg Top/bundskinne</h2>
						<div class="vaelg-profil col-md-8 vaelg-top_profil_wrap">
							<ul>
								<li class="id-box-50 product_item alu_black wqs_div" style="background: #fff0;"> <img
										class="topFence cursurpointer"
										src="https://kirkedal.de/wp-content/uploads/2020/12/10005-1.jpg" alt=""
										title="">
									<input class="hidTop" type="hidden" value="alu_black">
									<p style="text-align:center;">Alu Black</p>
								</li>
								<li class="id-box-50 product_item alu wqs_div" style="background: #fff0;"> <img
										class="topFence cursurpointer"
										src="https://kirkedal.de/wp-content/uploads/2020/12/10004-1.jpg" alt=""
										title="">
									<input class="hidTop" type="hidden" value="alu">
									<p style="text-align:center;">Alu</p>
								</li>
								<li class="id-box-50 product_item alu_black wqs_div" style="background: #fff0;"> <img
										class="topFence cursurpointer"
										src="https://kirkedal.de/wp-content/uploads/2022/09/Alu_black_TopBundSkinne.jpg"
										alt="" title="">
									<input class="hidTop" type="hidden" value="alu_black">
									<p style="text-align:center;">Alu Black</p>
								</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 active-list-home"><span>1. Serie / Alu Hegn</span> <img
									src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li class="active-list sidebar_calc_box1"><span>2. Vælg form</span> <img
									src="https://kirkedal.de/wp-content/images/form3.jpg" alt="" title=""></li>

							<li class="active-list sidebar_calc_box2"><span>3. Dimensioner</span>
								<!--<img src="https://kirkedal.de/wp-content/uploads/2021/07/cal.png" alt="" title="">-->
								<b class="dimention" style="    width: 21%;font-size: 10px;margin: auto;">A:5X6 B: 5X4
									A:5X6 B: 5X4 A:5X6 B: 5X4</b>
							</li>
							<li class="active-list sidebar_stolpe_mal"><span>4. Stolpe mål</span> <img src="" alt=""
									title=""></li>
							<li class="active-list sidebar_calc_box3"><span>5. Vælg profil</span> <img
									src="https://kirkedal.de/wp-content/uploads/2021/07/vaelg-profil-1.jpg" alt=""
									title=""></li>
							<li class="active-list sidebar_calc_box4"><span>6. Vælg stolper</span> <img
									src="https://kirkedal.de/wp-content/uploads/2021/07/vaelg-stolpestorrelse2.jpg"
									alt="" title=""></li>
							<li><span>7. Vælg Top/bundskinne</span> <img
									src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li><span>8. Vælg tilbehør</span> <img
									src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
						</ul>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="calculator-box calculator-6" style="display:none">
		<div class="calculator-contact-box">
			<div class="col-8">
				<div class="ccb-text">
					<div class="ccb-text-box">
						<h2>Vælg tilbehør</h2>
						<div class="vaelg-tilbehor">
							<div class="vaelg-tilbehor-1 col-md-12">
								<style type="text/css">
									.chekacc {
										text-align: end;
									}

									.chekacc input {
										margin-right: 5px;
										width: 20px;
										height: 20px;
									}
								</style>
																<div class="id-box-50 vaelg-tilbehor-1-img product_item" >
									<!--<div style=" " class="stokdiv"><input id=""  name="stocaccacc3" class="stocaccacc3" value="" type="text"> <span class="stk" >Stk.</span></div> -->
									<div style=" " class="chekacc"> <input id="Acc3s" name="Acc3s" type="checkbox">
									</div>
									<img class="cursurpointer cursurpointers" dataid='acc3' datakey="1"
										src="https://kirkedal.de/wp-content/uploads/2021/07/rens-750ml.jpg" alt=""
										title="">
									<input id="Acc3" name="Acc3" value="acc3" type="hidden">

									<p>Rens 750ml </p>
								</div>
								
								
																<div class="id-box-50 vaelg-tilbehor-1-img product_item hRd_smco">
																		<div style=" " class="chekacc"> <input id="led_alu_black" style=""
											name="led_alu_black" type="checkbox"></div>
									<img class="cursurpointer cursurpointers" dataid='alu_led_80x80' datakey="2"
										src="https://kirkedal.de/wp-content/uploads/2022/04/LED_alu_black.png" alt=""
										title="">
									<input id="led_alu_black" name="led_alu_black" value="led_alu_black" type="hidden">

									<p>LED Alu Black</p>
								</div>

								
							</div>
							<style type="text/css">

							</style>
							<div class="vaelg-tilbehor-2 col-md-12">
								<div class="custom-tilberor"> 									<script type="text/javascript">
										function myFunctionn() {
											var input, filter, ul, li, a, i;
											input = document.getElementById("mySearch");
											filter = input.value.toUpperCase();
											ul = document.getElementById("myMenu");
											li = ul.getElementsByTagName("p");
											console.log(filter);
											$(".magic-select-gup").show();
											for (i = 0; i < li.length; i++) {

												console.log(li[i].innerHTML.toUpperCase().indexOf(filter));
												//html = jQuery("#myMenu p").html();
												a = li[i].getElementsByTagName("a")[0];

												if (li[i].innerHTML.toUpperCase().indexOf(filter) > -1) {
													li[i].style.display = "";
													console.log(li[i].innerHTML + 'First');
												} else {
													console.log(li[i].innerHTML + 'SECOND');
													li[i].style.display = "none";
												}
											}
										}
										$(".magic-select-gup").hide();
										$(".vaelg-tilbehor-2 .w-70 span").click(function () {

											$(".magic-select-gup").toggle();

										});
										$(".magic-optn").click(function () {

											var datad = $(this).attr("data-val");
											console.log(datad);
											$("input.magic-input").val(datad);
											$(".magic-select-gup").hide();

										});

									</script>

									<!--  <div class="vaelg-tilbehor-gup">
				  <input class="magic-radio" type="radio" name="radio" id="2" value="No">
				  <label for="2"> Nej </label>
				</div>
				<div class="vaelg-tilbehor-gup">
				  <input class="magic-radio" type="radio" name="radio" id="vtg1" value="LED">
				  <label for="vtg1"> LED </label>
				</div>
				<div class="vaelg-tilbehor-gup">
				  <input class="magic-radio" type="radio" name="radio" id="vtg2" value="LED Alu Black">
				  <label for="vtg2"> LED <small> Alu Black</small> </label>
				</div>
				<div class="vaelg-tilbehor-gup">
				  <input class="magic-radio" type="radio" name="radio" id="vtg3" value="LED Alu">
				  <label for="vtg3"> LED <small>Alu</small> </label>
				</div> -->

									<div class="btn_beregn_vaelg_tilbehor_step">
										<p style="text-align: center;margin: 4px 0;opacity: 0.8; 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><button class="button btn btn_beregn btn_custom_bereng"
											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 class="vaelg-tilbehor-3">
								<!--<p>Du kan forlade dette uden valg eller en indtil alle</p>-->
								<!--<button class="btn_beregn">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 active-list-home"><span>1. Serie / Alu Hegn</span> <img
									src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li class="active-list sidebar_calc_box1"><span>2. Vælg form</span> <img
									src="https://kirkedal.de/wp-content/images/form3.jpg" alt="" title=""></li>

							<li class="active-list sidebar_calc_box2"><span>3. Dimensioner</span> <b class="dimention"
									style="    width: 21%;font-size: 10px;margin: auto;">A:5X6 B: 5X4 A:5X6 B: 5X4 A:5X6
									B: 5X4</b></li>
							<li class="active-list sidebar_stolpe_mal"><span>4. Stolpe mål</span> <img src="" alt=""
									title=""></li>
							<li class="active-list sidebar_calc_box3"><span>5. Vælg profil</span> <img
									src="https://kirkedal.de/wp-content/uploads/2021/07/vaelg-profil-1.jpg" alt=""
									title=""></li>
							<li class="active-list sidebar_calc_box4"><span>6. Vælg stolper</span> <img
									src="https://kirkedal.de/wp-content/uploads/2021/07/vaelg-stolpestorrelse2.jpg"
									alt="" title=""></li>
							<li class="active-list sidebar_calc_box5"><span>7. Vælg Top/bundskinne</span> <img
									src="https://kirkedal.de/wp-content/uploads/2021/07/vaelg-topprofil.jpg" alt=""
									title=""></li>
							<li class="Vælgtilbehor"><span>8. Vælg tilbehør</span> <img style="display:none;"
									src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
						</ul>
					</div>
				</div>
			</div>
		</div>
	</div>
	<!-- <style type="text/css">
	  .dit-veg-mag input.form-control {
	height: 35px;
	border-radius: 0;
	border: 1px solid #777;
	background: #fff;
	float: left;
	margin: 0px;
	width: 75%;
	border-top-left-radius: 4px;
	border-bottom-left-radius: 4px;
}
.dit-veg-mag {
	width: 100%;
	padding: 0;
}
.dit-veg-mag span {
	height: 35px;
	border-radius: 0;
	float: left;
	border: 1px solid #777;
	border-left: none;
	background: #fff;
	text-align: center;
	line-height: 35px;
	width: 25%;
	border-top-right-radius: 4px;
	border-bottom-right-radius: 4px;
	background: #f4f4f4;
}
  </style> -->

	<div class="calculator-box calculator-7" style="display:none">
		<div class="calculator-contact-box desktop-vo">
			<div class="col-4 desktop-vo resizeing">
				<div class="ccb-list">
					<div class="ccb-list-box">
						<h2>DIT VALG</h2>

						<div class="dit-veg-mag">
							<ul>
								<li class="active-list down-arrow-list"><span>Rediger</span> <img
										src="https://kirkedal.de/wp-content/uploads/2022/02/free-arrow-down-icon-3101-thumb.png"
										alt="" title="" style="height: 50%;
	margin: auto 0 auto 0px;"></li>
							</ul>



						</div>
						<ul class="all-data-list-finel" style="display:none">
							<li class="active-list active-list-home"><span>1. Serie / Alu Hegn</span> <img
									src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li class="active-list sidebar_calc_box1"><span>2. Vælg form</span> <img
									src="https://kirkedal.de/wp-content/images/form3.jpg" alt="" title=""></li>

							<li class="active-list sidebar_calc_box2"><span>3. Dimensioner</span> <b class="dimention"
									style="margin: 0;    width: 21%;font-size: 10px;">A:5X6 B: 5X4 A:5X6 B: 5X4 A:5X6 B:
									5X4</b></li>
							<li class="active-list sidebar_stolpe_mal"><span>4. Stolpe mål</span> <img src="" alt=""
									title=""></li>
							<li class="active-list sidebar_calc_box3"><span>5. Vælg profil</span> <img
									src="https://kirkedal.de/wp-content/uploads/2021/07/vaelg-profil-1.jpg" alt=""
									title=""></li>
							<li class="active-list sidebar_calc_box4"><span>6. Vælg stolper</span> <img
									src="https://kirkedal.de/wp-content/uploads/2021/07/vaelg-stolpestorrelse2.jpg"
									alt="" title=""></li>
							<li class="active-list sidebar_calc_box5"><span>7. Vælg Top/bundskinne</span> <img
									src="https://kirkedal.de/wp-content/uploads/2021/07/vaelg-topprofil.jpg" alt=""
									title=""></li>
							<li class="active-list sidebar_calc_box6"><span>8. Vælg tilbehør</span> <img
									src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
						</ul>
					</div>
					<div class="total-row">
						<style>
							table {

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

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

							tr.frist-tr {
								background-color: #dddddd !important;
							}
						</style>
						<table class="total-tab-finel">
							<tr class="frist-tr">
								<th>Beskrivelse</th>
								<th>Antal</th>
								<th>Total</th>
							</tr>
							<!--<tr id="profile_one">
				<td>Profile - <span class="fencetype1_up"></span> 
					<script>

					  jQuery(".fencetype1_up").html(jQuery("#fencetype1").val());
					  

					  </script>
					<br> <span class="sku_code_up"></span></td>
				<td>188 stk. <br> 185,95 kr.</td>
				<td>198,00 EUR</td>
			  </tr>-->
							<tr style="display: none;">
								<td data-label="Beskrivelse">Højde</td>
								<td data-label="Antal"><input id="length1" style="width: 100px;" name="length1"
										readonly="readonly" type="number" /></td>
								<td data-label="Varenr."><span id="length1_sku"></span></td>
								<td data-label="Pris pr. stk."><span id="length1_rate"></span> </td>
								<td data-label="Total"><span id="length1_total"></span> </td>
							</tr>
							<tr style="display: none;">
								<td data-label="Beskrivelse">Længde</td>
								<td data-label="Antal"><input id="width1" style="width: 100px;" name="width1"
										readonly="readonly" type="number" /></td>
								<td data-label="Varenr."><span id="width1_sku"></span></td>
								<td data-label="Pris pr. stk."><span id="width1_rate"></span> </td>
								<td data-label="Total"><span id="width1_total"></span> </td>
							</tr>
							<tr class="fence1" style="display:none;">
								<td data-label="Beskrivelse">Profil -
									<input id="fence1" style="width: 100px;" name="fence1" readonly="readonly"
										type="hidden" /> <span id="gettotal"></span> <span id="gettotal1"></span><br>
									<span id="fence1_sku"></span>
								</td>
								<td data-label="Antal"><span id="fencehtml"></span> stk. a
									<br>
									<span id="fence1_rate"></span>
								</td>


								<td style="text-align: right;"><span id="fence1_total"></span> </td>
							</tr>
							<tr class="fence2" 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>
								</td>

								<td style="text-align: right;" data-label="Total"><span id="fence12_total"></span> </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>
								</td>
								<td style="text-align: right;"><span id="alublackdoor_product_total"></span> </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 style="text-align: right;"><span id="blackdoor_product2_total"></span> </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 style="text-align: right;"><span id="greyalu_product3_total"></span> </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 style="text-align: right;"><span id="blackblack_product4_total"></span> </td>
							</tr>
							<tr>
								<td>Topprofil - <span id="gettopprofile"></span> <br> <span id="top1_sku"></span></td>
								<td><input id="top1" style="width: 100px;" name="top1" readonly="readonly"
										type="text" />
									stk. a
									<br>
									<span id="top1_rate"></span>
									<script>
										function topprofile() {
											document.getElementById('gettopprofile').innerHTML = document.getElementById('topprofiletype1').value.replace('mm', ' mm');
										}

									</script>
								</td>

								<td style="text-align: right;"><span id="top1_total"></span> </td>
							</tr>
							<tr>
								<td>Start/Slut Stolper - <span id="getk200"></span><br><span
										id="slutstolpe1_sku"></span></td>
								<td><input id="slutstolpe1" style="width: 100px;" name="slutstolpe1" readonly="readonly"
										type="text" />
									stk. a <br>
									<span id="slutstolpe1_rate"></span>
								</td>
								<td style="text-align: right;"><span id="slutstolpe1_total"></span> </td>
							</tr>
							<tr>
								<td>Kirkedal Stolper - <span id="getk201"></span><br><span id="post1_sku"></span></td>
								<td><input id="post1" style="width: 100px;" name="post1" readonly="readonly"
										type="text" />
									stk. a <br><span id="post1_rate"></span>
								</td>
								<td style="text-align: right;"><span id="post1_total"></span> </td>
							</tr>
							<tr>
								<td>Stolpe 90° <span id="getk202"></span><br><span id="stolpe1_sku"></span></td>
								<td><input id="stolpe1" style="width: 100px;" name="stolpe1" readonly="readonly"
										type="text" />
									stk. a <br><span id="stolpe1_rate"></span> </td>
								<td style="text-align: right;"><span id="stolpe1_total"></span> </td>
							</tr>
							<tr>
								<td>Stolpe 45° - K14 <br><span id="stolpe2_sku"></span></td>
								<td><input id="stolpe2" style="width: 100px;" name="stolpe2" readonly="readonly"
										type="text" />
									stk. a <br>
									<span id="stolpe2_rate"></span>
								</td>

								<td style="text-align: right;"><span id="stolpe2_total"></span> </td>
							</tr>
							<tr>
								<td><span id="alu_design_stlope_2273515">Alu Design stolpe - K100</span>
									<input id="alu_design_stlope" style="width: 100px;" name="alu_design_stlope"
										readonly="readonly" type="hidden" value="" /><br><span
										id="alu_design_stlope_sku"></span>
								</td>
								<td><span id="alu_design_stlopehtml"></span>  stk. a <br><span
										id="alu_design_stlope_rate"></span> </td>
								<td style="text-align: right;"><span id="alu_design_stlope_total"></span> </td>
							</tr>
							<tr>
								<td>Alu Design Stolpefod -120x80x60 mm
									<input id="alu_design_stolpefod" style="width: 100px;" name="alu_design_stolpefod"
										readonly="readonly" type="hidden" /><br><span
										id="alu_design_stolpefod_sku"></span>
								</td>
								<td><span id="alu_design_stolpefodhtml"></span>  stk. a <br><span
										id="alu_design_stolpefod_rate"></span>
								</td>
								<td style="text-align: right;"><span id="alu_design_stolpefod_total"></span> </td>
							</tr>
							<tr style="display:none;">
								<td>Stolpetykkelse
									<input id="postsizetype1" style="width: 100px;" name="postsizetype1"
										readonly="readonly" type="hidden" /><br><span id="postsizetype1_sku"></span>
								</td>
								<td><span id="postsizetype1html"></span> <!-- stk. a <span id="getpostsize"></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;"><span id="postsizetype1_total"></span> </td>
							</tr>
							<tr id="alu_hide_topskruer1">
								<td>Skruer poser a K8 5,0x60 mm <br><span id="topskruer1_sku"></span></td>
								<td><input id="topskruer1" style="width: 100px;" name="topskruer1" readonly="readonly"
										type="text" />
									poser a <br><span id="topskruer1_rate"></span> </td>

								<td style="text-align: right;"><span id="topskruer1_total"></span> </td>
							</tr>
							<tr id="alu_hide_skruer1">
								<td>Skruer -K8 5,0x45 mm <br><span id="skruer1_sku"></span></td>
								<td><input id="skruer1" style="width: 100px;" name="skruer1" readonly="readonly"
										type="text" />
									poser a <br><span id="skruer1_rate"></span> </td>

								<td style="text-align: right;"><span id="skruer1_total"></span> </td>
							</tr>
							<tr id="alu_hide_endekap1">
								<td>Endekap - K9/K10 <br><span id="endekap1_sku"></span></td>
								<td><input id="endekap1" style="width: 100px;" name="endekap1" readonly="readonly"
										type="text" />
									stk. a <br><span id="endekap1_rate"></span> </td>
								<td style="text-align: right;"><span id="endekap1_total"></span> </td>
							</tr>
							<tr class="wqs_condition_2" style="display: none;">
								<td>Top/bundskinne - <span class="top_bundskinne_color"></span> <br><span
										id="alu_bundskinne_sku"></span><br>
									<input id="alu_bundskinne" style="width: 100px;" name="alu_bundskinne"
										readonly="readonly" type="hidden" value="" />
								</td>
								<td><span id="alu_bundskinnehtml"></span>  sæt. a <br><span
										id="alu_bundskinne_rate"></span> </td>
								<td style="text-align: right;"><span id="alu_bundskinne_total"></span> </td>
							</tr>
							<tr class="wqs_condition_2" style="display: none;">
								<td data-label="Beskrivelse">Montageklæb <br><span id="alu_montageklaeb_sku"></span>
									<input id="alu_montageklaeb" style="width: 100px;" name="alu_montageklaeb"
										readonly="readonly" type="hidden" value="" />
								</td>
								<td data-label="Antal"><span id="alu_montageklaebhtml"></span>  stk. a
									<input id="alu_montageklaeb_hidd" name="alu_montageklaeb_hidd" type="hidden"
										value="" /><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 id="alu_hide_topklods1">
								<td>Topklods - K11<br><span id="topklods1_sku"></span></td>
								<td><input id="topklods1" style="width: 100px;" name="topklods1" readonly="readonly"
										type="text" />
									stk. a <br><span id="topklods1_rate"></span> </td>
								<td style="text-align: right;"><span id="topklods1_total"></span> </td>
							</tr>
														<tr>
								<td>LED - K13<br><span id="led1_sku"></span></td>
								<td><input id="led1" style="width: 100px;" name="led1" readonly="readonly"
										type="text" />
									stk. a </td>

								<td><span id="led1_rate"></span> </td>
								<td style="text-align: right;"><span id="led1_total"></span> </td>
							</tr>
							<tr id="acc1_cntt" style="display:none;">
								<td>Imprægnering 1L
									<input id="acc1_cnt" style="width: 100px;" name="acc1_cnt" readonly="readonly"
										type="hidden" /><br><span id="acc1_cnt_sku"></span>
								</td>
								<td><span id="acc1_cnttt"></span>  stk. a <br><span id="acc1_cnt_rate"></span> </td>
								<td style="text-align: right;"><span id="acc1_cnt_total"></span> </td>
							</tr>
							<tr>
								<td>Rens 750ml
									<input id="acc3_cnt" style="width: 100px;" name="acc3_cnt" readonly="readonly"
										type="hidden" /><br><span id="acc3_cnt_sku"></span>
								</td>
								<td><span id="acc3_cnthtml"></span>  stk. a <br><span id="acc3_cnt_rate"></span> </td>


								<td style="text-align: right;"><span id="acc3_cnt_total"></span> </td>
							</tr>
														<tr style="display:none;">
								<td>LED Alu Black
									<input id="led_alu_black_cnt" style="width: 100px;" name="led_alu_black_cnt"
										readonly="readonly" type="hidden" /><br><span id="led_alu_black_cnt_sku"></span>
								</td>
								<td><span id="led_alu_black_cnt_cnthtml"></span>  stk. a <br><span
										id="led_alu_black_cnt_rate"></span> </td>


								<td style="text-align: right;"><span id="led_alu_black_cnt_total"></span> </td>
							</tr>
							<tr>
								<td style="font-weight: 800;">Total</td>
								<td colspan="2" style="text-align: right;font-weight: 800;">
									<div class="" style="display: inline;"><span id="totaltotll2" style=""></span></div>
									EUR <span style="font-weight:400;">inkl.moms</span>
								</td>
							</tr>

						</table>
						<!-- <div class="te-price"> Total  <span id="totaltotll2" ></span> </div> -->
						<style type="text/css">

						</style>
						<div class="button-row">
							<button type="button" id="printpdf">Print/Send beregningen</button>
							<button type="button" id="fuldskaerm">Fuldskærm 3D</button>
							<button type="button" id="nulstil">Nulstil</button>
							<button type="button" id="addtocart" style="display:none;">Tilføj indkøbskurven</button>
						</div>
						<p
							style="text-align: center;margin: 4px 0;opacity: 0.8;font-size: 14px;padding: 0; margin-top:10px;display:inline-block">
							Beregningen er kun vejledende og med forbehold for faktorer der påvirker udfaldet af
							beregningen. Det er på kundens eget ansvar at tjekke beregningen/antal</p>
					</div>

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

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

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

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

				$(".all-data-list-finel").toggle();
			});
		</script>
		<style type="text/css">
			.tbl_custom_data span {
				padding: 0 0;
				font-size: 18px;
			}

			#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;"><select id="profil_color" style="width: 150px;"
						name="profil_color1" onChange="set_colors()">
						<option selected="selected" value="Black">Black</option>
						<option value="Grey">Grey</option>
						<option value="White">White</option>
						<option value="smoked_oak">Oak</option>
						<option value="hardwood">Hardwood</option>
					</select>
					Vælg farve til profil
					<input id="submitBtn1"
						style="background-color: #51ae51; color: #fffdfd; border-radius: 2px; float: right;"
						type="button" value="Opdater beregning">
				</td>
			</tr>
			<tr>
				<td style="padding-left: 20px;"><select style="width: 150px;" name="topprofil_color">
						<option selected="selected" value="Black">Black</option>
					</select>
					Vælg farve til topprofil, stolper og tilbehør</td>
			</tr>
			<tr class="wqs_condition" style="display: none;">
				<td style="padding-left: 20px;"><select id="alu_color" style="width: 150px;" name="alu_color">
						<option value="alu">Alu</option>
						<option selected="selected" value="black">Antrazit/Black</option>
					</select></td>
			</tr>
			<tr class="wqs_condition_2" style="display: none;">
				<td style="padding-left: 20px;"><input id="alu_bundskinne_hidd" name="alu_bundskinne_hidd" type="hidden"
						value="">
					<select id="bundskinne_color" style="width: 150px;" name="bundskinne_color">
						<option value="alu">Alu</option>
						<option selected="selected" value="black">Antrazit/Black</option>
					</select>
				</td>
			</tr>
		</table>
		<div class="tbl_custom_data" style="display:none;">
			<table id="" style="width:100%;" cellspacing="0" cellpadding="5" border="0">
				<thead>
					<tr>
						<th>Beskrivelse</th>
						<th>Antal </th>
						<th>Varenr.</th>
						<th>Pris pr. stk. </th>
						<th>Total</th>
					</tr>
				</thead>
				<tbody>
					<!--  <tr style="display: none;">
			<td data-label="Beskrivelse">Højde</td>
			<td data-label="Antal"><input id="length1" style="width: 100px;" name="length1" readonly="readonly" type="number" /></td>
			<td data-label="Varenr."><span id="length1_sku"></span></td>
			<td data-label="Pris pr. stk."><span id="length1_rate"></span> EUR</td>
			<td data-label="Total"><span id="length1_total"></span> EUR</td>
		  </tr>
		  <tr style="display: none;">
			<td data-label="Beskrivelse">Længde</td>
			<td data-label="Antal"><input id="width1" style="width: 100px;" name="width1" readonly="readonly" type="number" /></td>
			<td data-label="Varenr."><span id="width1_sku"></span></td>
			<td data-label="Pris pr. stk."><span id="width1_rate"></span> EUR</td>
			<td data-label="Total"><span id="width1_total"></span> EUR</td>
		  </tr>
		  <tr class="fence1" style="display:none;">
			<td data-label="Beskrivelse">Profil
			  <input id="fence1" style="width: 100px;" name="fence1" readonly="readonly" type="hidden" /></td>
			<td data-label="Antal"><span id="fencehtml"></span> stk. a <span id="gettotal"></span> 
			  <script>
				  function printtotal(){
					  document.getElementById( 'gettotal' ).innerHTML = document.getElementById( 'fencetype1' ).value;}

			  </script></td>
			<td data-label="Varenr." ><span id="fence1_sku"></span></td>
			<td data-label="Pris pr. stk."><span id="fence1_rate"></span> DDK</td>
			<td data-label="Total"><span id="fence1_total"></span> EUR</td>
		  </tr>
		  <tr class="fence2" style="display:none;">
			<td data-label="Beskrivelse">Profil
			  <input id="fence12" style="width: 100px;" name="fence12" readonly="readonly" type="hidden" /></td>
			<td data-label="Antall"><span id="fencehtml2"></span> stk. a <span id="gettotal"></span> 
			  <script>
				  function printtotal(){
					  document.getElementById( 'gettotal' ).innerHTML = document.getElementById( 'fencetype1' ).value;}

			  </script></td>
			<td data-label="Varenr." ><span id="fence12_sku"></span></td>
			<td data-label="Pris pr. stk."><span id="fence12_rate"></span> DDK</td>
			<td data-label="Total"><span id="fence12_total"></span> EUR</td>
		  </tr>
		  
		  
		  <tr class="door_product_wrap" style="display:none;">
			<td data-label="Beskrivelse">Profil
			  <input id="door_product" style="width: 100px;" name="door_product" readonly="readonly" type="hidden" /></td>
			<td data-label="Antall"><span id="door_product_html"></span> stk. a <span id="gettotal"></span> 
			  </td>
			<td data-label="Varenr." ><span id="door_product_sku"></span></td>
			<td data-label="Pris pr. stk."><span id="door_product_rate"></span> DDK</td>
			<td data-label="Total"><span id="door_product_total"></span> EUR</td>
		  </tr>
		  <tr class="door_product2_wrap" style="display:none;">
			<td data-label="Beskrivelse">Profil
			  <input id="door_product2" style="width: 100px;" name="door_product2" readonly="readonly" type="hidden" /></td>
			<td data-label="Antall"><span id="door_product2_html"></span> stk. a <span id="gettotal"></span> 
			  </td>
			<td data-label="Varenr." ><span id="door_product2_sku"></span></td>
			<td data-label="Pris pr. stk."><span id="door_product2_rate"></span> DDK</td>
			<td data-label="Total"><span id="door_product2_total"></span> EUR</td>
		  </tr>
		  <tr>
			<td data-label="Beskrivelse">Topprofil</td>
			<td data-label="Antal"><input id="top1" style="width: 100px;" name="top1" readonly="readonly" type="text" />
			  stk. a <span id="gettopprofile"></span> 
			  <script>
				function topprofile(){
					document.getElementById( 'gettopprofile' ).innerHTML = document.getElementById( 'topprofiletype1' ).value.replace('mm',' mm');}

			</script></td>
			<td data-label="Varenr."><span id="top1_sku"></span></td>
			<td data-label="Pris pr. stk."><span id="top1_rate"></span> EUR</td>
			<td data-label="Total"><span id="top1_total"></span> EUR</td>
		  </tr>
		  <tr>
			<td data-label="Beskrivelse">Start/Slut Stolper</td>
			<td data-label="Antal"><input id="slutstolpe1" style="width: 100px;" name="slutstolpe1" readonly="readonly" type="text" />
			  stk. a <span id="getk200"></span></td>
			<td data-label="Varenr."><span id="slutstolpe1_sku"></span></td>
			<td data-label="Pris pr. stk."><span id="slutstolpe1_rate"></span> EUR</td>
			<td data-label="Total"><span id="slutstolpe1_total"></span> EUR</td>
		  </tr>
		  <tr>
			<td data-label="Beskrivelse">Kirkedal Stolper</td>
			<td data-label="Antal"><input id="post1" style="width: 100px;" name="post1" readonly="readonly" type="text" />
			  stk. a <span id="getk201"></span></td>
			<td data-label="Varenr."><span id="post1_sku"></span></td>
			<td data-label="Pris pr. stk."><span id="post1_rate"></span> EUR</td>
			<td data-label="Total"><span id="post1_total"></span> EUR</td>
		  </tr>
		  <tr>
			<td data-label="Beskrivelse">Stolpe 90°</td>
			<td data-label="Antal"><input id="stolpe1" style="width: 100px;" name="stolpe1" readonly="readonly" type="text" />
			  stk. a <span id="getk202"></span></td>
			<td data-label="Varenr."><span id="stolpe1_sku"></span></td>
			<td data-label="Pris pr. stk."><span id="stolpe1_rate"></span> EUR</td>
			<td data-label="Total"><span id="stolpe1_total"></span> EUR</td>
		  </tr>
		  <tr>
			<td data-label="Beskrivelse">Stolpe 45°</td>
			<td data-label="Antal"><input id="stolpe2" style="width: 100px;" name="stolpe2" readonly="readonly" type="text" />
			  stk. a K14 </td>
			<td data-label="Varenr."><span id="stolpe2_sku"></span></td>
			<td data-label="Pris pr. stk."><span id="stolpe2_rate"></span> EUR</td>
			<td data-label="Total"><span id="stolpe2_total"></span> EUR</td>
		  </tr>
		  <tr>
			<td data-label="Beskrivelse">Alu Design stolpe
			  <input id="alu_design_stlope" style="width: 100px;" name="alu_design_stlope" readonly="readonly" type="hidden" value="" /></td>
			<td data-label="Antal" ><span id="alu_design_stlopehtml"></span>  stk. a K100</td>
			<td data-label="Varenr."><span id="alu_design_stlope_sku"></span></td>
			<td data-label="Pris pr. stk."><span id="alu_design_stlope_rate"></span> DDK</td>
			<td data-label="Total"><span id="alu_design_stlope_total"></span> EUR</td>
		  </tr>
		  <tr>
			<td data-label="Beskrivelse">Alu Design Stolpefod
			  <input id="alu_design_stolpefod" style="width: 100px;" name="alu_design_stolpefod" readonly="readonly" type="hidden" /></td>
			<td data-label="Antal"><span id="alu_design_stolpefodhtml"></span>  stk. a 120x80x60 mm </td>
			<td data-label="Varenr."><span id="alu_design_stolpefod_sku"></span></td>
			<td data-label="Pris pr. stk."><span id="alu_design_stolpefod_rate"></span> EUR</td>
			<td data-label="Total"><span id="alu_design_stolpefod_total"></span> EUR</td>
		  </tr>
		  <tr>
			<td data-label="Beskrivelse">Stolpetykkelse
			  <input id="postsizetype1" style="width: 100px;" name="postsizetype1" readonly="readonly" type="hidden" /></td>
			<td data-label="Antal"><span id="postsizetype1html"></span> x</td>
			<td data-label="Varenr."><span id="postsizetype1_sku"></span></td>
			<td data-label="Pris pr. stk."><span id="postsizetype1_rate"></span> DDK</td>
			<td data-label="Total"><span id="postsizetype1_total"></span> EUR</td>
		  </tr>
		  <tr id="alu_hide_topskruer1">
			<td data-label="Beskrivelse">Skruer</td>
			<td data-label="Antal"><input id="topskruer1" style="width: 100px;" name="topskruer1" readonly="readonly" type="text" />
			  poser a K8 5,0x60 mm </td>
			<td data-label="Varenr."><span id="topskruer1_sku"></span></td>
			<td data-label="Pris pr. stk."><span id="topskruer1_rate"></span> EUR</td>
			<td data-label="Total"><span id="topskruer1_total"></span> EUR</td>
		  </tr>
		  <tr id="alu_hide_skruer1">
			<td data-label="Beskrivelse">Skruer</td>
			<td data-label="Antal"><input id="skruer1" style="width: 100px;" name="skruer1" readonly="readonly" type="text" />
			  poser a K8 5,0x45 mm </td>
			<td data-label="Varenr."><span id="skruer1_sku"></span></td>
			<td data-label="Pris pr. stk."><span id="skruer1_rate"></span> EUR</td>
			<td data-label="Total"><span id="skruer1_total"></span> EUR</td>
		  </tr>
		  <tr id="alu_hide_endekap1">
			<td data-label="Beskrivelse">Endekap</td>
			<td data-label="Antal"><input id="endekap1" style="width: 100px;" name="endekap1" readonly="readonly" type="text" />
			  stk. a K9/K10<span id="getendekaptype"></span> 
			  </td>
			<td data-label="Varenr."><span id="endekap1_sku"></span></td>
			<td data-label="Pris pr. stk."><span id="endekap1_rate"></span> EUR</td>
			<td data-label="Total"><span id="endekap1_total"></span> EUR</td>
		  </tr>
		  <tr class="wqs_condition_2" style="display: none;">
			<td data-label="Beskrivelse">Top/bundskinne
			  <input id="alu_bundskinne" style="width: 100px;" name="alu_bundskinne" readonly="readonly" type="hidden" value="" /></td>
			<td data-label="Antal" ><span id="alu_bundskinnehtml"></span>  pakker med sæt a 2 stk.</td>
			<td data-label="Varenr."><span id="alu_bundskinne_sku"></span></td>
			<td data-label="Pris pr. stk."><span id="alu_bundskinne_rate"></span> DDK</td>
			<td data-label="Total"><span id="alu_bundskinne_total"></span> EUR</td>
		  </tr>
		  <tr class="wqs_condition_2" style="display: none;">
			<td data-label="Beskrivelse">Montageklæb
			  <input id="alu_montageklaeb" style="width: 100px;" name="alu_montageklaeb" readonly="readonly" type="hidden" value="" /></td>
			<td data-label="Antal"><span id="alu_montageklaebhtml"></span>  stk.
			  <input id="alu_montageklaeb_hidd" name="alu_montageklaeb_hidd" type="hidden" value="" /></td>
			<td data-label="Varenr."><span id="alu_montageklaeb_sku"></span></td>
			<td data-label="Pris pr. stk."><span id="alu_montageklaeb_rate"></span> DDK</td>
			<td data-label="Total"><span id="alu_montageklaeb_total"></span> EUR</td>
		  </tr>
		  <tr id="alu_hide_topklods1">
			<td data-label="Beskrivelse">Topklods</td>
			<td data-label="Antal"><input id="topklods1" style="width: 100px;" name="topklods1" readonly="readonly" type="text" />
			  stk. a K11 </td>
			<td data-label="Varenr."><span id="topklods1_sku"></span></td>
			<td data-label="Pris pr. stk."><span id="topklods1_rate"></span> EUR</td>
			<td data-label="Total"><span id="topklods1_total"></span> EUR</td>
		  </tr>
		  <tr >
			<td data-label="Beskrivelse">Power Supply</td>
			<td data-label="Antal"><input id="power1" style="width: 100px;" name="power1" readonly="readonly" type="text" />
			  stk. a K12 </td>
			<td data-label="Varenr."><span id="power1_sku"></span></td>
			<td data-label="Pris pr. stk."><span id="power1_rate"></span> EUR</td>
			<td data-label="Total"><span id="power1_total"></span> EUR</td>
		  </tr>
		  <tr >
			<td data-label="Beskrivelse">LED</td>
			<td data-label="Antal"><input id="led1" style="width: 100px;" name="led1" readonly="readonly" type="text" />
			  stk. a K13 </td>
			<td data-label="Varenr."><span id="led1_sku"></span></td>
			<td data-label="Pris pr. stk."><span id="led1_rate"></span> EUR</td>
			<td data-label="Total"><span id="led1_total"></span> EUR</td>
		  </tr>
		  <tr id="acc1_cntt" style="display:none;">
			<td data-label="Beskrivelse">Imprægnering 1L
			  <input id="acc1_cnt" style="width: 100px;" name="acc1_cnt" readonly="readonly" type="hidden" /></td>
			<td  data-label="Antal"><span id="acc1_cnttt"></span>  stk. a 1L </td>
			<td data-label="Varenr."><span id="acc1_cnt_sku"></span></td>
			<td data-label="Pris pr. stk."><span id="acc1_cnt_rate"></span> EUR</td>
			<td data-label="Total"><span id="acc1_cnt_total"></span> EUR</td>
		  </tr>
		  <tr>
			<td data-label="Beskrivelse">Rens 750ml
			  <input id="acc3_cnt" style="width: 100px;" name="acc3_cnt" readonly="readonly" type="hidden" /></td>
			<td data-label="Antal"><span id="acc3_cnthtml"></span>  stk. a 750 ml</td>
			<td data-label="Varenr."><span id="acc3_cnt_sku"></span></td>
			<td data-label="Pris pr. stk."><span id="acc3_cnt_rate"></span>EUR</td>
			<td data-label="Total"><span id="acc3_cnt_total"></span> EUR</td>
		  </tr>-->

					<!-- <tr>
		  <td data-label="Beskrivelse">Profil</td>
		  <td data-label="Antal">132 stk. a K1</td>
		  <th data-label="Varenr."> 1826497</th>
		  <td data-label="Pris pr. stk."> 123,95 DDK</td>
		  <td data-label="Total">16.757,40 EUR</td>
		</tr>-->
					<script>
						function endekaptype() {
							//document.getElementById( 'getendekaptype' ).innerHTML = document.getElementById('endekaptype1' ).value;
						}

					</script>
					<tr>
						<td style="text-align: left;">Total</td>
						<td colspan="4" style="text-align: right;"><input id="total" style="width: 120px;" name="total"
								readonly="readonly" type="hidden">
							<span id="totaltotll"></span> EUR 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>
			<form id="pdf_print_form" action="/beregner_pdf/pdf/hegn.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>
				<input type="hidden" name="datablade_img1" id="datablade_img1" value="">
				<input type="hidden" name="datablade_link1" id="datablade_link1" value="">
				<input type="hidden" name="pdfemail" id="pdfemail" value="">
				<input type="hidden" name="pdfphone" id="pdfphone" value="">
				<input type="hidden" name="pdfagree" id="pdfagree" value="">
				<input id="wqs_alu_pro" name="wqs_alu_pro" type="hidden" value="" />
				<input id="wqs_alu_pro_col" name="wqs_alu_pro_col" type="hidden" value="" />
				<input id="wqs_alu_pro_col_count" name="wqs_alu_pro_col_count" type="hidden" value="" />
				<input id="wqs_alu_pro_top" name="wqs_alu_pro_top" type="hidden" value="" />
				<input id="wqs_bundskinne_color" name="wqs_bundskinne_color" type="hidden" value="" />
				<input id="pdfhojde" name="pdfhojde" type="hidden" value="" />
				<input id="pdflangde" name="pdflangde" type="hidden" value="" />
				<input id="pdfprofil" name="pdfprofil" type="hidden" value="" />
				<input id="pdftopprofil" name="pdftopprofil" type="hidden" value="" />
				<input id="pdfstartslut" name="pdfstartslut" type="hidden" value="" />
				<input id="pdfkirkedalstolpe" name="pdfkirkedalstolpe" type="hidden" value="" />
				<input id="pdfhjornestolpe" name="pdfhjornestolpe" type="hidden" value="" />
				<input id="pdfk14stolpe" name="pdfk14stolpe" type="hidden" value="" />
				<input id="pdfstolpetykkelse" name="pdfstolpetykkelse" type="hidden" value="" />
				<input id="pdfskruer" name="pdfskruer" type="hidden" value="" />
				<input id="pdfskrue1" name="pdfskrue1" type="hidden" value="" />
				<input id="pdfendekap" name="pdfendekap" type="hidden" value="" />
				<input id="pdftopklods" name="pdftopklods" type="hidden" value="" />
				<input id="pdfpowersupply" name="pdfpowersupply" type="hidden" value="" />
				<input id="pdfled" name="pdfled" type="hidden" value="" />
				<input id="pdffarve" name="pdffarve" type="hidden" value="" />
				<input id="pdftotal" name="pdftotal" type="hidden" value="" />
				<input id="pdftypeprofil" name="pdftypeprofil" type="hidden" value="" />
				<input id="pdftypetopprofile" name="pdftypetopprofile" type="hidden" value="" />
				<input id="pdftypepostsize" name="pdftypepostsize" type="hidden" value="" />
				<input id="pdftypeendekaptype" name="pdftypeendekaptype" type="hidden" value="K9/K10" />
				<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_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_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="blackaluedoor_id" id="blackaluedoor_id" value="" />
				<input type="hidden" name="blackblackedoor_id" id="blackblackedoor_id" value="" />
				<input type="hidden" name="blackaluedoor_stock" id="blackaluedoor_stock" value="" />
				<input type="hidden" name="blackblackedoor_stock" id="blackblackedoor_stock" value="" />
				<input type="hidden" name="grayaludoor_id" id="grayaludoor_id" value="" />
				<input type="hidden" name="greyblackdoor_id" id="greyblackdoor_id" value="" />
				<input type="hidden" name="grayaludoor_stock" id="grayaludoor_stock" value="" />
				<input type="hidden" name="greyblackdoor_stock" id="greyblackdoor_stock" value="" />
				<input id="pdf_topklods_color" name="pdf_topklods_color" type="hidden" value="" />
				<input type="hidden" name="pdf_product_id" id="pdf_product_id" value="" />
				<input type="hidden" name="pdf_topprofil_id" id="pdf_topprofil_id" value="" />
																<input type="hidden" name="pdf_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_aluled_id" id="pdf_aluled_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_aluStolpefod" id="pdf_aluStolpefod" value="" />
				<input type="hidden" name="pdf_k200_id" id="pdf_k200_id" value="" />
				<input type="hidden" name="pdf_k201_id" id="pdf_k201_id" value="" />
				<input type="hidden" name="pdf_k202_id" id="pdf_k202_id" value="" />
				<input type="hidden" name="pdf_alu_design_stlope_sku" id="pdf_alu_design_stlope_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_alu_bundskinne_sku" id="pdf_alu_bundskinne_sku" 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="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">
								<canvas class="renderCanvas" id="renderCanvas" touch-action="none"
									style=" width: 100% !important;"></canvas>
								<!-- <img src="https://kirkedal.de/wp-content/uploads/2021/07/show-3d.jpg" alt="" title="">  -->

							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="col-4 ">
				<div class="ccb-list">
					<div class="ccb-list-box">
						<h2>DIT VALG</h2>
						<ul>
							<li class="active-list"><span>1. Serie / Alu Hegn</span> <img
									src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
							<li class="active-list sidebar_calc_box1"><span>2. Vælg form</span> <img
									src="https://kirkedal.de/wp-content/images/form3.jpg" alt="" title=""></li>

							<li class="active-list sidebar_calc_box2"><span>3. Dimensioner</span> <img
									src="https://kirkedal.de/wp-content/uploads/2021/07/cal.png" alt="" title=""></li>
							<li class="active-list sidebar_stolpe_mal"><span>4. Stolpe mål</span> <img src="" alt=""
									title=""></li>
							<li class="active-list sidebar_calc_box3"><span>5. Vælg profil</span> <img
									src="https://kirkedal.de/wp-content/uploads/2021/07/vaelg-profil-1.jpg" alt=""
									title=""></li>
							<li class="active-list sidebar_calc_box4"><span>6. Vælg stolper</span> <img
									src="https://kirkedal.de/wp-content/uploads/2021/07/vaelg-stolpestorrelse2.jpg"
									alt="" title=""></li>
							<li class="active-list sidebar_calc_box5"><span>7. Vælg Top/bundskinne</span> <img
									src="https://kirkedal.de/wp-content/uploads/2021/07/vaelg-topprofil.jpg" alt=""
									title=""></li>
							<li class="active-list sidebar_calc_box6"><span>8. Vælg tilbehør</span> <img
									src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
						</ul>
					</div>
					<div class="total-row">
						<div class="te-price"> Total <br><span id="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-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 / Alu Hegn</span> <img
									src="https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg" alt=""
									title=""></li>
						</ul>
						<div class="serie-alu-hegn">
							<div class="serie-img"> <img
									src="https://kirkedal.de/wp-content/uploads/2021/07/serie-1.jpg" alt="" title="">
							</div>
							<div class="serie-img"> <img
									src="https://kirkedal.de/wp-content/uploads/2021/07/serie-2.jpg" alt="" title="">
							</div>
							<div class="serie-img"> <img
									src="https://kirkedal.de/wp-content/uploads/2021/07/serie-3.jpg" alt="" title="">
							</div>
							<div class="serie-img"> <img
									src="https://kirkedal.de/wp-content/uploads/2021/07/serie-4.jpg" alt="" title="">
							</div>
						</div>
					</div>
					<div class="total-row">
						<div class="te-price"> Total <span>26.244,60</span> </div>
						<div class="button-row">
							<button>Print/Send beregningen</button>
							<button style="display:none;">Tilføj indkøbskurven</button>
						</div>
					</div>
				</div>
			</div>
			<div class="col-8">
				<div class="ccb-text">
					<div class="ccb-text-box">
						<div class="show-3d">
							<!--<h3>3D show</h3>-->
							<div class="show-3d-box"> <img
									src="https://kirkedal.de/wp-content/uploads/2021/07/show-3d.jpg" alt="" title="">
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="tbl_custom_data">
			<table id="" style="width:100%;" cellspacing="0" cellpadding="5" border="0">
				<thead>
					<tr>
						<th>Beskrivelse</th>
						<th>Antal </th>
						<th>Varenr.</th>
						<th>Pris pr. stk. </th>
						<th>Total</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td data-label="Beskrivelse">Profil</td>
						<td data-label="Antal">132 stk. a K1</td>
						<th data-label="Varenr."> 1826497</th>
						<td data-label="Pris pr. stk."> 123,95 DDK</td>
						<td data-label="Total">16.757,40 EUR</td>
					</tr>
					<tr>
						<td data-label="Beskrivelse">Profil</td>
						<td data-label="Antal">132 stk. a K1</td>
						<th data-label="Varenr."> 1826497</th>
						<td data-label="Pris pr. stk."> 123,95 DDK</td>
						<td data-label="Total">16.757,40 EUR</td>
					</tr>
					<tr>
						<td data-label="Beskrivelse">Profil</td>
						<td data-label="Antal">132 stk. a K1</td>
						<th data-label="Varenr."> 1826497</th>
						<td data-label="Pris pr. stk."> 123,95 DDK</td>
						<td data-label="Total">16.757,40 EUR</td>
					</tr>
					<tr>
						<td data-label="Beskrivelse">Profil</td>
						<td data-label="Antal">132 stk. a K1</td>
						<th data-label="Varenr."> 1826497</th>
						<td data-label="Pris pr. stk."> 123,95 DDK</td>
						<td data-label="Total">16.757,40 EUR</td>
					</tr>
					<tr>
						<td data-label="Beskrivelse">Profil</td>
						<td data-label="Antal">132 stk. a K1</td>
						<th data-label="Varenr."> 1826497</th>
						<td data-label="Pris pr. stk."> 123,95 DDK</td>
						<td data-label="Total">16.757,40 EUR</td>
					</tr>
					<tr>
						<td data-label="Beskrivelse">Profil</td>
						<td data-label="Antal">132 stk. a K1</td>
						<th data-label="Varenr."> 1826497</th>
						<td data-label="Pris pr. stk."></td>
						<td data-label="Total">16.757,40 EUR</td>
					</tr>
					<tr>
						<td data-label="Beskrivelse">Profil</td>
						<td data-label="Antal">132 stk. a K1</td>
						<th data-label="Varenr."> 1826497</th>
						<td data-label="Pris pr. stk."> 123,95 DDK</td>
						<td data-label="Total">16.757,40 EUR</td>
					</tr>
					<tr>
						<td style="text-align: left;">Total</td>
						<td colspan="4" style="text-align: right;"><span>26.244,60</span> EUR 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>
	var row = '';
	var row_length = '';
	var row_height = '';
	var row_url_1 = '';
	var row_url_2 = '';
	var row_url_3 = '';
	var row_url_4 = '';
	var row_set = 0;
	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(document).ready(function () {

		jQuery('.active-list-home').click(function () {
			window.location.href = 'https://kirkedal.de/de/beregn-materialeforbrug/';
		});
		jQuery("#printpdf").click(function (e) {
			// alert(1);
			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(1);
			jQuery("#printsubmit").trigger("click");
		});
		jQuery('#printpdff').click(function () {
			jQuery("#printsubmit").trigger("click");
		});
		jQuery("#addtocart").click(function () {
			jQuery("#addtocartbutton").trigger("click");
		});


		jQuery(".btn_nexttrigger").click(function () {
			data_val = 0;
			$(".inputval_vld").each(function (index) {
				data_val_val = $(this).val();

				if (data_val_val <= 1.8) {
					data_val = 1;
				} else {
					data_val = 0;
					return false;
				}


			});
			if (data_val == 1) {
				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');

			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(".inputval_vld").keyup(function () {
			input_val = jQuery(this).val();

			if (input_val <= 1.8) {
				jQuery(this).parent("div").find("p").remove();

			} else {

				$("<p>Max højde 1,8 mtr</p>").insertAfter(jQuery(this).parent("div").find("span"));


			}

		});

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

			jQuery(".dimensioner-form .activee .form-control").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 (i === 0) {
						form_heights.push(jQuery(this).val().replace(',', '.'));
					}
					else if (i % 2 === 0) {
						form_heights.push(jQuery(this).val().replace(',', '.'))
					}
					else {
						form_lengths.push(jQuery(this).val().replace(',', '.'));
					}

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

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

		   $accordion.accordion("option","active",next);
	   }*/
				i++;
			});


			var heightt_width_strr = new Array();
			var heightt_width_strer = new Array();
			var pdf_hidden_data = '';
			temp = new Array();
			h = form_heights.toString();
			temp = h.split(",");
			lengths = new Array();
			l = form_lengths.toString();
			//console.log(h);
			//console.log(l);
			lengths = l.split(",");
			console.log(lengths[0]);
			side_cnt = 0;
			cuuarray = ['A', 'B', 'C', 'D'];
			jQuery(".sidebar_calc_box2").find('.dimention').html('<ul class="myarraydata" style="padding:0;margin:0;"></ul>');
			jQuery.each(temp, function (key, value) {



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

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

			});

			//	console.log(heightt_width_strr);
			splitheight = heightt_width_strr.toString();
			/*datata = heightt_width_strer.toString();
			datata.replace(",","");
			//datata.replace(",", "");*/

			//heightt_width_strer.split(",");
			console.log(splitheight);
			Vælgform = jQuery(".dimensioner-form .activee .hidPost").val();
			jQuery(".sidebar_calc_box2").find('span').attr("heightt_width_strr", splitheight);
			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('.dimention').html('<ul class="myarraydata" style="padding:0;margin:0;">'+datata.replace(",","")+'</ul>');

			row_length = form_lengths;
			row_height = form_heights;

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

		});


		jQuery('.calculator-box.calculator-stolpe_mal .product_item').click(function () {

			show = jQuery(this).find('.hidPostsize1').attr("show");
			img = jQuery(this).find("img").attr("src");
			jQuery('.active-list.sidebar_stolpe_mal').find("img").attr("src", img);
			if (show == '1') {

				jQuery('.calculator-box.calculator-3 .product_item.hide_item_ki').hide();
				jQuery('.calculator-box.calculator-3 .product_item.show_item_ki').show();
				jQuery('.calculator-6').find(".hide_click_0").show();
			} else {

				jQuery('.calculator-box.calculator-3 .product_item.hide_item_ki').show();
				jQuery('.calculator-box.calculator-3 .product_item.show_item_ki').hide();
				jQuery('.calculator-6').find(".hide_click_0").hide();
			}

			jQuery('.calculator-box.calculator-3').show();
			jQuery('.calculator-box.calculator-stolpe_mal').hide();


		});
		jQuery('.calculator-box.calculator-3 .product_item').click(function () {
			Vælgprofil = jQuery(this).find('img').attr('src');
			hidFence = jQuery(this).find(".hidFence").val();
			hidColor = jQuery(this).find(".hidColor").val();
			console.log(hidFence);
			console.log(hidColor);
			jQuery(".sidebar_calc_box3").find('img').attr('src', Vælgprofil);
			jQuery("#product_img").val(Vælgprofil);
			jQuery(".sidebar_calc_box3").find('img').attr('hidFence', hidFence);
			jQuery(".sidebar_calc_box3").find('img').attr('hidColor', hidColor);
			console.log(hidFence);
			console.log(hidColor);
			if (hidColor == "hardwood" || hidColor == "Smoked_Oak" || hidColor == "coex_light") {
				jQuery(".hRd_smco").hide();
				jQuery(".hRd_smco").find(".chekacc").find('input[type="checkbox"]').prop("checked", false);
			} else {
				jQuery(".hRd_smco").show();
			}
			jQuery('.calculator-box').hide();
			if (hidColor == "coex_light") {
				jQuery('.calculator-box.calculator-4').find(".calculator-contact-box").find(".co_ex").show();
				jQuery('.calculator-box.calculator-4').find(".calculator-contact-box").find(".non_co_ex").hide();

			} else {
				jQuery('.calculator-box.calculator-4').find(".calculator-contact-box").find(".co_ex").hide();
				jQuery('.calculator-box.calculator-4').find(".calculator-contact-box").find(".non_co_ex").show();

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

			postsize_img = jQuery(this).find('img').attr('src');
			colorval = jQuery(this).find('img').attr('color_val');
			hidPostsize1 = jQuery(this).find('input').val();
			jQuery('#postsize').val(hidPostsize1);
			if (hidPostsize1 == "60x60mm") {
				//jQuery("#hidLed").parents("tr").hide();
			} else {
				//jQuery("#hidLed").parents("tr").show();
			}
			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', hidPostsize1);

			//-------------------------
			jQuery('#getk200').text('K5');
			jQuery('#getk201').text('K6');
			jQuery('#getk202').text('K7');

			jQuery('#pdf_k200_id').val('K5');
			jQuery('#pdf_k201_id').val('K6');
			jQuery('#pdf_k202_id').val('K7');
			jQuery('#pdf_k2021_id').val('K10');
			jQuery('#pdf_k2022_id').val('K11');
			//-------------------------
			jQuery('.calculator-box').hide();
			jQuery('.calculator-box.calculator-5').show();
			if (colorval == "alu") {
				jQuery('.calculator-box.calculator-5 .product_item.alu').trigger('click');
			} else {

				jQuery('.calculator-box.calculator-5 .product_item.alu_black').trigger('click');
			}

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

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

			jQuery('.calculator-box').hide();
			jQuery('.calculator-box.calculator-6').show();
			stopcol = jQuery(".sidebar_calc_box4").find('img').attr('color_val');
			hard_smk_val = jQuery(".sidebar_calc_box3").find("img").attr("hidcolor");
			if (hard_smk_val == "hardwood" || hard_smk_val == "Smoked_Oak" || hard_smk_val == "coex_light") {
				jQuery(".hRd_smco").removeClass("active");

				jQuery(".Vælgtilbehor").find("img").attr("acc", "");
				jQuery(".Vælgtilbehor").find("img").attr("src", "");

				jQuery(".sidebar_calc_box6").find("img").attr("acc", "");
				jQuery(".sidebar_calc_box6").find("img").attr("accs", "");
				jQuery(".sidebar_calc_box6").find("img").attr("src", "");
			} else {
				if (stopcol == "black") {
					//  jQuery(".calculator-box.calculator-6 .product_item").find('#led_alu').parent('div').parent('div').css('display', 'none').removeClass("active");
					jQuery(".calculator-box.calculator-6 .product_item").find('#led_alu_black').parent('div').parent('div').css('display', 'block').removeClass("active");
					jQuery(".Vælgtilbehor").find('img').attr("src", "https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg").attr("acc", "").css('display', 'none');
					jQuery(".active-list.sidebar_calc_box6").find('img').attr("src", "https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg").attr("accs", "");

				} else {
					// jQuery(".calculator-box.calculator-6 .product_item").find('#led_alu').parent('div').parent('div').css('display', 'block').removeClass("active");
					jQuery(".calculator-box.calculator-6 .product_item").find('#led_alu_black').parent('div').parent('div').css('display', 'none').removeClass("active");
					jQuery(".Vælgtilbehor").find('img').attr("src", "https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg").attr("acc", "").css('display', 'none');
					jQuery(".active-list.sidebar_calc_box6").find('img').attr("src", "https://kirkedal.de/wp-content/uploads/2020/12/Web_DSC_4795.jpg").attr("accs", "");
				}
			}

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




			accessories = jQuery(this).find('img').attr('src');
			magicradio = jQuery(".magic-radio").val()
			acc = jQuery(this).find('img').attr('dataid');
			acckey = jQuery(this).find('img').attr('datakey');

			var cuurect_selected_val = jQuery(this).find('input[type="hidden"]').val();

			/*if(cuurect_selected_val == 'led_alu_black'){
				jQuery('.calculator-box.calculator-6 .product_item').find('input[value="led_alu"]').parent().removeClass("active");
				jQuery('.calculator-box.calculator-6 .product_item').find('input[value="led_alu"]').parent().css('border', '1px solid #f4f4f4');
			}
			if(cuurect_selected_val == 'led_alu'){
				jQuery('.calculator-box.calculator-6 .product_item').find('input[value="led_alu_black"]').parent().removeClass("active");
				jQuery('.calculator-box.calculator-6 .product_item').find('input[value="led_alu_black"]').parent().css('border', '1px solid #f4f4f4');
			}*/

			if ($(this).hasClass("active")) {
				$(this).removeClass("active");
				// jQuery(this).css('border', '1px solid #e1e1e1');
				jQuery(this).css('border', '1px solid #f4f4f4');
				accs[acckey] = '';
				jQuery(this).find('input[type="checkbox"]').prop("checked", false);
			}

			else {
				$(this).removeClass("active");
				$(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_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(".sidebar_calc_box6").find('img').attr('accs', JSON.stringify(accs));

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

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

		jQuery(".btn_beregn").click(function () {

			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;
			jQuery(".sidebar_calc_box1").find('img').attr('src');
			form_heights = jQuery(".sidebar_calc_box2").find('span').attr('form_heights');
			form_lengths = jQuery(".sidebar_calc_box2").find('span').attr('form_lengths');
			vælgform = jQuery(".sidebar_calc_box2").find('span').attr('vælgform');
			hidfence = jQuery(".sidebar_calc_box3").find('img').attr('hidfence');
			hidcolor = jQuery(".sidebar_calc_box3").find('img').attr('hidcolor');
			color_val = jQuery(".sidebar_calc_box4").find('img').attr('color_val');
			hidpostsize = jQuery(".sidebar_calc_box4").find('img').attr('hidpostsize');
			hidtop = jQuery(".sidebar_calc_box5").find('img').attr('hidtop');
			//led = jQuery(".Vælgtilbehor").find('img').attr('led');

			acc = jQuery(".Vælgtilbehor").find('img').attr('acc');
			led = '';
			if (jQuery('.calculator-6 .product_item.active').length > 0) {
				jQuery('.calculator-6 .product_item.active').each(function () {
					if (jQuery(this).find('input[type="hidden"]').length > 0) {
						var val_acc = jQuery(this).find('input[type="hidden"]').val();
						// if(val_acc == 'led_alu' ){
						// 	led='LED Alu';
						// }
						// else 
						if (val_acc == 'led_alu_black') {
							led = 'LED Alu Black';
						}
						// else if(val_acc == 'led_lys')
						// {
						// 	led='LED Lys';
						// }
						else {
							if (acc == '') {
								acc = val_acc;
							} else {
								acc = acc + ',' + val_acc;
							}

						}
					}
				});
			} else {
				acc = '';
			}

			var len = form_lengths;
			var heights = form_heights;
			var w = form_heights;
			var mod = Vælgform;
			var tmod = jQuery('input#topmodel').val();
			var pst = Vælgform;
			var Vælgprofil = Vælgprofil;
			//var Vælgfarve=jQuery('input#hidColor').val();
			var Vælgfarve = 'Black';
			var wqs_jprofil_color = 'Black';
			var wqs_jalupro_color = 'Black';
			var wqs_jbundskinne_color = 'black';
			var Vælgform = jQuery('input#post').val();
			var Vælgtopprofil = hidtop;
			var Vælgstolpe = hidpostsize;
			var Vælgstolpe1 = pointCounter;
			var Vælgendekap = jQuery('input#endekap').val();
			var length = form_lengths;
			var width = form_heights;
			width = form_heights;
			/* var acc1stock = jQuery(".stokdiv input").val();
			 var acc3stock = jQuery(".stokdiv .stocaccacc3").val();*/
			var stockarray = jQuery(".sidebar_calc_box6").find('img').attr('accs');
			var led = led;
			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 fencetype = jQuery("#fencetype").val();
			// var accessories =acc;

			var accessories = [];
			// if (jQuery("#Acc1").is(":checked")) accessories.push("acc1");
			if (jQuery("#Acc1").parent('.product_item').hasClass('active')) { accessories.push("Acc1"); }
			//if (jQuery("#Acc2").is(":checked")) accessories.push("acc2");
			if (jQuery("#Acc3").parent('.product_item').hasClass('active')) { accessories.push("Acc3"); }
			//if (jQuery("#Acc3").is(":checked")) accessories.push("acc3");
			if (jQuery("#Alu_led_80x80").parent('.product_item').hasClass('active')) { accessories.push("Alu_led_80x80"); }
			//if (jQuery("#Acc4").is(":checked")) accessories.push("acc4");
			// if (jQuery("input#led_alu").parent('.product_item').hasClass('active')){ accessories.push("led_alu");}
			//if (jQuery("#Acc5").is(":checked")) accessories.push("acc5");
			if (jQuery("input#led_alu_black").parent('.product_item').hasClass('active')) { accessories.push("led_alu_black"); }
			// if (jQuery("input#led_lys").parent('.product_item').hasClass('active')){ accessories.push("led_lys");}

			console.log(accessories);


			/*var acc11CNT = jQuery("#Acc11CNT").val();
			if(acc11CNT > 0){
			  accessories.push("acc11");
			}*/
			/*  if (jQuery("#Acc1s").is(":checked")) accessories.push("acc1");
			if (jQuery("#Acc3s").is(":checked")) accessories.push("Acc3");
			if (jQuery("#Alu_led_80x80s").is(":checked")) accessories.push("Alu_led_80x80");
			if (jQuery("#T_clips_til_bort_40x50s").is(":checked")) accessories.push("T_clips_til_bort_40x50");
			if (jQuery("#Acc5").is(":checked")) accessories.push("acc5");
*/
			;
			/*for datablade image and link*/
			if (Vælgstolpe == "100x100mm") {

				jQuery("#datablade_link").attr('href', 'https://kirkedal.de/wp-content/uploads/2018/05/TreeTops_Kirkedal-Datablad-KOMPOSIT-HEGN.pdf');
				jQuery("#datablade_img").attr('src', 'https://kirkedal.de/wp-content/uploads/2016/08/Kirkedal_Komposit_Hegn.png');
				jQuery("#datablade_img1").val('https://kirkedal.de/wp-content/uploads/2016/08/Kirkedal_Komposit_Hegn.png');
				jQuery("#datablade_link1").val('https://kirkedal.de/wp-content/uploads/2018/05/TreeTops_Kirkedal-Datablad-KOMPOSIT-HEGN.pdf');

			} else {
				jQuery("#datablade_link").attr('href', 'https://kirkedal.de/wp-content/uploads/2018/04/TreeTops_Kirkedal-Datablad-ALU-DESIGN.pdf');
				jQuery("#datablade_img").attr('src', 'https://kirkedal.de/wp-content/uploads/2016/08/Produktinfo_ALU.png');
				jQuery("#datablade_img1").val('https://kirkedal.de/wp-content/uploads/2016/08/Produktinfo_ALU.png');
				jQuery("#datablade_link1").val('https://kirkedal.de/wp-content/uploads/2018/04/TreeTops_Kirkedal-Datablad-ALU-DESIGN.pdf');
			}
			/**/
			//for alu led
			if (jQuery("#Alu_led_80x80").is(":checked")) accessories.push("alu_led_80x80");

			var lengths = [];
			jQuery(".active [id*=length_]").each(function () {
				lengths.push(jQuery(this).val());
			});

			var heights = [];
			jQuery(".active [id*=height_]").each(function () {
				heights.push(jQuery(this).val());
			});


			var height_width_str = '';
			var pdf_hidden_data = '';
			var sideindex = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'N', 'O'];
			var side_cnt = 0;

			temp = new Array();
			temp = form_heights.split(",");
			lengths = new Array();
			lengths = form_lengths.split(",");
			jQuery.each(temp, function (key, value) {

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

			//jQuery('.hidden_pdf_data').html(pdf_hidden_data);
			//jQuery('.height_with_info').html(height_width_str);
			wqs_jalupro_color = 'black';
			wqs_jbundskinne_color = 'black';
			width = form_lengths;
			switchmap = 'true';
			points_cnt = 0;

			//console.log(stockarray);
			var dataString = '&stolpestorrelse_color=' + color_val + '&wqs_jprofil_color=' + hidcolor + '&wqs_jalupro_color=' + wqs_jalupro_color + '&wqs_jbundskinne_color=' + wqs_jbundskinne_color + '&width=' + width + '&Vælgprofil=' + hidfence + '&Vælgfarve=' + hidcolor + '&Vælgform=' + vælgform + '&led=' + led + '&Vælgtopprofil=' + Vælgtopprofil + '&Vælgstolpe=' + hidpostsize + '&Vælgendekap=' + Vælgendekap + '&switchMap=' + switchmap + '&map_length=' + map_length + "&corners_cnt=" + corners_cnt + "&points_cnt=" + points_cnt + "&lengths=" + form_lengths + "&heights=" + form_heights + "&form_lengths=" + form_lengths + "&form_heights=" + form_heights + "&fenceheightcount=" + fencetype + "&stockaccessories=" + stockarray;
			dataString += "&accessories=" + accessories;
			console.log(dataString);
			jQuery(".ajax_loader_wrap").addClass('active');
			jQuery.ajax({

				type: "POST",
				dataType: 'json',
				// url:"/wp-content/calculation.php",
				url: "/wp-content/calculation_new.php",
				data: dataString,
				success: function (msg) {

					//console.log(msg);
					//console.log(msg[20]);
					jQuery(".ajax_loader_wrap").removeClass('active');
					//var $accordion = jQuery("#accordion").accordion();
					//var current = $accordion.accordion("option", "active"),
					//  maximum = $accordion.find("h3").length,
					// next = current + 1 === maximum ? 0 : current + 1;

					//$accordion.accordion("option", "active", next);

					for (var inc = 0; inc < 34; inc++) {

						if (msg[inc] < 0 && inc != 33) {
							msg[inc] = 0;
						}
					}
					//console.log(msg[18]);
					jQuery('#length1').val(msg[0]);
					jQuery('#width1').val(msg[1]);
					//alert(msg[16]);
					setTimeout(function () {

						if (msg[14] == 'Hardwood') {
							jQuery('#pdf_product_id').val('2166');
						}
						if (msg[14] == 'Smoked Oak') {
							jQuery('#pdf_product_id').val('2162');
						}
						if (msg[16] == 'coex_light') {
							jQuery("#gettotal1").html('Black - Light');
							jQuery('#pdf_product_id').val('2307');
						}
					}, 3000);

					//if(msg[14] =='K10'){
					//		jQuery('#Hardwood').val(msg[2]);
					//	jQuery('#Hardwoodhtml').html(msg[2]);
					//	jQuery('#Hardwood_rate').text(msg[33][0]['Profil_rate']);
					//	jQuery('#Hardwood_sku').text(msg[33][0]['Profil_sku']);
					//	jQuery('#Hardwood_total').text(msg[33][0]['Profil_total_rate']);
					//	}else{
					console.log(msg[33][0]['Profil_slop']);
					console.log(msg[33][0]['Profil_rate']);
					console.log(msg[33][0]['Profil_sku']);
					console.log(msg[33][0]['Profil_total_rate']);
					console.log(msg[33][0]['Profil_slop_gray']);
					console.log(msg[33][0]['Profil_rate_gray']);
					console.log(msg[33][0]['Profil_sku_gray']);
					console.log(msg[33][0]['Profil_total_rate_gray']);
					if (msg[16] == "hardwood" || msg[16] == "Smoked_Oak") {
						jQuery('#gettotal1').text("");
					} else {
						jQuery('#gettotal1').text(msg[16]);
					}

					if (msg[33][0]['Profil_sku_status'] == '2') {
						jQuery('.fence1').show();
						jQuery('#fence1').val(msg[2]);
						jQuery('#fencehtml').html(msg[2]);

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

						jQuery('#fence1_sku').text("DB " + msg[33][0]['Profil_sku']);

						jQuery('#fence1_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['Profil_total_rate']));
						jQuery("#fence2").hide();
					}
					if (msg[33][0]['Profil_sku_status'] == '1') {
						if ((msg[33][0]['Profil_rate_color_black'] == 'Black')) {
							jQuery('.fence1').show();
							jQuery('#fence1').val(msg[33][0]['Profil_slop']);
							jQuery('#fencehtml').html(msg[33][0]['Profil_slop']);

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

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

						} else {
							jQuery(".fence1").hide();
							jQuery('#fence1').val('0');
							jQuery('#fencehtml').html('');
							jQuery('#fence1_rate').text('');
							jQuery('#fence1_sku').text('');
							jQuery('#fence1_total').text('');

						}
						if ((msg[33][0]['Profil_rate_color_gray'] == 'Grey')) {
							jQuery(".fence2").show();
							jQuery('#fence12').val(msg[33][0]['Profil_slop_gray']);
							jQuery('#fencehtml2').html(msg[33][0]['Profil_slop_gray']);

							jQuery('#fence12_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['Profil_rate_gray']));
							jQuery('#fence12_sku').text("DB " + msg[33][0]['Profil_sku_gray']);

							jQuery('#fence12_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['Profil_total_rate_gray']));
							jQuery('#pdf_fence12').val(msg[33][0]['Profil_slop_gray']);
							jQuery('#pdf_fence12_sku').val(msg[33][0]['Profil_sku_gray']);
							jQuery('#pdf_fence12_rate').val(msg[33][0]['Profil_rate_gray']);
							jQuery('#pdf_fence12_total').val(msg[33][0]['Profil_total_rate_gray']);
							//fence12_total = jQuery("#fence12_total").html();
							jQuery('#pdf_fence12_color').val(fence12_total);
						} else {
							jQuery(".fence2").hide();
						}
					}
					//	}

					jQuery('#top1').val(msg[3]);

					jQuery('#top1_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['Topprofil_rate']));
					jQuery('#top1_sku').text("DB " + msg[33][0]['Topprofil_sku']);

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

					jQuery('#post1').val(' ');
					jQuery('#alu_design_stlope').val(msg[4]);
					jQuery('#alu_design_stlope1').val(msg[4]);
					jQuery('#alu_design_stlopehtml').html(msg[4]);
					jQuery('#postsizetype1').val('80x80mm');
					jQuery('#postsizetype1html').html('80x80mm');

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

					jQuery('#alu_design_stlope_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['Kirkedal_Stolper_total_rate']));
					jQuery('#alu_design_stlope_sku').text("DB " + msg[33][0]['Kirkedal_Stolper_sku']);
					if (msg[33][0]['Kirkedal_Stolper_sku'] == 2273515) {
						jQuery("#alu_design_stlope_2273515").text("Alu Design Stolpe Light");

					}
					jQuery('#pdf_alu_design_stlope_sku').val(msg[33][0]['Kirkedal_Stolper_sku']);
					jQuery('#pdf_sanded_black_sku').val(msg[33][0]['Profil_sku']);
					jQuery('#pdf_sanded_black_sku_qty').val(msg[33][0]['Profil']);
					if (jQuery('#wqs_control_segment').val() == 'set') {
					} else if (jQuery('#wqs_control_segment').val() == 'unset') {
						jQuery('#post1').val(msg[4]);

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

						jQuery('#post1_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['Kirkedal_Stolper_total_rate']));
						jQuery('#post1_sku').text("DB " + msg[33][0]['Kirkedal_Stolper_sku']);
						jQuery('#pdf_alu_design_stlope_sku').val(msg[33][0]['Kirkedal_Stolper_sku']);
						jQuery('#pdf_sanded_black_sku').val(msg[33][0]['Profil_sku']);
						jQuery('#pdf_sanded_black_sku_qty').val(msg[33][0]['Profil']);

						jQuery('#alu_design_stlope').val(' ');
						jQuery('#postsizetype1').val(msg[18]);
						jQuery('#postsizetype1html').html(msg[18]);
					}
					jQuery('#led1').val(msg[5]);

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

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

					jQuery('#led1_sku').text("DB " + msg[33][0]['led_sku']);

					jQuery('#total').val(msg[6]);
					jQuery('#totaltotl').html(msg[6]);
					jQuery('#totaltotll').html(msg[6]);
					jQuery('#totaltotll2').html(msg[6]);

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

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

						jQuery("#alublackdoor_product_sku").html("DB " + msg[33][0]['blackaludoorprofile_sku']);

						jQuery("#alublackdoor_product_rate").html(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['blackaludoorprofile_price']));

						jQuery("#alublackdoor_product_total").html(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['blackaludoorprofile_total_rate']));
						jQuery("#blackaluedoor_id").val(msg[33][0]['blackaludoorprofileid']);
						jQuery("#blackaluedoor_stock").val(msg[33][0]['blackaludoorprofilecount']);
					} else {
						jQuery(".door_product_wrap").hide();
						jQuery("#blackaluedoor_id").val('');
						jQuery("#blackaluedoor_stock").val('');
					}

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

						jQuery(".greyalu_door_title").html(msg[33][0]['grayaludoorprofiletitile']);
						jQuery("#greyalu_product3").val(msg[33][0]['grayaludoorprofilecount']);
						jQuery("#greyalu_product3_html").html(msg[33][0]['grayaludoorprofilecount']);

						jQuery("#greyalu_product3_sku").html("DB " + msg[33][0]['grayaludoorprofile_sku']);
						jQuery("#greyalu_product3_rate").html(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['grayaludoorprofile_price']));


						jQuery("#greyalu_product3_total").html(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['grayaludoorprofile_total_rate']));
						jQuery("#grayaludoor_id").val(msg[33][0]['grayaludoorprofileid']);
						jQuery("#grayaludoor_stock").val(msg[33][0]['grayaludoorprofilecount']);
						jQuery(".door_product3_wrap").show();
					} else {
						jQuery(".door_product3_wrap").hide();
						jQuery("#grayaludoor_id").val('');
						jQuery("#grayaludoor_stock").val('');
					}

					if (msg[33][0]['doorprofilecount'] != undefined) {
						jQuery(".black_door_title").html(msg[33][0]['doorprofiletitile']);
						jQuery("#blackdoor_product2").val(msg[33][0]['doorprofilecount']);
						jQuery("#blackdoor_product2_html").html(msg[33][0]['doorprofilecount']);
						jQuery("#blackdoor_product2_sku").html("DB " + msg[33][0]['doorprofile_sku']);

						jQuery("#blackdoor_product2_rate").html(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['doorprofile_price']));

						jQuery("#blackdoor_product2_total").html(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['doorprofile_total_rate']));

						jQuery("#greyblackdoor_id").val(msg[33][0]['doorprofileid']);
						jQuery("#greyblackdoor_stock").val(msg[33][0]['doorprofilecount']);
						jQuery(".door_product2_wrap").show();
					} else {
						jQuery(".door_product2_wrap").hide();
						jQuery("#greyblackdoor_id").val('');
						jQuery("#greyblackdoor_stock").val('');
					}


					if (msg[33][0]['blackblackdoorprofilestock'] != undefined) {
						jQuery(".blackblack_door_title").html(msg[33][0]['blackblackdoorprofiletitile']);
						jQuery("#blackblack_product4").val(msg[33][0]['blackblackdoorprofilestock']);
						jQuery("#blackblack_product4_html").html(msg[33][0]['blackblackdoorprofilestock']);
						jQuery("#blackblack_product4_sku").html("DB " + msg[33][0]['blackblackdoorprofile_sku']);

						jQuery("#blackblack_product4_rate").html(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['blackblackdoorprofile_price']));

						jQuery("#blackblack_product4_total").html(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['blackblackdoorprofile_total_rate']));

						jQuery("#blackblackedoor_id").val(msg[33][0]['blackblackdoorprofileid']);
						jQuery("#blackaluedoor_stock").val(msg[33][0]['blackblackdoorprofilestock']);
						jQuery(".door_product4_wrap").show();
					} else {
						jQuery(".door_product4_wrap").hide();
						jQuery("#blackblackedoor_id").val('');
						jQuery("#blackaluedoor_stock").val('');
					}


					if (msg[18] == '80x80mm') {
						var showhides = jQuery('#hidLed option:selected').val();
						if (showhides == 'LED Alu' || showhides == 'LED Alu Black') {
							jQuery("#led1").parents("tr").show();
						} else {
							jQuery("#led1").parents("tr").hide();
						}
						jQuery("#top1").parents("tr").hide();
						jQuery("#slutstolpe1").parents("tr").hide();
						jQuery("#post1").parents("tr").hide();
						jQuery('#stolpe1').parents("tr").hide();
						jQuery('#stolpe2').parents("tr").hide();
						jQuery("#topskruer1").parents("tr").hide();
						jQuery("#topskruer1").val('');
						jQuery("#acc1_cntt").hide();
						jQuery("#skruer1").parents("tr").hide();
						jQuery("#skruer1").val(""); //Umid

						jQuery("#power1").parents("tr").hide();

						//jQuery('#alu_hide_topskruer1').hide();
						//jQuery('#alu_hide_skruer1').hide();
						jQuery('#alu_hide_endekap1').hide();
						jQuery('#alu_hide_topklods1').hide();
						jQuery(".wqs_condition_2").show();
						jQuery('#alu_bundskinne').val(msg[12]);
						jQuery('#alu_bundskinnehtml').html(msg[12]);
						if (msg[35] == "alublack") {
							jQuery('.top_bundskinne_color').html('Alu');
						}
						if (msg[35] == "black") {
							jQuery('.top_bundskinne_color').html('Alu Black');
						}

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

						jQuery('#alu_bundskinne_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['endekap_total_rate']));
						jQuery('#alu_bundskinne_sku').text("DB " + msg[33][0]['endekap_sku']);
						jQuery('#pdf_alu_bundskinne_sku').val(msg[33][0]['endekap_sku']);

						jQuery('#alu_montageklaeb').val(msg[28]);
						jQuery('#alu_montageklaebhtml').html(msg[28]);

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

						jQuery('#alu_montageklaeb_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['montageklaeb_total_rate']));
						jQuery('#alu_montageklaeb_sku').text("DB " + msg[33][0]['montageklaeb_sku']);

						jQuery('#alu_design_stolpefod').parents("tr").hide();

						if (msg[31] != 0) {
							jQuery('#alu_design_stolpefod').parents("tr").show();
							jQuery('#alu_design_stolpefod').val(msg[4]);
							jQuery('#alu_design_stolpefodhtml').html(msg[4]);

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

							jQuery('#alu_design_stolpefod_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['alu_design_stolpefod_total_rate']));
							jQuery('#alu_design_stolpefod_sku').text("DB " + msg[33][0]['alu_design_stolpefod_sku']);
							jQuery('#pdf_aluStolpefod').val(msg[4]);

						} else {
							jQuery('#alu_design_stolpefod').val(msg[31]);
							jQuery('#pdf_aluStolpefod').val(msg[31]);

						}


					} else if (msg[18] == '2x80x80mm') {
						jQuery("#top1").parents("tr").hide();
					} else if (msg[18] == '60x60mm') {


						var showhides = jQuery('#hidLed option:selected').val();
						if (showhides == 'LED Alu' || showhides == 'LED Alu Black') {
							jQuery("#led1").parents("tr").show();
						} else {
							jQuery("#led1").parents("tr").hide();
						}
						jQuery("#top1").parents("tr").hide();
						jQuery("#slutstolpe1").parents("tr").hide();
						jQuery("#post1").parents("tr").hide();
						jQuery('#stolpe1').parents("tr").hide();
						jQuery('#stolpe2').parents("tr").hide();
						jQuery("#topskruer1").parents("tr").hide();
						jQuery("#topskruer1").val('');
						jQuery("#acc1_cntt").hide();
						jQuery("#skruer1").parents("tr").hide();
						jQuery("#skruer1").val(""); //Umid

						jQuery("#power1").parents("tr").hide();

						//jQuery('#alu_hide_topskruer1').hide();
						//jQuery('#alu_hide_skruer1').hide();
						jQuery('#alu_hide_endekap1').hide();
						jQuery('#alu_hide_topklods1').hide();
						jQuery(".wqs_condition_2").show();
						jQuery('#alu_bundskinne').val(msg[12]);
						jQuery('#alu_bundskinnehtml').html(msg[12]);
						if (msg[35] == "coex_light_alu_black") {
							jQuery('.top_bundskinne_color').html('Alu Light');
						}



						jQuery('#alu_bundskinne_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'DKK' }).format(msg[33][0]['endekap_rate']));

						jQuery('#alu_bundskinne_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'DKK' }).format(msg[33][0]['endekap_total_rate']));
						jQuery('#alu_bundskinne_sku').text("DB " + msg[33][0]['endekap_sku']);
						jQuery('#pdf_alu_bundskinne_sku').val(msg[33][0]['endekap_sku']);

						jQuery('#alu_montageklaeb').val(msg[28]);
						jQuery('#alu_montageklaebhtml').html(msg[28]);

						jQuery('#alu_montageklaeb_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'DKK' }).format(msg[33][0]['montageklaeb_rate']));

						jQuery('#alu_montageklaeb_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'DKK' }).format(msg[33][0]['montageklaeb_total_rate']));
						jQuery('#alu_montageklaeb_sku').text("DB " + msg[33][0]['montageklaeb_sku']);

						jQuery('#alu_design_stolpefod').parents("tr").hide();

						if (msg[31] != 0) {
							jQuery('#alu_design_stolpefod').parents("tr").show();
							jQuery('#alu_design_stolpefod').val(msg[4]);
							jQuery('#alu_design_stolpefodhtml').html(msg[4]);

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

							jQuery('#alu_design_stolpefod_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'DKK' }).format(msg[33][0]['alu_design_stolpefod_total_rate']));
							jQuery('#alu_design_stolpefod_sku').text("DB " + msg[33][0]['alu_design_stolpefod_sku']);
							jQuery('#pdf_aluStolpefod').val(msg[4]);

						} else {
							jQuery('#alu_design_stolpefod').val(msg[31]);
							jQuery('#pdf_aluStolpefod').val(msg[31]);

						}



					} else {
						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("#acc1_cntt").hide();
						jQuery('#endekap1').val(msg[12]);

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

						jQuery('#endekap1_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['endekap_total_rate']));
						jQuery('#endekap1_sku').text("DB " + msg[33][0]['endekap_sku']);

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

						jQuery('#skruer1').val(msg[7]);

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

						jQuery('#skruer1_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['skruer_total_rate']));
						jQuery('#skruer1_sku').text("DB " + msg[33][0]['skruer_sku']);
						jQuery(".wqs_condition_2").hide();
						jQuery('#alu_bundskinne').val('');
						jQuery('#alu_montageklaeb').val('');

						jQuery('#alu_design_stolpefod').parents("tr").hide();
						jQuery('#pdf_aluStolpefod').val(0);
					}
					jQuery('#stolpe1').val(msg[8]);
					if (msg[8] == 0 || msg[8] == "") {
						jQuery('#stolpe1').parents("tr").hide();
					} else {
						jQuery('#stolpe1').parents("tr").show()
					}

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

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

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

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

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

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

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

					jQuery('#topklods1_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['topklods_total_rate']));
					jQuery('#topklods1_sku').text("DB " + msg[33][0]['topklods_sku']);

					jQuery('#topskruer1').val(msg[11]);
					if (msg[11] == 0 || msg[11] == "") {
						jQuery('#topskruer1').parents("tr").hide();
					} else {
						jQuery('#topskruer1').parents("tr").show()
					}

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

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

					if (jQuery('#alu_bundskinne_hidd').val() == 'set') {
						//jQuery('#endekap1').val(' ');
						console.log("alu_bundskinne" + msg[12]);
						jQuery('#alu_bundskinne').val(msg[12]);
						if (msg[12] == 0 || msg[12] == "") {
							jQuery('#alu_bundskinne').parents("tr").hide();
						} else {
							jQuery('#alu_bundskinne').parents("tr").show()
						}

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

						jQuery('#alu_bundskinne_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['endekap_total_rate']));
						jQuery('#alu_bundskinne_sku').text("DB " + msg[33][0]['endekap_sku']);
						jQuery('#pdf_alu_bundskinne_sku').val(msg[33][0]['endekap_sku']);

					} else if (
						jQuery('#alu_bundskinne_hidd').val() == 'unset') {
						//jQuery('#endekap1').val(msg[12]);
						jQuery('#alu_bundskinne').val(' ');
					}
					if (Vælgendekap == "bundskinne") {
						jQuery('#alu_bundskinne').val(msg[12]);
						if (msg[12] == 0 || msg[12] == "") {
							jQuery('#alu_bundskinne').parents("tr").hide();
						} else {
							jQuery('#alu_bundskinne').parents("tr").show()
						}

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

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

						jQuery('#alu_bundskinne_sku').text("DB " + msg[33][0]['endekap_sku']);
						jQuery('#pdf_alu_bundskinne_sku').val(msg[33][0]['endekap_sku']);
					}
					jQuery('#power1').val(msg[33][0]['total_powr_cost']);

					if (msg[33][0]['total_powr_cost'] == 0 || msg[33][0]['total_powr_cost'] == "") {
						jQuery('#power1').parents("tr").hide();
						jQuery('#pdf_power_supply_id').val(182);
					} else {
						jQuery('#power1').parents("tr").show()
					}
					if (typeof (msg[33][0]['total_powr_cost']) != "undefined" && msg[33][0]['total_powr_cost'] !== null) {
						jQuery('#power1').parents("tr").show();
						jQuery('#pdf_power_supply_id').val(182);
					} else {
						jQuery('#power1').parents("tr").hide()
					}

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

					total_powr_cost = msg[33][0]['power_total_rate'] * msg[33][0]['total_powr_cost'];

					jQuery('#power1_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(total_powr_cost));

					jQuery('#power1_sku').text(msg[33][0]['power_sku']);

					jQuery('#fencetype1').val(msg[14]);
					if (msg[14] == 0 || msg[14] == "") {
						jQuery('#fencetype1').parents("tr").hide();
					} else {
						jQuery('#fencetype1').parents("tr").show()
					}
					jQuery('#topprofiletype1').val(msg[15]);
					if (msg[15] == 0 || msg[15] == "") {
						jQuery('#topprofiletype1').parents("tr").hide();
					} else {
						jQuery('#topprofiletype1').parents("tr").show()
					}
					jQuery('#farve1').val(msg[16]);
					if (msg[16] == 0 || msg[16] == "") {
						jQuery('#farve1').parents("tr").hide();
					} else {
						jQuery('#farve1').parents("tr").show()
					}
					jQuery('#postsize1').val(msg[17]);
					if (msg[17] == 0 || msg[17] == "") {
						jQuery('#postsize1').parents("tr").hide();
					} else {
						jQuery('#postsize1').parents("tr").show()
					}
					jQuery('#endekaptype1').val(msg[19]);
					if (msg[19] == 0 || msg[19] == "") {
						jQuery('#endekaptype1').parents("tr").hide();
					} else {
						jQuery('#endekaptype1').parents("tr").show()
					}
					jQuery('#acc1_cnt').val(msg[20]);
					jQuery('#acc1_cnttt').html(msg[20]);
					if (msg[20] == '0' && msg[20] == "") {
						//console.log(msg[20] + 'nottttttttttttttt');
						jQuery('#acc1_cntt').hide();
						jQuery('#acc1_cnt').parents("tr").hide();
					} else {
						//console.log(msg[20] + 'hiiiiiiiiii');
						jQuery('#acc1_cnt').parents("tr").show()

					}
					jQuery('#acc1_cnt_sku').text("DB " + msg[33][0]['acc1_sku']);

					jQuery('#acc1_cnt_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[21]));
					if (msg[21] == 0 || msg[21] == "") {
						jQuery('#acc1_cnt_rate').parents("tr").hide();
					} else {
						jQuery('#acc1_cnt_rate').parents("tr").show()
					}
					acc1_cnt_total = msg[20] * msg[21];

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

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

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

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

					// //if (msg[33][0]["led_lys_led"] == 0 || msg[33][0]["led_lys_led"] == "")
					// if(typeof(msg[33][0]['led_lys_led']) != "undefined" && msg[33][0]['led_lys_led'] !== null)
					// //if(msg[33][0]['led_lys_led'] != undefined)
					//  {
					//     jQuery('#led_lys_cnt').parents("tr").show();
					// 	jQuery('#pdf_led_id').val(1298);
					// } else {
					//     jQuery('#led_lys_cnt').parents("tr").hide()
					// }



					// jQuery('#led_lys_cnt_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['lys_led_rate']));
					// jQuery('#led_lys_cnt').val(msg[33][0]["led_lys_led"]);
					// jQuery('#led_lys_cnt_cnthtml').html(msg[33][0]["led_lys_led"]);

					// jQuery('#led_lys_cnt_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['led_lys_led_total_rate']));
					// jQuery('#led_lys_cnt_sku').text("DB "+msg[33][0]["led_lys_led_sku"]);


					// //if (msg[33][0]["led_alu_led"] == 0 || msg[33][0]["led_alu_led"] == "") 
					// if(typeof(msg[33][0]['led_alu_led']) != "undefined" && msg[33][0]['led_alu_led'] !== null)
					// {
					//     jQuery('#led_alu_cnt').parents("tr").show();
					// 	jQuery('#pdf_aluled_id').val(1168);
					// } else {
					//     jQuery('#led_alu_cnt').parents("tr").hide()

					// }

					// jQuery('#led_alu_cnt_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['led_alu_led_rate']));
					// jQuery('#led_alu_cnt').val(msg[33][0]["led_alu_led"]);
					// jQuery('#led_alu_cnt_cnthtml').text(msg[33][0]["led_alu_led"]);

					// jQuery('#led_alu_cnt_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['led_alu_led_total_rate']));
					// jQuery('#led_alu_cnt_sku').text("DB "+msg[33][0]["led_alu_led_sku"]);


					//	if (msg[33][0]["led_alu_black_led"] == 0 || msg[33][0]["led_alu_black_led"] == "")
					if (typeof (msg[33][0]['led_alu_black_led']) != "undefined" && msg[33][0]['led_alu_black_led'] !== null) {
						jQuery('#led_alu_black_cnt').parents("tr").show();
						jQuery('#pdf_aluled_id').val(1169);
					} else {
						jQuery('#led_alu_black_cnt').parents("tr").hide()
					}

					jQuery('#led_alu_black_cnt_rate').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['led_alu_black_led_rate']));
					jQuery('#led_alu_black_cnt').val(msg[33][0]["led_alu_black_led"]);
					jQuery('#led_alu_black_cnt_cnthtml').html(msg[33][0]["led_alu_black_led"]);

					jQuery('#led_alu_black_cnt_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['led_alu_black_led_total_rate']));
					jQuery('#led_alu_black_cnt_sku').text("DB " + msg[33][0]["led_alu_black_led_sku"]);


					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);
					//if(msg[26] == 0 || msg[26] == ""){jQuery('#acc4_cnt').parents("tr").hide();}else{jQuery('#acc4_cnt').parents("tr").show()}
					jQuery('#stolpe2').val(stolpe2);
					if (stolpe2 == 0 || stolpe2 == "") {
						jQuery('#stolpe2').parents("tr").hide();
					} else {
						jQuery('#stolpe2').parents("tr").show()
					}

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

					jQuery('#stolpe2_total').text(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(msg[33][0]['stolpe45_total_rate']));
					jQuery('#stolpe2_sku').text("DB " + msg[33][0]['stolpe45_sku']);
					jQuery('.all-data-list-finel').hide();
					printtotal();
					topprofile();
					//	postsize();
					endekaptype();
					pdf1();
					remove_zeroes();
					//resizetextbox();

					jQuery('.calculator-box').hide();
					jQuery('.calculator-box.calculator-7').show();
					//console.log(msg);
					if (msg[20] == '0' && msg[20] == "") {
						jQuery('#acc1_cntt').hide();
					}
					if (msg[12] == '0' && msg[12] == "") {
						jQuery('#alu_bundskinne').parents("tr").hide();
					}
					fencerowh = jQuery("#fencetype").val();
					if (fencerowh == '') {
						vælgform = jQuery(".sidebar_calc_box3").find('img').attr('hidcolor');
						myJsonString = {};
						var cnt_main = 0;
						jQuery.each(msg[34], function (index, value) {
							console.log(value.length);
							lengthss = value.length;
							myarr = {};

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

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

					}
					console.log(row + 'roww');
					console.log(msg[34]);
					if (msg[35] == 'grey') {
						jQuery('.custom_glb_type option[color="gray"]').hide();
						jQuery('.custom_glb_type option[color="black"]').show();
						jQuery('.custom_glb_type option[color="hardwood"]').show();
						jQuery('.custom_glb_type option[color="Smoked_Oak"]').show();

						jQuery('.custom_radio_button input#door').show();
						jQuery('.custom_radio_button label[for="door"]').show();

						//myJsonString = {};

						jQuery.each(msg[34], function (index, value) {

							if (row_set == '1') {
								jQuery("#instanceCounti").val(value.length);
								jQuery("#instanceCountl").val('0');
								jQuery("#instanceCountu").val('0');
								jQuery("#squere").val('0');

								//row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1 (1).glb";
								row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_SilverStolpe_Grey_Updated/round_I_GLB_silver_grey_v05_" + value.heights + ".glb";
								if (value.heights > 13) {
									row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_SilverStolpe_Grey_Updated/round_I_GLB_silver_grey_v05_13.glb";
								}
								row_url_2 = '';
								row_url_3 = '';
								row_url_4 = '';

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

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

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

									if (value.heights > 13) {

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

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

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

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

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

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

					}

					else if (msg[35] == 'alublack') {

						jQuery('.custom_glb_type option[color="black"]').hide();
						jQuery('.custom_glb_type option[color="gray"]').show();

						jQuery('.custom_glb_type option[color="hardwood"]').show();
						jQuery('.custom_glb_type option[color="Smoked_Oak"]').show();

						jQuery('.custom_radio_button input#door').show();
						jQuery('.custom_radio_button label[for="door"]').show();
						jQuery.each(msg[34], function (index, value) {
							console.log(value);
							if (row_set == '1') {
								jQuery("#instanceCounti").val(value.length);
								jQuery("#instanceCountl").val('0');
								jQuery("#instanceCountu").val('0');
								jQuery("#squere").val('0');

								if (msg[14] == "K3") {

									row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Alu-stolpe-alu_K3_Black/Alu-stolpe-alu_K3_Black_" + value.heights + ".glb";
									if (value.heights > 11) {
										row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Alu-stolpe-alu_K3_Black/Alu-stolpe-alu_K3_Black_11.glb";
									}
								} else {
									row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_SilverStolpe_Black_updated/blackwood_round_silver_I_GLB_V05_" + value.heights + ".glb";
									if (value.heights > 13) {
										row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_SilverStolpe_Black_updated/blackwood_round_silver_I_GLB_V05_13.glb";
									}
								}


								row_url_2 = '';
								row_url_3 = '';
								row_url_4 = '';

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

								jQuery("#instanceCountu").val('0');
								jQuery("#squere").val('0');
								if (msg[14] == "K3") {

									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-stolpe-alu_K3_Black/Alu-stolpe-alu_K3_Black_" + value.heights + ".glb";
										if (value.heights > 11) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Alu-stolpe-alu_K3_Black/Alu-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/Alu-stolpe-alu_K3_Black/Alu-stolpe-alu_K3_Black_" + value.heights + ".glb";
										if (value.heights > 11) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Alu-stolpe-alu_K3_Black/Alu-stolpe-alu_K3_Black_11.glb";
										}
									}
								} else {
									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_SilverStolpe_Black_updated/blackwood_round_silver_I_GLB_V05_" + value.heights + ".glb";
										if (value.heights > 13) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_SilverStolpe_Black_updated/blackwood_round_silver_I_GLB_V05_13.glb";
										}
									} else if (index == '1') {
										jQuery("#instanceCountl").val(value.length);
										//row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1 (1).glb";
										row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_SilverStolpe_Black_updated/blackwood_round_silver_I_GLB_V05_" + value.heights + ".glb";
										if (value.heights > 13) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_SilverStolpe_Black_updated/blackwood_round_silver_I_GLB_V05_13.glb";
										}
									}
								}

								jQuery("#instanceCountu").val('0');
								row_url_3 = '';

							} else if (row_set == '3') {
								jQuery("#instanceCountu").val('0');

								if (msg[14] == "K3") {
									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-stolpe-alu_K3_Black/Alu-stolpe-alu_K3_Black_" + value.heights + ".glb";
										if (value.heights > 11) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Alu-stolpe-alu_K3_Black/Alu-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/Alu-stolpe-alu_K3_Black/Alu-stolpe-alu_K3_Black_" + value.heights + ".glb";

										if (value.heights > 11) {

											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Alu-stolpe-alu_K3_Black/Alu-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/Alu-stolpe-alu_K3_Black/Alu-stolpe-alu_K3_Black_" + value.heights + ".glb";
										if (value.heights > 11) {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Alu-stolpe-alu_K3_Black/Alu-stolpe-alu_K3_Black_11.glb";
										}

									}
								} else {

									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_SilverStolpe_Black_updated/blackwood_round_silver_I_GLB_V05_" + value.heights + ".glb";
										if (value.heights > 13) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_SilverStolpe_Black_updated/blackwood_round_silver_I_GLB_V05_13.glb";
										}
									} else if (index == '1') {
										jQuery("#instanceCountl").val(value.length);
										//row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_11.glb";
										row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_SilverStolpe_Black_updated/blackwood_round_silver_I_GLB_V05_" + value.heights + ".glb";

										if (value.heights > 13) {

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

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

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

								if (msg[14] == "K3") {
									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-stolpe-alu_K3_Black/Alu-stolpe-alu_K3_Black_" + value.heights + ".glb";
										if (value.heights > 11) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Alu-stolpe-alu_K3_Black/Alu-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/Alu-stolpe-alu_K3_Black/Alu-stolpe-alu_K3_Black_" + value.heights + ".glb";

										if (value.heights > 11) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Alu-stolpe-alu_K3_Black/Alu-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/Alu-stolpe-alu_K3_Black/Alu-stolpe-alu_K3_Black_" + value.heights + ".glb";
										if (value.heights > 11) {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Alu-stolpe-alu_K3_Black/Alu-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/Alu-stolpe-alu_K3_Black/Alu-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/Alu-stolpe-alu_K3_Black/Alu-stolpe-alu_K3_Black_11.glb";
										}
									}
								} else {

									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_SilverStolpe_Black_updated/blackwood_round_silver_I_GLB_V05_" + value.heights + ".glb";
										if (value.heights > 13) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_SilverStolpe_Black_updated/blackwood_round_silver_I_GLB_V05_13.glb";
										}
									} else if (index == '1') {
										jQuery("#instanceCountl").val(value.length);
										//row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
										row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_SilverStolpe_Black_updated/blackwood_round_silver_I_GLB_V05_" + value.heights + ".glb";

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

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

					}
					else if (msg[35] == 'greyblack') {

						jQuery('.custom_glb_type option[color="gray"]').hide();
						jQuery('.custom_glb_type option[color="black"]').show();


						jQuery('.custom_glb_type option[color="hardwood"]').show();
						jQuery('.custom_glb_type option[color="Smoked_Oak"]').show();

						jQuery('.custom_radio_button input#door').show();
						jQuery('.custom_radio_button label[for="door"]').show();
						jQuery.each(msg[34], function (index, value) {
							if (row_set == '1') {
								jQuery("#instanceCounti").val(value.length);
								jQuery("#instanceCountl").val('0');
								jQuery("#instanceCountu").val('0');
								jQuery("#squere").val('0');

								//row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1 (1).glb";
								row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_Grey_updated/round_I_GLB_black_grey_v05_" + value.heights + ".glb";
								if (value.heights > 13) {
									row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_Grey_updated/round_I_GLB_black_grey_v05_13.glb";
								}
								row_url_2 = '';
								row_url_3 = '';
								row_url_4 = '';

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

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

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

									if (value.heights > 13) {

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

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

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

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

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

						});
					}
					else if (msg[35] == 'black') {
						//jQuery('.custom_glb_type').val('black');
						jQuery('.custom_glb_type option[color="black"]').hide();
						jQuery('.custom_glb_type option[color="gray"]').show();
						jQuery('.custom_glb_type option[color="hardwood"]').show();
						jQuery('.custom_glb_type option[color="Smoked_Oak"]').show();

						jQuery('.custom_radio_button input#door').show();
						jQuery('.custom_radio_button label[for="door"]').show();

						jQuery.each(msg[34], function (index, value) {
							console.log(value);
							if (row_set == '1') {
								jQuery("#instanceCounti").val(value.length);
								jQuery("#instanceCountl").val('0');
								jQuery("#instanceCountu").val('0');
								jQuery("#squere").val('0');
								if (msg[14] == "K3") {
									row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-Black_K3_Black/Alu-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-Alu-stolpe-Black_K3_Black/Alu-stolpe-Black_K3_Black_11.glb";
									}
								} else {
									//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_BlackStolpe_Black_Updated/blackwood_round_black_I_GLB_V05_" + value.heights + ".glb";
									if (value.heights > 13) {
										row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_Black_Updated/blackwood_round_black_I_GLB_V05_13.glb";
									}
								}
								row_url_2 = '';
								row_url_3 = '';
								row_url_4 = '';

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

								jQuery("#instanceCountu").val('0');
								jQuery("#squere").val('0');
								if (index == '0') {
									jQuery("#instanceCounti").val(value.length);
									if (msg[14] == "K3") {
										row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-Black_K3_Black/Alu-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-Alu-stolpe-Black_K3_Black/Alu-stolpe-Black_K3_Black_11.glb";
										}
									} else {
										//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_BlackStolpe_Black_Updated/blackwood_round_black_I_GLB_V05_" + value.heights + ".glb";
										if (value.heights > 13) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_Black_Updated/blackwood_round_black_I_GLB_V05_13.glb";
										}
									}
								} else if (index == '1') {
									jQuery("#instanceCountl").val(value.length);
									if (msg[14] == "K3") {
										row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-Black_K3_Black/Alu-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-Alu-stolpe-Black_K3_Black/Alu-stolpe-Black_K3_Black_11.glb";
										}
									} else {
										//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_BlackStolpe_Black_Updated/blackwood_round_black_I_GLB_V05_" + value.heights + ".glb";
										if (value.heights > 13) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_Black_Updated/blackwood_round_black_I_GLB_V05_13.glb";
										}
									}
								}
								jQuery("#instanceCountu").val('0');
								row_url_3 = '';
							} else if (row_set == '3') {
								jQuery("#instanceCountu").val('0');

								if (index == '0') {
									jQuery("#instanceCounti").val(value.length);
									if (msg[14] == "K3") {
										row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-Black_K3_Black/Alu-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-Alu-stolpe-Black_K3_Black/Alu-stolpe-Black_K3_Black_11.glb";
										}
									} else {
										//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_BlackStolpe_Black_Updated/blackwood_round_black_I_GLB_V05_" + value.heights + ".glb";
										if (value.heights > 13) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_Black_Updated/blackwood_round_black_I_GLB_V05_13.glb";
										}
									}
								} else if (index == '1') {
									jQuery("#instanceCountl").val(value.length);
									if (msg[14] == "K3") {
										row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-Black_K3_Black/Alu-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-Alu-stolpe-Black_K3_Black/Alu-stolpe-Black_K3_Black_11.glb";
										}
									} else {
										//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_BlackStolpe_Black_Updated/blackwood_round_black_I_GLB_V05_" + value.heights + ".glb";

										if (value.heights > 13) {

											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_Black_Updated/blackwood_round_black_I_GLB_V05_13.glb";
										}
									}
								} else if (index == '2') {

									jQuery("#instanceCountu").val(value.length);
									if (msg[14] == "K3") {
										row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-Black_K3_Black/Alu-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-Alu-stolpe-Black_K3_Black/Alu-stolpe-Black_K3_Black_11.glb";
										}
									} else {
										//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_BlackStolpe_Black_Updated/blackwood_round_black_I_GLB_V05_" + value.heights + ".glb";
										if (value.heights > 13) {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_Black_Updated/blackwood_round_black_I_GLB_V05_13.glb";
										}
									}
								}

							} else if (row_set == '4') {
								if (index == '0') {
									jQuery("#instanceCounti").val(value.length);
									if (msg[14] == "K3") {
										row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-Black_K3_Black/Alu-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-Alu-stolpe-Black_K3_Black/Alu-stolpe-Black_K3_Black_11.glb";
										}
									} else {
										//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_BlackStolpe_Black_Updated/blackwood_round_black_I_GLB_V05_" + value.heights + ".glb";
										if (value.heights > 13) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_Black_Updated/blackwood_round_black_I_GLB_V05_13.glb";
										}
									}
								} else if (index == '1') {
									jQuery("#instanceCountl").val(value.length);
									if (msg[14] == "K3") {
										row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-Black_K3_Black/Alu-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-Alu-stolpe-Black_K3_Black/Alu-stolpe-Black_K3_Black_11.glb";
										}
									} else {
										//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_BlackStolpe_Black_Updated/blackwood_round_black_I_GLB_V05_" + value.heights + ".glb";

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

									jQuery("#instanceCountu").val(value.length);
									if (msg[14] == "K3") {
										row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-Black_K3_Black/Alu-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-Alu-stolpe-Black_K3_Black/Alu-stolpe-Black_K3_Black_11.glb";
										}
									} else {
										//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_BlackStolpe_Black_Updated/blackwood_round_black_I_GLB_V05_" + value.heights + ".glb";
										if (value.heights > 13) {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_Black_Updated/blackwood_round_black_I_GLB_V05_13.glb";
										}
									}
								} else if (index == '3') {
									jQuery("#squere").val(value.length);
									if (msg[14] == "K3") {
										row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-Black_K3_Black/Alu-stolpe-Black_K3_Black_" + value.heights + ".glb";
										if (value.heights > 11) {
											row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-Black_K3_Black/Alu-stolpe-Black_K3_Black_11.glb";
										}
									} else {
										row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_Black_Updated/blackwood_round_black_I_GLB_V05_" + value.heights + ".glb";
										//row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
										if (value.heights > 13) {
											row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_Black_Updated/blackwood_round_black_I_GLB_V05_13.glb";
										}
									}
								}
							}
						});

					}
					else if (msg[35] == 'hardwood') {
						//jQuery('.custom_glb_type').val('hardwood');
						jQuery('.custom_glb_type option[color="hardwood"]').hide();
						jQuery('.custom_glb_type option[color="black"]').show();
						jQuery('.custom_glb_type option[color="gray"]').show();

						jQuery('.custom_glb_type option[color="Smoked_Oak"]').show();

						jQuery('.custom_radio_button input#door').hide();
						jQuery('.custom_radio_button label[for="door"]').hide();

						jQuery.each(msg[36], function (index, value) {
							console.log(value);
							if (msg[14] == "K3") {
								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";
									console.log(value.heights);
									if (value.heights > 11) {
										row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_Hardwood/Alu-stolpe-Black_K3_Hardwood_11.glb";
									} else {
										row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_Hardwood/Alu-stolpe-Black_K3_Hardwood_" + value.heights + ".glb";
									}

									//row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_Hardwood/ALUDesign_BlackStolpe_Hardwood_21_new_test.glb";
									if (value.heights > 21) {

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

										if (value.heights > 11) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_Hardwood/Alu-stolpe-Black_K3_Hardwood_11.glb";
										} else {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_Hardwood/Alu-stolpe-Black_K3_Hardwood_" + value.heights + ".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";

										if (value.heights > 11) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_Hardwood/Alu-stolpe-Black_K3_Hardwood_11.glb";
										} else {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_Hardwood/Alu-stolpe-Black_K3_Hardwood_" + value.heights + ".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";

										if (value.heights > 11) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_Hardwood/Alu-stolpe-Black_K3_Hardwood_11.glb";
										} else {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_Hardwood/Alu-stolpe-Black_K3_Hardwood_" + value.heights + ".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";


										if (value.heights > 11) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_Hardwood/Alu-stolpe-Black_K3_Hardwood_11.glb";
										} else {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_Hardwood/Alu-stolpe-Black_K3_Hardwood_" + value.heights + ".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";

										if (value.heights > 11) {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_Hardwood/Alu-stolpe-Black_K3_Hardwood_11.glb";
										} else {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_Hardwood/Alu-stolpe-Black_K3_Hardwood_" + value.heights + ".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";

										if (value.heights > 11) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_Hardwood/Alu-stolpe-Black_K3_Hardwood_11.glb";
										} else {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_Hardwood/Alu-stolpe-Black_K3_Hardwood_" + value.heights + ".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";


										if (value.heights > 11) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_Hardwood/Alu-stolpe-Black_K3_Hardwood_11.glb";
										} else {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_Hardwood/Alu-stolpe-Black_K3_Hardwood_" + value.heights + ".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";

										if (value.heights > 11) {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_Hardwood/Alu-stolpe-Black_K3_Hardwood_11.glb";
										} else {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_Hardwood/Alu-stolpe-Black_K3_Hardwood_" + value.heights + ".glb";
										}
									} else if (index == '3') {
										jQuery("#squere").val(value.length);

										//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_Alu-stolpe-Black_K3_Hardwood/Alu-stolpe-Black_K3_Hardwood_11.glb";
										} else {
											row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_Hardwood/Alu-stolpe-Black_K3_Hardwood_" + value.heights + ".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";
									console.log(value.heights);
									if (value.heights > 21) {
										row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_Hardwood/ALUDesign_BlackStolpe_Hardwood_21.glb";
									} else {
										row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_Hardwood/ALUDesign_BlackStolpe_Hardwood_" + value.heights + ".glb";
									}

									//row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_Hardwood/ALUDesign_BlackStolpe_Hardwood_21_new_test.glb";
									if (value.heights > 21) {

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

										if (value.heights > 21) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_Hardwood/ALUDesign_BlackStolpe_Hardwood_21.glb";
										} else {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_Hardwood/ALUDesign_BlackStolpe_Hardwood_" + value.heights + ".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";

										if (value.heights > 21) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_Hardwood/ALUDesign_BlackStolpe_Hardwood_21.glb";
										} else {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_Hardwood/ALUDesign_BlackStolpe_Hardwood_" + value.heights + ".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";

										if (value.heights > 21) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_Hardwood/ALUDesign_BlackStolpe_Hardwood_21.glb";
										} else {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_Hardwood/ALUDesign_BlackStolpe_Hardwood_" + value.heights + ".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";


										if (value.heights > 21) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_Hardwood/ALUDesign_BlackStolpe_Hardwood_21.glb";
										} else {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_Hardwood/ALUDesign_BlackStolpe_Hardwood_" + value.heights + ".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";

										if (value.heights > 21) {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_Hardwood/ALUDesign_BlackStolpe_Hardwood_21.glb";
										} else {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_Hardwood/ALUDesign_BlackStolpe_Hardwood_" + value.heights + ".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";

										if (value.heights > 21) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_Hardwood/ALUDesign_BlackStolpe_Hardwood_21.glb";
										} else {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_Hardwood/ALUDesign_BlackStolpe_Hardwood_" + value.heights + ".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";


										if (value.heights > 21) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_Hardwood/ALUDesign_BlackStolpe_Hardwood_21.glb";
										} else {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_Hardwood/ALUDesign_BlackStolpe_Hardwood_" + value.heights + ".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";

										if (value.heights > 21) {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_Hardwood/ALUDesign_BlackStolpe_Hardwood_21.glb";
										} else {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_Hardwood/ALUDesign_BlackStolpe_Hardwood_" + value.heights + ".glb";
										}
									} else if (index == '3') {
										jQuery("#squere").val(value.length);

										//row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
										if (value.heights > 21) {
											row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_Hardwood/ALUDesign_BlackStolpe_Hardwood_21.glb";
										} else {
											row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_Hardwood/ALUDesign_BlackStolpe_Hardwood_" + value.heights + ".glb";
										}
									}
								}
							}
						});

					}
					else if (msg[35] == 'Smoked_Oak') {
						//jQuery('.custom_glb_type').val('Smoked_Oak');
						jQuery('.custom_glb_type option[color="Smoked_Oak"]').hide();
						jQuery('.custom_glb_type option[color="hardwood"]').show();
						jQuery('.custom_glb_type option[color="black"]').show();
						jQuery('.custom_glb_type option[color="gray"]').show();

						jQuery('.custom_radio_button input#door').hide();
						jQuery('.custom_radio_button label[for="door"]').hide();


						jQuery.each(msg[36], function (index, value) {
							console.log(value);
							if (msg[14] == "K3") {
								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/ALUDesign_BlackStolpe_Hardwood/ALUDesign_BlackStolpe_Hardwood_21_new_test.glb";
									if (value.heights > 11) {
										row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_OAK/Alu-stolpe-Black_K3_Oak_11.glb";
									} else {
										row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_OAK/Alu-stolpe-Black_K3_Oak_" + value.heights + ".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";

										if (value.heights > 11) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_OAK/Alu-stolpe-Black_K3_Oak_11.glb";
										} else {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_OAK/Alu-stolpe-Black_K3_Oak_" + value.heights + ".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";

										if (value.heights > 11) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_OAK/Alu-stolpe-Black_K3_Oak_11.glb";
										} else {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_OAK/Alu-stolpe-Black_K3_Oak_" + value.heights + ".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";

										if (value.heights > 11) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_OAK/Alu-stolpe-Black_K3_Oak_11.glb";
										} else {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_OAK/Alu-stolpe-Black_K3_Oak_" + value.heights + ".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";


										if (value.heights > 11) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_OAK/Alu-stolpe-Black_K3_Oak_11.glb";
										} else {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_OAK/Alu-stolpe-Black_K3_Oak_" + value.heights + ".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";

										if (value.heights > 11) {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_OAK/Alu-stolpe-Black_K3_Oak_11.glb";
										} else {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_OAK/Alu-stolpe-Black_K3_Oak_" + value.heights + ".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";

										if (value.heights > 11) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_OAK/Alu-stolpe-Black_K3_Oak_11.glb";
										} else {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_OAK/Alu-stolpe-Black_K3_Oak_" + value.heights + ".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";


										if (value.heights > 11) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_OAK/Alu-stolpe-Black_K3_Oak_11.glb";
										} else {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_OAK/Alu-stolpe-Black_K3_Oak_" + value.heights + ".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";

										if (value.heights > 11) {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_OAK/Alu-stolpe-Black_K3_Oak_11.glb";
										} else {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_OAK/Alu-stolpe-Black_K3_Oak_" + value.heights + ".glb";
										}
									} else if (index == '3') {
										jQuery("#squere").val(value.length);

										//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_Alu-stolpe-Black_K3_OAK/Alu-stolpe-Black_K3_Oak_11.glb";
										} else {
											row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done_Alu-stolpe-Black_K3_OAK/Alu-stolpe-Black_K3_Oak_" + value.heights + ".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/ALUDesign_BlackStolpe_Hardwood/ALUDesign_BlackStolpe_Hardwood_21_new_test.glb";
									if (value.heights > 21) {
										row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_SmokedOak/ALUDesign_BlackStolpe_SmokedOak_21.glb";
									} else {
										row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_SmokedOak/ALUDesign_BlackStolpe_SmokedOak_" + value.heights + ".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";

										if (value.heights > 21) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_SmokedOak/ALUDesign_BlackStolpe_SmokedOak_21.glb";
										} else {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_SmokedOak/ALUDesign_BlackStolpe_SmokedOak_" + value.heights + ".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";

										if (value.heights > 21) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_SmokedOak/ALUDesign_BlackStolpe_SmokedOak_21.glb";
										} else {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_SmokedOak/ALUDesign_BlackStolpe_SmokedOak_" + value.heights + ".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";

										if (value.heights > 21) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_SmokedOak/ALUDesign_BlackStolpe_SmokedOak_21.glb";
										} else {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_SmokedOak/ALUDesign_BlackStolpe_SmokedOak_" + value.heights + ".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";


										if (value.heights > 21) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_SmokedOak/ALUDesign_BlackStolpe_SmokedOak_21.glb";
										} else {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_SmokedOak/ALUDesign_BlackStolpe_SmokedOak_" + value.heights + ".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";

										if (value.heights > 21) {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_SmokedOak/ALUDesign_BlackStolpe_SmokedOak_21.glb";
										} else {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_SmokedOak/ALUDesign_BlackStolpe_SmokedOak_" + value.heights + ".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";

										if (value.heights > 21) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_SmokedOak/ALUDesign_BlackStolpe_SmokedOak_21.glb";
										} else {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_SmokedOak/ALUDesign_BlackStolpe_SmokedOak_" + value.heights + ".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";


										if (value.heights > 21) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_SmokedOak/ALUDesign_BlackStolpe_SmokedOak_21.glb";
										} else {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_SmokedOak/ALUDesign_BlackStolpe_SmokedOak_" + value.heights + ".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";

										if (value.heights > 21) {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_SmokedOak/ALUDesign_BlackStolpe_SmokedOak_21.glb";
										} else {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_SmokedOak/ALUDesign_BlackStolpe_SmokedOak_" + value.heights + ".glb";
										}
									} else if (index == '3') {
										jQuery("#squere").val(value.length);

										//row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
										if (value.heights > 21) {
											row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_SmokedOak/ALUDesign_BlackStolpe_SmokedOak_21.glb";
										} else {
											row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_SmokedOak/ALUDesign_BlackStolpe_SmokedOak_" + value.heights + ".glb";
										}
									}
								}
							}
						});

					}
					else if (msg[35] == 'sanded_black') {
						//jQuery('.custom_glb_type').val('Smoked_Oak');
						jQuery('.custom_glb_type option[color="Sanded_Black"]').hide();
						jQuery('.custom_glb_type option[color="Smoked_Oak"]').show();
						jQuery('.custom_glb_type option[color="hardwood"]').show();
						jQuery('.custom_glb_type option[color="black"]').show();
						jQuery('.custom_glb_type option[color="gray"]').show();


						jQuery('.custom_radio_button input#door').hide();
						jQuery('.custom_radio_button label[for="door"]').hide();


						jQuery.each(msg[36], function (index, value) {
							console.log(value);
							if (msg[14] == "K3") {
								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/ALUDesign_BlackStolpe_Hardwood/ALUDesign_BlackStolpe_Hardwood_21_new_test.glb";
									if (value.heights > 11) {
										row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_11.glb";
									} else {
										row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_" + value.heights + ".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";

										if (value.heights > 11) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_11.glb";
										} else {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_" + value.heights + ".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";

										if (value.heights > 11) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_11.glb";
										} else {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_" + value.heights + ".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";

										if (value.heights > 11) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_11.glb";
										} else {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_" + value.heights + ".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";


										if (value.heights > 11) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_11.glb";
										} else {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_" + value.heights + ".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";

										if (value.heights > 11) {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_11.glb";
										} else {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_" + value.heights + ".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";

										if (value.heights > 11) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_11.glb";
										} else {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_" + value.heights + ".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";


										if (value.heights > 11) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_11.glb";
										} else {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_" + value.heights + ".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";

										if (value.heights > 11) {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_11.glb";
										} else {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_" + value.heights + ".glb";
										}
									} else if (index == '3') {
										jQuery("#squere").val(value.length);

										//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/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_11.glb";
										} else {
											row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_" + value.heights + ".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/ALUDesign_BlackStolpe_Hardwood/ALUDesign_BlackStolpe_Hardwood_21_new_test.glb";
									if (value.heights > 13) {
										row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_13.glb";
									} else {
										row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_" + value.heights + ".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";

										if (value.heights > 13) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_13.glb";
										} else {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_" + value.heights + ".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";

										if (value.heights > 13) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_13.glb";
										} else {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_" + value.heights + ".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";

										if (value.heights > 13) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_13.glb";
										} else {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_" + value.heights + ".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";


										if (value.heights > 13) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_13.glb";
										} else {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_" + value.heights + ".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";

										if (value.heights > 13) {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_13.glb";
										} else {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_" + value.heights + ".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";

										if (value.heights > 13) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_13.glb";
										} else {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_" + value.heights + ".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";


										if (value.heights > 13) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_13.glb";
										} else {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_" + value.heights + ".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";

										if (value.heights > 13) {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_13.glb";
										} else {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_" + value.heights + ".glb";
										}
									} else if (index == '3') {
										jQuery("#squere").val(value.length);

										//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_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_13.glb";
										} else {
											row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_" + value.heights + ".glb";
										}
									}
								}
							}
						});

					}
					else if (msg[35] == 'Smoked_Oak_alu') {
						//jQuery('.custom_glb_type').val('Smoked_Oak');
						jQuery('.custom_glb_type option[color="Smoked_Oak"]').hide();

						jQuery('.custom_glb_type option[color="hardwood"]').show();
						jQuery('.custom_glb_type option[color="black"]').show();
						jQuery('.custom_glb_type option[color="gray"]').show();


						jQuery('.custom_radio_button input#door').hide();
						jQuery('.custom_radio_button label[for="door"]').hide();


						jQuery.each(msg[36], function (index, value) {
							console.log(value);
							if (row_set == '1') {
								jQuery("#instanceCounti").val(value.length);
								jQuery("#instanceCountl").val('0');
								jQuery("#instanceCountu").val('0');
								jQuery("#squere").val('0');

								if (msg[14] == "K3") {
									if (value.heights > 11) {
										row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_OAK/Alu-stolpe-alu_K3_OAK_11.glb";
									} else {
										row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_OAK/Alu-stolpe-alu_K3_OAK_" + value.heights + ".glb";
									}
								} else {
									if (value.heights > 21) {
										row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_SmokedOak/ALUDesign_SilverStolpe_SmokedOak_21.glb";
									} else {
										row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_SmokedOak/ALUDesign_SilverStolpe_SmokedOak_" + value.heights + ".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";
									if (msg[14] == "K3") {
										if (value.heights > 11) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_OAK/Alu-stolpe-alu_K3_OAK_11.glb";
										} else {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_OAK/Alu-stolpe-alu_K3_OAK_" + value.heights + ".glb";
										}
									} else {
										if (value.heights > 21) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_SmokedOak/ALUDesign_SilverStolpe_SmokedOak_21.glb";
										} else {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_SmokedOak/ALUDesign_SilverStolpe_SmokedOak_" + value.heights + ".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";
									if (msg[14] == "K3") {
										if (value.heights > 11) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_OAK/Alu-stolpe-alu_K3_OAK_11.glb";
										} else {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_OAK/Alu-stolpe-alu_K3_OAK_" + value.heights + ".glb";
										}
									} else {
										if (value.heights > 21) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_SmokedOak/ALUDesign_SilverStolpe_SmokedOak_21.glb";
										} else {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_SmokedOak/ALUDesign_SilverStolpe_SmokedOak_" + value.heights + ".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";
									if (msg[14] == "K3") {
										if (value.heights > 11) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_OAK/Alu-stolpe-alu_K3_OAK_11.glb";
										} else {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_OAK/Alu-stolpe-alu_K3_OAK_" + value.heights + ".glb";
										}
									} else {
										if (value.heights > 21) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_SmokedOak/ALUDesign_SilverStolpe_SmokedOak_21.glb";
										} else {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_SmokedOak/ALUDesign_SilverStolpe_SmokedOak_" + value.heights + ".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";

									if (msg[14] == "K3") {
										if (value.heights > 11) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_OAK/Alu-stolpe-alu_K3_OAK_11.glb";
										} else {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_OAK/Alu-stolpe-alu_K3_OAK_" + value.heights + ".glb";
										}
									} else {
										if (value.heights > 21) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_SmokedOak/ALUDesign_SilverStolpe_SmokedOak_21.glb";
										} else {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_SmokedOak/ALUDesign_SilverStolpe_SmokedOak_" + value.heights + ".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";
									if (msg[14] == "K3") {
										if (value.heights > 11) {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_OAK/Alu-stolpe-alu_K3_OAK_11.glb";
										} else {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_OAK/Alu-stolpe-alu_K3_OAK_" + value.heights + ".glb";
										}
									} else {
										if (value.heights > 21) {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_SmokedOak/ALUDesign_SilverStolpe_SmokedOak_21.glb";
										} else {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_SmokedOak/ALUDesign_SilverStolpe_SmokedOak_" + value.heights + ".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";
									if (msg[14] == "K3") {
										if (value.heights > 11) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_OAK/Alu-stolpe-alu_K3_OAK_11.glb";
										} else {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_OAK/Alu-stolpe-alu_K3_OAK_" + value.heights + ".glb";
										}
									} else {
										if (value.heights > 21) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_SmokedOak/ALUDesign_SilverStolpe_SmokedOak_21.glb";
										} else {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_SmokedOak/ALUDesign_SilverStolpe_SmokedOak_" + value.heights + ".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";

									if (msg[14] == "K3") {
										if (value.heights > 11) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_OAK/Alu-stolpe-alu_K3_OAK_11.glb";
										} else {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_OAK/Alu-stolpe-alu_K3_OAK_" + value.heights + ".glb";
										}
									} else {
										if (value.heights > 21) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_SmokedOak/ALUDesign_SilverStolpe_SmokedOak_21.glb";
										} else {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_SmokedOak/ALUDesign_SilverStolpe_SmokedOak_" + value.heights + ".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";
									if (msg[14] == "K3") {
										if (value.heights > 11) {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_OAK/Alu-stolpe-alu_K3_OAK_11.glb";
										} else {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_OAK/Alu-stolpe-alu_K3_OAK_" + value.heights + ".glb";
										}
									} else {
										if (value.heights > 21) {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_SmokedOak/ALUDesign_SilverStolpe_SmokedOak_21.glb";
										} else {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_SmokedOak/ALUDesign_SilverStolpe_SmokedOak_" + value.heights + ".glb";
										}
									}
								} else if (index == '3') {
									jQuery("#squere").val(value.length);
									if (msg[14] == "K3") {
										if (value.heights > 11) {
											row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_OAK/Alu-stolpe-alu_K3_OAK_11.glb";
										} else {
											row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_OAK/Alu-stolpe-alu_K3_OAK_" + value.heights + ".glb";
										}
									} else {
										//row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
										if (value.heights > 21) {
											row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_SmokedOak/ALUDesign_SilverStolpe_SmokedOak_21.glb";
										} else {
											row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_SmokedOak/ALUDesign_SilverStolpe_SmokedOak_" + value.heights + ".glb";
										}
									}
								}
							}
						});

					}
					else if (msg[35] == 'sanded_black_alu') {
						//jQuery('.custom_glb_type').val('Smoked_Oak');
						jQuery('.custom_glb_type option[color="Sanded_Black"]').hide();
						jQuery('.custom_glb_type option[color="Smoked_Oak"]').show();
						jQuery('.custom_glb_type option[color="hardwood"]').show();
						jQuery('.custom_glb_type option[color="black"]').show();
						jQuery('.custom_glb_type option[color="gray"]').show();


						jQuery('.custom_radio_button input#door').hide();
						jQuery('.custom_radio_button label[for="door"]').hide();


						jQuery.each(msg[36], function (index, value) {
							console.log(value);
							if (row_set == '1') {
								jQuery("#instanceCounti").val(value.length);
								jQuery("#instanceCountl").val('0');
								jQuery("#instanceCountu").val('0');
								jQuery("#squere").val('0');

								if (msg[14] == "K3") {
									if (value.heights > 11) {
										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_11.glb";
									} else {
										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";
									}
								} else {
									if (value.heights > 13) {
										row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_SilverStolpe_k1sanded-fence_1/ALU_SilverStolpe_k1sanded-fence_13.glb";
									} else {
										row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_SilverStolpe_k1sanded-fence_1/ALU_SilverStolpe_k1sanded-fence_" + value.heights + ".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";
									if (msg[14] == "K3") {
										if (value.heights > 11) {
											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_11.glb";
										} else {
											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";
										}
									} else {
										if (value.heights > 13) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_SilverStolpe_k1sanded-fence_1/ALU_SilverStolpe_k1sanded-fence_13.glb";
										} else {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_SilverStolpe_k1sanded-fence_1/ALU_SilverStolpe_k1sanded-fence_" + value.heights + ".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";
									if (msg[14] == "K3") {
										if (value.heights > 11) {
											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_11.glb";
										} else {
											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";
										}
									} else {
										if (value.heights > 13) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_SilverStolpe_k1sanded-fence_1/ALU_SilverStolpe_k1sanded-fence_13.glb";
										} else {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_SilverStolpe_k1sanded-fence_1/ALU_SilverStolpe_k1sanded-fence_" + value.heights + ".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";
									if (msg[14] == "K3") {
										if (value.heights > 11) {
											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_11.glb";
										} else {
											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";
										}
									} else {
										if (value.heights > 13) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_SilverStolpe_k1sanded-fence_1/ALU_SilverStolpe_k1sanded-fence_13.glb";
										} else {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_SilverStolpe_k1sanded-fence_1/ALU_SilverStolpe_k1sanded-fence_" + value.heights + ".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";

									if (msg[14] == "K3") {
										if (value.heights > 11) {
											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_11.glb";
										} else {
											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";
										}
									} else {
										if (value.heights > 13) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_SilverStolpe_k1sanded-fence_1/ALU_SilverStolpe_k1sanded-fence_13.glb";
										} else {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_SilverStolpe_k1sanded-fence_1/ALU_SilverStolpe_k1sanded-fence_" + value.heights + ".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";
									if (msg[14] == "K3") {
										if (value.heights > 11) {
											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_11.glb";
										} else {
											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";
										}
									} else {
										if (value.heights > 13) {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_SilverStolpe_k1sanded-fence_1/ALU_SilverStolpe_k1sanded-fence_13.glb";
										} else {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_SilverStolpe_k1sanded-fence_1/ALU_SilverStolpe_k1sanded-fence_" + value.heights + ".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";
									if (msg[14] == "K3") {
										if (value.heights > 11) {
											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_11.glb";
										} else {
											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";
										}
									} else {
										if (value.heights > 13) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_SilverStolpe_k1sanded-fence_1/ALU_SilverStolpe_k1sanded-fence_13.glb";
										} else {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_SilverStolpe_k1sanded-fence_1/ALU_SilverStolpe_k1sanded-fence_" + value.heights + ".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";

									if (msg[14] == "K3") {
										if (value.heights > 11) {
											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_11.glb";
										} else {
											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";
										}
									} else {
										if (value.heights > 13) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_SilverStolpe_k1sanded-fence_1/ALU_SilverStolpe_k1sanded-fence_13.glb";
										} else {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_SilverStolpe_k1sanded-fence_1/ALU_SilverStolpe_k1sanded-fence_" + value.heights + ".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";
									if (msg[14] == "K3") {
										if (value.heights > 11) {
											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_11.glb";
										} else {
											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";
										}
									} else {
										if (value.heights > 13) {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_SilverStolpe_k1sanded-fence_1/ALU_SilverStolpe_k1sanded-fence_13.glb";
										} else {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_SilverStolpe_k1sanded-fence_1/ALU_SilverStolpe_k1sanded-fence_" + value.heights + ".glb";
										}
									}
								} else if (index == '3') {
									jQuery("#squere").val(value.length);
									if (msg[14] == "K3") {
										if (value.heights > 11) {
											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_11.glb";
										} else {
											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";
										}
									} else {
										//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_SilverStolpe_k1sanded-fence_1/ALU_SilverStolpe_k1sanded-fence_13.glb";
										} else {
											row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_SilverStolpe_k1sanded-fence_1/ALU_SilverStolpe_k1sanded-fence_" + value.heights + ".glb";
										}
									}
								}
							}
						});

					}
					else if (msg[35] == 'sanded_black_alu_black') {
						//jQuery('.custom_glb_type').val('Smoked_Oak');
						jQuery('.custom_glb_type option[color="Sanded_Black"]').hide();
						jQuery('.custom_glb_type option[color="Smoked_Oak"]').show();
						jQuery('.custom_glb_type option[color="hardwood"]').show();
						jQuery('.custom_glb_type option[color="black"]').show();
						jQuery('.custom_glb_type option[color="gray"]').show();


						jQuery('.custom_radio_button input#door').hide();
						jQuery('.custom_radio_button label[for="door"]').hide();


						jQuery.each(msg[36], function (index, value) {
							console.log(value);
							if (row_set == '1') {
								jQuery("#instanceCounti").val(value.length);
								jQuery("#instanceCountl").val('0');
								jQuery("#instanceCountu").val('0');
								jQuery("#squere").val('0');

								if (msg[14] == "K3") {
									if (value.heights > 11) {
										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_11.glb";
									} else {
										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";
									}
								} else {
									if (value.heights > 13) {
										row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_13.glb";
									} else {
										row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_" + value.heights + ".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";
									if (msg[14] == "K3") {
										if (value.heights > 11) {
											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_11.glb";
										} else {
											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";
										}
									} else {
										if (value.heights > 13) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_13.glb";
										} else {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_" + value.heights + ".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";
									if (msg[14] == "K3") {
										if (value.heights > 11) {
											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_11.glb";
										} else {
											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";
										}
									} else {
										if (value.heights > 13) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_13.glb";
										} else {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_" + value.heights + ".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";
									if (msg[14] == "K3") {
										if (value.heights > 11) {
											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_11.glb";
										} else {
											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";
										}
									} else {
										if (value.heights > 13) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_13.glb";
										} else {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_" + value.heights + ".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";

									if (msg[14] == "K3") {
										if (value.heights > 11) {
											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_11.glb";
										} else {
											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";
										}
									} else {
										if (value.heights > 13) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_13.glb";
										} else {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_" + value.heights + ".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";
									if (msg[14] == "K3") {
										if (value.heights > 11) {
											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_11.glb";
										} else {
											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";
										}
									} else {
										if (value.heights > 13) {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_13.glb";
										} else {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_" + value.heights + ".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";
									if (msg[14] == "K3") {
										if (value.heights > 11) {
											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_11.glb";
										} else {
											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";
										}
									} else {
										if (value.heights > 13) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_13.glb";
										} else {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_" + value.heights + ".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";

									if (msg[14] == "K3") {
										if (value.heights > 11) {
											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_11.glb";
										} else {
											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";
										}
									} else {
										if (value.heights > 13) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_13.glb";
										} else {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_" + value.heights + ".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";
									if (msg[14] == "K3") {
										if (value.heights > 11) {
											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_11.glb";
										} else {
											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";
										}
									} else {
										if (value.heights > 13) {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_13.glb";
										} else {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_" + value.heights + ".glb";
										}
									}
								} else if (index == '3') {
									jQuery("#squere").val(value.length);
									if (msg[14] == "K3") {
										if (value.heights > 11) {
											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_11.glb";
										} else {
											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";
										}
									} else {
										//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_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_13.glb";
										} else {
											row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_k1sanded-fence_1/ALU_BlackStolpe_k1sanded-fence_" + value.heights + ".glb";
										}
									}
								}
							}
						});

					}
					else if (msg[35] == 'hardwood_alu') {
						//jQuery('.custom_glb_type').val('hardwood');
						jQuery('.custom_glb_type option[color="hardwood"]').hide();
						jQuery('.custom_glb_type option[color="Smoked_Oak"]').show();
						jQuery('.custom_glb_type option[color="black"]').show();
						jQuery('.custom_glb_type option[color="gray"]').show();

						jQuery('.custom_radio_button input#door').hide();
						jQuery('.custom_radio_button label[for="door"]').hide();


						jQuery.each(msg[36], function (index, value) {
							console.log(value);
							if (row_set == '1') {
								jQuery("#instanceCounti").val(value.length);
								jQuery("#instanceCountl").val('0');
								jQuery("#instanceCountu").val('0');
								jQuery("#squere").val('0');
								if (msg[14] == "K3") {
									if (value.heights > 11) {
										row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_Hardwood/Alu-stolpe-alu_K3_Hardwood_11.glb";
									} else {
										row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_Hardwood/Alu-stolpe-alu_K3_Hardwood_" + value.heights + ".glb";
									}



								} else {

									if (value.heights > 21) {
										row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_Hardwood/ALUDesign_SilverStolpe_Hardwood_21.glb";
									} else {
										row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_Hardwood/ALUDesign_SilverStolpe_Hardwood_" + value.heights + ".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";
									if (msg[14] == "K3") {
										if (value.heights > 11) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_Hardwood/Alu-stolpe-alu_K3_Hardwood_11.glb";
										} else {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_Hardwood/Alu-stolpe-alu_K3_Hardwood_" + value.heights + ".glb";
										}
									} else {
										if (value.heights > 21) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_Hardwood/ALUDesign_SilverStolpe_Hardwood_21.glb";
										} else {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_Hardwood/ALUDesign_SilverStolpe_Hardwood_" + value.heights + ".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";
									if (msg[14] == "K3") {
										if (value.heights > 11) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_Hardwood/Alu-stolpe-alu_K3_Hardwood_11.glb";
										} else {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_Hardwood/Alu-stolpe-alu_K3_Hardwood_" + value.heights + ".glb";
										}
									} else {
										if (value.heights > 21) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_Hardwood/ALUDesign_SilverStolpe_Hardwood_21.glb";
										} else {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_Hardwood/ALUDesign_SilverStolpe_Hardwood_" + value.heights + ".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";
									if (msg[14] == "K3") {
										if (value.heights > 11) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_Hardwood/Alu-stolpe-alu_K3_Hardwood_11.glb";
										} else {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_Hardwood/Alu-stolpe-alu_K3_Hardwood_" + value.heights + ".glb";
										}
									} else {
										if (value.heights > 21) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_Hardwood/ALUDesign_SilverStolpe_Hardwood_21.glb";
										} else {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_Hardwood/ALUDesign_SilverStolpe_Hardwood_" + value.heights + ".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";

									if (msg[14] == "K3") {
										if (value.heights > 11) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_Hardwood/Alu-stolpe-alu_K3_Hardwood_11.glb";
										} else {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_Hardwood/Alu-stolpe-alu_K3_Hardwood_" + value.heights + ".glb";
										}
									} else {
										if (value.heights > 21) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_Hardwood/ALUDesign_SilverStolpe_Hardwood_21.glb";
										} else {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_Hardwood/ALUDesign_SilverStolpe_Hardwood_" + value.heights + ".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";
									if (msg[14] == "K3") {
										if (value.heights > 11) {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_Hardwood/Alu-stolpe-alu_K3_Hardwood_11.glb";
										} else {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_Hardwood/Alu-stolpe-alu_K3_Hardwood_" + value.heights + ".glb";
										}
									} else {
										if (value.heights > 21) {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_Hardwood/ALUDesign_SilverStolpe_Hardwood_21.glb";
										} else {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_Hardwood/ALUDesign_SilverStolpe_Hardwood_" + value.heights + ".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";
									if (msg[14] == "K3") {
										if (value.heights > 11) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_Hardwood/Alu-stolpe-alu_K3_Hardwood_11.glb";
										} else {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_Hardwood/Alu-stolpe-alu_K3_Hardwood_" + value.heights + ".glb";
										}
									} else {
										if (value.heights > 21) {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_Hardwood/ALUDesign_SilverStolpe_Hardwood_21.glb";
										} else {
											row_url_1 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_Hardwood/ALUDesign_SilverStolpe_Hardwood_" + value.heights + ".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";

									if (msg[14] == "K3") {
										if (value.heights > 11) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_Hardwood/Alu-stolpe-alu_K3_Hardwood_11.glb";
										} else {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_Hardwood/Alu-stolpe-alu_K3_Hardwood_" + value.heights + ".glb";
										}
									} else {


										if (value.heights > 21) {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_Hardwood/ALUDesign_SilverStolpe_Hardwood_21.glb";
										} else {
											row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_Hardwood/ALUDesign_SilverStolpe_Hardwood_" + value.heights + ".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";
									if (msg[14] == "K3") {
										if (value.heights > 11) {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_Hardwood/Alu-stolpe-alu_K3_Hardwood_11.glb";
										} else {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_Hardwood/Alu-stolpe-alu_K3_Hardwood_" + value.heights + ".glb";
										}
									} else {
										if (value.heights > 21) {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_Hardwood/ALUDesign_SilverStolpe_Hardwood_21.glb";
										} else {
											row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_Hardwood/ALUDesign_SilverStolpe_Hardwood_" + value.heights + ".glb";
										}
									}
								} else if (index == '3') {
									jQuery("#squere").val(value.length);
									if (msg[14] == "K3") {
										if (value.heights > 11) {
											row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_Hardwood/Alu-stolpe-alu_K3_Hardwood_11.glb";
										} else {
											row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Done-Alu-stolpe-alu_K3_Hardwood/Alu-stolpe-alu_K3_Hardwood_" + value.heights + ".glb";
										}
									} else {
										//row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
										if (value.heights > 21) {
											row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_Hardwood/ALUDesign_SilverStolpe_Hardwood_21.glb";
										} else {
											row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_Hardwood/ALUDesign_SilverStolpe_Hardwood_" + value.heights + ".glb";
										}
									}
								}
							}
						});

					}
					else if (msg[35] == 'coex_light_alu_black') {

						jQuery('.custom_glb_type option[color="black"]').hide();
						jQuery('.custom_glb_type option[color="gray"]').show();

						jQuery('.custom_glb_type option[color="hardwood"]').show();
						jQuery('.custom_glb_type option[color="Smoked_Oak"]').show();

						jQuery('.custom_radio_button input#door').show();
						jQuery('.custom_radio_button label[for="door"]').show();
						jQuery.each(msg[34], function (index, value) {
							console.log(value);
							if (row_set == '1') {
								jQuery("#instanceCounti").val(value.length);
								jQuery("#instanceCountl").val('0');
								jQuery("#instanceCountu").val('0');
								jQuery("#squere").val('0');

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

									if (value.heights > 13) {

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

									if (value.heights > 13) {
										row_url_2 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/AluLight_black_black_60x60/AluLight_black_black_60x60_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/AluLight_black_black_60x60/AluLight_black_black_60x60_" + value.heights + ".glb";
									if (value.heights > 13) {
										row_url_3 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/AluLight_black_black_60x60/AluLight_black_black_60x60_13.glb";
									}
								} else if (index == '3') {
									jQuery("#squere").val(value.length);
									row_url_4 = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/AluLight_black_black_60x60/AluLight_black_black_60x60_" + 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/AluLight_black_black_60x60/AluLight_black_black_60x60_13.glb";
									}
								}
							}
						});

					}

					console.log(row_url_1);
					fencerowheight = jQuery("#fencetype").val();
					if (fencerowheight != '') {
						myfunction();
					}

					jQuery('.total-tab-finel tr:visible:odd').css('background', '#f5f5f5');
					//jQuery('.total-tab-finel tr:visible:even').css('background', '#FFFFFF'); 

				}

			});



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

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

		});

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



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

		console.log("profil_color" + profil_color);
		console.log("topprofil_color" + topprofil_color);
		console.log("k5_color" + k5_color);
		console.log("alu_product1" + alu_product1);
		console.log("k6_color" + k6_color);
		console.log("k14_color" + k14_color);
		console.log("skruer1_color" + skruer1_color);
		console.log("skruer2_color" + skruer2_color);
		console.log("endekap_color" + endekap_color);
		console.log("topklods_color" + topklods_color);
		console.log("k200_id" + k200_id);


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

		};

		var profil_id = profils[jQuery(".sidebar_calc_box3").find('img').attr('hidfence')].product_id;
		//var profil_variation_id = profils[jQuery("input#model").val()].variations[jQuery("#farve1").val().toLowerCase().replace(" ","_")];hidcolor="Black"
		var profil_variation_id = profils[jQuery(".sidebar_calc_box3").find('img').attr('hidfence')].variations[profil_color];
		var top_profil_id = 0;
		var top_profil_variation_id = 0;
		if (jQuery("#top1").val() != 0) {

			top_profil_id = profils[jQuery(".sidebar_calc_box4").find('img').attr('hidpostsize').replace("hidpostsize", "40x120mm")].product_id;
			top_profil_variation_id = profils[jQuery(".sidebar_calc_box4").find('img').attr('hidpostsize').replace("hidpostsize", "40x120mm")].variations["black"];
		}


		var start_slut_id = start_slut_variation_id = 0;
		if (k200_id == 'K200') {
			start_slut_id = profils["K200"].product_id;
			start_slut_variation_id = profils["K200"].variations[2570];
		} else {
			start_slut_id = profils["K5"].product_id;
			start_slut_variation_id = profils["K5"].variations[k5_color];
		}

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

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

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




		var hornestolper_id = hornestolper_variation_id = 0;

		if (k200_id == 'K200') {
			hornestolper_id = profils["K202"].product_id;
			hornestolper_variation_id = profils["K202"].variations[2570];
		} else {
			hornestolper_id = profils["K7"].product_id;
			//var hornestolper_variation_id = profils["K7"].variations[jQuery("#farve1").val().toLowerCase().replace(" ","_")];
			hornestolper_variation_id = profils["K7"].variations[k7_color];
		}

		var k14stolper_id = profils["K14"].product_id;
		//var k14stolper_variation_id = profils["K14"].variations[jQuery("#farve1").val().toLowerCase().replace(" ","_")];
		var k14stolper_variation_id = profils["K14"].variations[k14_color];
		var skruer1_id = profils["K81"].product_id;
		//var skruer1_variation_id = profils["K81"].variations[jQuery("#farve1").val().toLowerCase().replace(" ","_")];
		//var skruer1_variation_id = 173;
		var skruer1_variation_id = 0;
		var skruer2_id = profils["K82"].product_id;
		//var skruer2_variation_id = profils["K82"].variations[jQuery("#farve1").val().toLowerCase().replace(" ","_")];
		// var skruer2_variation_id = 166;
		var skruer2_variation_id = 0;
		var bundskinne_product_id = 0;
		if (jQuery("#bundskinne_color").val() == "alu") bundskinne_product_id = 1141;
		if (jQuery("#bundskinne_color").val() == "black") bundskinne_product_id = 1142;

		var montageklaeb_product_id = 1151;

		datastring = profil_id + "," + profil_variation_id + "," + jQuery("#fence1").val();
		datastring += "|" + top_profil_id + "," + top_profil_variation_id + "," + jQuery("#top1").val();
		datastring += "|" + bundskinne_product_id + ",0," + jQuery("#alu_bundskinne").val();
		datastring += "|" + montageklaeb_product_id + ",0," + jQuery("#alu_montageklaeb").val();
		datastring += "|" + start_slut_id + "," + start_slut_variation_id + "," + jQuery("#slutstolpe1").val();

		if (jQuery("#alu_design_stlope").val() != "" & jQuery("#alu_design_stlope").val() != "0" && jQuery("#alu_design_stlope").val() != " ") {
			datastring += "|" + kirkedal_id + "," + kirkedal_variation_id + "," + jQuery("#alu_design_stlope").val();
		} else {
			if (k200_id == 'K200') {
				kirkedal_id = profils["K201"].product_id;
				kirkedal_variation_id = profils["K201"].variations[2570];
			} else {
				kirkedal_id = profils["K6"].product_id;
				//var kirkedal_variation_id = profils["K6"].variations[jQuery("#farve1").val().toLowerCase().replace(" ","_")];
				kirkedal_variation_id = profils["K6"].variations[k6_color];
			}
			datastring += "|" + kirkedal_id + "," + kirkedal_variation_id + "," + jQuery("#post1").val();
		}
		datastring += "|" + hornestolper_id + "," + hornestolper_variation_id + "," + jQuery("#stolpe1").val();
		datastring += "|" + k14stolper_id + "," + k14stolper_variation_id + "," + jQuery("#stolpe2").val();
		datastring += "|" + skruer1_id + "," + skruer1_variation_id + "," + jQuery("#topskruer1").val();
		datastring += "|" + skruer2_id + "," + skruer2_variation_id + "," + jQuery("#skruer1").val();
		//var endekap_id = 176;
		var endekap_id = 0;
		var endekap_cnt = jQuery("#endekap1").val();
		datastring += "|" + endekap_id + ",0," + endekap_cnt;
		//var topklods_id = 180;
		var topklods_id = 0;
		var topklods_cnt = jQuery("#topklods1").val();
		datastring += "|" + topklods_id + ",0," + topklods_cnt;
		var power_id = 182;
		var power_cnt = jQuery("#power1").val();
		datastring += "|" + power_id + ",0," + power_cnt;
		var led_id = 184;
		var led_cnt = jQuery("#led1").val();
		datastring += "|" + led_id + ",0," + led_cnt;
		acc1_id = 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();

		if (acc1_cnt != "0" || acc1_cnt != 'undefined') {
			datastring += "|" + acc1_id + "," + acc1_var_id1 + "," + acc1_cnt;
		}
		if (acc2_cnt != "0" || acc2_cnt != 'undefined') {
			datastring += "|" + acc1_id + "," + acc1_var_id2 + "," + acc2_cnt;
		}
		if (acc3_cnt != "0" || acc3_cnt != 'undefined') {
			datastring += "|" + acc3_id + "," + acc3_var_id1 + "," + acc3_cnt;
		}
		if (acc4_cnt != "0" || acc4_cnt != 'undefined') {
			datastring += "|" + acc3_id + "," + acc3_var_id2 + "," + acc4_cnt;
		}

		if (jQuery("#alu_design_stolpefod").val() != "" && jQuery("#alu_design_stolpefod").val() != "0") {
			var alu_design_stolpefod_id = 1165;
			var alu_design_stolpefod_cnt = jQuery("#alu_design_stolpefod").val();
			var alu_design_stolpefod_variation_id = 0;
			//datastring += "|"+alu_design_stolpefod_id+","+alu_design_stolpefod_variation_id;
			datastring += "|" + alu_design_stolpefod_id + "," + alu_design_stolpefod_variation_id + "," + alu_design_stolpefod_cnt;
		}



		//return false;
		jQuery.post("/wp-content/add_to_cart.php", { data: datastring }, function (result) {
			window.location.href = "/new-calculator/";
		});
	}
	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'
		});


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

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

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

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

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

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

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

	function update_calculation() {
		//update calculations
	}

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



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


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

		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: 2418, variations: { black: 2419, hardwood: 2420, smoked_oak: 2421, 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: 1139, variations: { black: 2513, coffee: 2514, dark_teak: 2519, grey: 2515, light_teak: 2516, red: 2517, white: 2518 } },
			//K7:{product_id:150,variations:{black:157,coffee:152,dark_teak:153,grey:158,light_teak:154,red:155,white:159}},
			K7: { product_id: 150, variations: { coffee: 152, dark_teak: 153, grey: 158, light_teak: 154, red: 155, white: 159 } },
			//K14:{product_id:800,variations:{black:801,coffee:802,dark_teak:803,grey:804,light_teak:805,red:806,white:807}},
			K14: { product_id: 800, variations: { coffee: 802, dark_teak: 803, grey: 804, light_teak: 805, red: 806, white: 807 } },
			//K81:{product_id:160,variations:{black:173,coffee:169,dark_teak:170,grey:174,light_teak:171,red:172,white:175}},
			K81: { product_id: 160, variations: { coffee: 169, dark_teak: 170, grey: 174, light_teak: 171, red: 172, white: 175 } },
			//K82:{product_id:160,variations:{black:166,coffee:161,dark_teak:163,grey:168,light_teak:164,red:165,white:167}},
			K82: { product_id: 160, variations: { coffee: 161, dark_teak: 163, grey: 168, light_teak: 164, red: 165, white: 167 } },
			// K200:{product_id:1220,variations:{2238:1343,1906:1344}},
			// K201:{product_id:1221,variations:{2238:1347,1906:1348}},
			// K202:{product_id:1222,variations:{2238:1350,1906:1351}},
			K10: { product_id: 2192, variations: { 2238: 1350, 1906: 1351 } }
		};

		var profil_id = profils[jQuery(".sidebar_calc_box3").find('img').attr('hidfence')].product_id;

		var profil_variation_id = profils[jQuery(".sidebar_calc_box3").find('img').attr('hidfence')].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) {
			//  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_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_1').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_1').val() == 'unset') {
			jQuery("#wqs_alu_pro").val('unset');
		}


		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());
		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('pdfpowersupply').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;
	}


</script>
<script>
	var scene_custom = '';
	var scene = '';
	var xposition_custom = 0;
	var yposition_custom = 0;
	var index_custom = 0;
	var custom_mesh = '';
	var custom_button = '';
	var custom_advancedTexturee = '';
	db = 0;
	row1_array = [];
	row1_array1 = [];
	row2_array = [];
	row2_array1 = [];
	row3_array = [];
	row3_array1 = [];
	row4_array = [];
	row4_array1 = [];
	var custom_type = 'fence';
	color1 = [];
	color2 = [];
	color3 = [];
	color4 = [];
	custom_height_image1 = [];
	custom_height_image2 = [];
	custom_height_image3 = [];
	custom_height_image4 = [];
	function loadarray1(row1_array1, index) {
		data = 0;
		row1_array1.sort();
		row = jQuery.unique(row1_array1);
		jQuery.each(row, function (key, valuee) {
			if (valuee == index) {
				data = parseInt(valuee);

			} else if (index > valuee) {
				data = parseInt(valuee);

			} else if (index < valuee) {
				data = parseInt(valuee);

			} else {
				data = parseInt(valuee);

			}
		});
		return data;
	}
	function loadarray2(row1_array2, index) {
		data = 0;
		row1_array2.sort();
		row = jQuery.unique(row1_array2);
		jQuery.each(row, function (key, valuee) {
			if (valuee == index) {
				data = parseInt(valuee);
			} else if (index > valuee) {
				data = parseInt(valuee);
			} else if (index < valuee) {
				data = parseInt(valuee);

			} else {
				data = parseInt(valuee);
			}
		});
		return data;
	}
	function loadarray3(row1_array3, index) {
		data = 0;
		row1_array3.sort();
		row = jQuery.unique(row1_array3);
		jQuery.each(row, function (key, valuee) {
			if (valuee == index) {
				data = parseInt(valuee);
			} else if (index > valuee) {
				data = parseInt(valuee);
			}
			else if (index < valuee) {
				data = parseInt(valuee);

			} else {
				data = parseInt(valuee);
			}
		});
		return data;
	}
	function loadarray4(row1_array4, index) {
		data = 0;
		row1_array4.sort();
		row = jQuery.unique(row1_array4);
		jQuery.each(row, function (key, valuee) {
			if (valuee == index) {
				data = parseInt(valuee);
			} else if (index > valuee) {
				data = parseInt(valuee);
			} else if (index < valuee) {
				data = parseInt(valuee);

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

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

			var container = new BABYLON.AssetContainer(scene);
			//Create large ground for valley environment
			const largeGroundMat = new BABYLON.StandardMaterial("GroundMat");
			largeGroundMat.backFaceCulling = true;
			largeGroundMat.diffuseTexture = new BABYLON.Texture("https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/grassv2small.png");
			largeGroundMat.specularColor = new BABYLON.Color3(0, 0, 0);
			let instanceCountiw = $("#instanceCounti").val(); //17
			let instanceCountlw = $("#instanceCountl").val(); //12
			let instanceCountuw = $("#instanceCountu").val(); //3
			var squerew = $("#squere").val();
			width = 1;
			heightt = 1;
			positionx = 0;
			positionz = 0;
			if ((instanceCountiw != '' || instanceCountiw != '0') && (instanceCountlw == '' || instanceCountlw == '0') && (instanceCountuw == '' || instanceCountuw == '0') && (squerew == '' || squerew == '0')) {

				for (i = 0; i < instanceCountiw; i++) {

					heightt += 1;

					if (i == 0) {
						positionx = 0;
						positionz += 0;
						heightt += 1;
						width = 2;
					} else {
						positionx += 0.43;
						positionz += 0.75;
						heightt += 1.5;
						width += 1;
					}
				}
				positionx = -0.500;
			} else if ((instanceCountiw != '' || instanceCountiw != '0') && (instanceCountlw != '' || instanceCountlw != '0') && (instanceCountuw == '' || instanceCountuw == '0') && (squerew == '' || squerew == '0')) {

				for (i = 0; i < instanceCountiw; i++) {

					//heightt += 1;

					if (i == 0) {
						positionx = 0;
						positionz += 0;
						heightt += 1;
						//width = 2;
					} else {

						positionz += 0.90;
						//last value 2.8
						heightt += 8;
						// width += 1;
					}
				}
				for (i = 0; i < instanceCountlw; i++) {

					//heightt += 1;

					if (i == 0) {
						// positionx =0;
						//positionz +=0;    
						// heightt += 1;
						// width = 2;
						width = 2;
					} else {
						positionx += 0.83;
						// positionx +=0.43;
						// positionz +=0.90;
						// heightt += 2;
						//last value 2.8
						width += 8;
					}
				}
			} else if ((instanceCountiw != '' || instanceCountiw != '0') && (instanceCountlw != '' || instanceCountlw != '0') && (instanceCountuw != '' || instanceCountuw != '0') && (squerew == '' || squerew == '0')) {

				if (instanceCountiw > instanceCountuw) {
					row3 = instanceCountiw;
				} else {
					row3 = instanceCountuw;
				}
				for (i = 0; i < row3; i++) {

					//heightt += 1;

					if (i == 0) {
						positionx = 0;
						positionz += 0;
						heightt += 1;
						//width = 2;
					} else {

						positionz += 0.90;
						//heightt += 2.8;
						//last value 2.8
						heightt += 8;
						// width += 1;
					}
				}
				for (i = 0; i < instanceCountlw; i++) {

					//heightt += 1;

					if (i == 0) {
						// positionx =0;
						//positionz +=0;    
						// heightt += 1;
						// width = 2;
						width = 2;
					} else {
						positionx += 0.83;
						// positionx +=0.43;
						// positionz +=0.90;
						// heightt += 2;
						//last value 2.8
						width += 8;
					}
				}
			} else if ((instanceCountiw != '' || instanceCountiw != '0') && (instanceCountlw != '' || instanceCountlw != '0') && (instanceCountuw != '' || instanceCountuw != '0') && (squerew != '' || squerew != '0')) {

				if (instanceCountiw > instanceCountuw) {
					row3 = instanceCountiw;
				} else {
					row3 = instanceCountuw;
				}
				for (i = 0; i < row3; i++) {

					// heightt += 1;

					if (i == 0) {
						positionx = 0;
						positionz += 0;
						heightt += 1;
						//width = 2;
					} else {

						positionz += 0.90;
						//last value 2.8
						heightt += 8;
						// width += 1;
					}
				}
				for (i = 0; i < instanceCountlw; i++) {

					//heightt += 1;

					if (i == 0) {
						// positionx =0;
						//positionz +=0;    
						// heightt += 1;
						// width = 2;
						//last value 2.8
						width = 2;
					} else {
						positionx += 0.83;
						// positionx +=0.43;
						// positionz +=0.90;
						// heightt += 2;
						//last value 2.8
						width += 8;
					}
				}
			}

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

			var camera = new BABYLON.ArcRotateCamera("camera1", 0, 0, 10, BABYLON.Vector3.Zero(), scene);
			//const camera = new BABYLON.ArcRotateCamera("camera", -Math.PI / 2, Math.PI / 2.5, 200, new BABYLON.Vector3(0, 0, 0));
			camera.setPosition(new BABYLON.Vector3(10, 5, -15));

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


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

			//var camera = new BABYLON.ArcRotateCamera("camera1", 10, Math.PI / 2, 20, BABYLON.Vector3(-5, 0,-10), scene);
			/*   var light = new BABYLON.HemisphericLight("Light", new BABYLON.Vector3(0, 10, 0), scene);	*/
			/*var grassMaterial = new BABYLON.StandardMaterial(name + "bawl", scene);
			var grassTexture = new BABYLON.GrassProceduralTexture(name + "textbawl", 256, scene);
			grassMaterial.ambientTexture = grassTexture;
	
			var plaasdasne = BABYLON.Mesh.CreatePlane("plane2er3", 20, scene);
	
			plaasdasne.material = grassMaterial;
				plaasdasne.rotate(new BABYLON.Vector3(100, 1.0, 0), 3.15 / 2.0, BABYLON.Space.Local);
			console.log(Math.PI/8);*/
			//mohit
			let instanceCounti = $("#instanceCounti").val(); //17
			let instanceCountl = $("#instanceCountl").val(); //12
			let instanceCountu = $("#instanceCountu").val(); //3
			var squere = $("#squere").val();
			scene.clearColor = BABYLON.Color4(0.5, 0.8, 0.6, 0.8);
			light.intensity = 1;

			var 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;
			console.log(light);
			var updateins = 0;
			let value = 99;
			var position = 0;

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

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

			if (getimagename == "Alu-stolpe-alu_K3_Black" || getimagename == "Done-Alu-stolpe-alu_K3_Hardwood" || getimagename == "Done-Alu-stolpe-alu_K3_OAK" || getimagename == "Done-Alu-stolpe-Black_K3_Black" || getimagename == "Done_Alu-stolpe-Black_K3_OAK" || getimagename == "Done_Alu-stolpe-Black_K3_Hardwood" || getimagename == "ALU_SilverStolpe_k1sanded-fence_1" || getimagename == "ALU_BlackStolpe_k1sanded-fence_1") {

				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 {

				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;

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

						if (row1_array.length > 0) {
							data = loadarray1(row1_array1, index_id1);
							if (color1[index_id1] == 'door') {
								newInstance.position.y = 0.8;
							}

							checkforfence0 = 0;
							door_id0 = 0;
							jQuery.each(color1, function (key, value) {
								if (value == 'door') {
									checkforfence0 = 1;
									door_id0 = key;
								}
							});
							if (checkforfence0 == 1) {
								if (color1[index_id1] == 'door') {
									newInstance.position.z = (index_id1 * -1.83 + 0.43);
								} else {
									if (door_id0 < index_id1) {
										newInstance.position.z = (index_id1 * -1.83 + 0.855);
									} else if (door_id0 > index_id1) {
										newInstance.position.z = (index_id1 * -1.83);
									}
								}
							} else {
								if (getimagename == 'AluLight_black_black_60x60') {
									newInstance.position.z = (index_id1 * -1.55);
								} else {
									newInstance.position.z = (index_id1 * -1.83);
								}
							}
						}
						else {
							if (getimagename == 'AluLight_black_black_60x60') {
								newInstance.position.z = (index_id1 * -1.55);
							} else {
								newInstance.position.z = (index_id1 * -1.83);
							}
						}
						if (getimagename == 'AluLight_black_black_60x60') {
							newInstance.rotate(new BABYLON.Vector3(0, 10, 0), Math.PI * 0.50);
						}
						//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

						if (getimagename == 'ALUDesign_SilverStolpe_Hardwood' || getimagename == 'ALUDesign_BlackStolpe_Hardwood' || getimagename == 'ALUDesign_SilverStolpe_SmokedOak' || getimagename == 'ALUDesign_BlackStolpe_SmokedOak') {
							if (newInstance.position.x == 0) {
								newInstance.position.x = -0.883;

							} else {
								// alert("hello"+newInstance.position.z);
								newInstance.position.x = -0.883;
							}
							if (newInstance.position.z == 0) {
								newInstance.position.z = newInstance.position.z + 0.02;
							} else {
								if (index_id1 <= 1) {
									newInstance.position.z = ((index_id1) * (-1.753));
								} else {
									newInstance.position.z = ((index_id1) * (-1.753)) - 0.02;
								}
							}
						}
						fencecount = counttt[0].split('.');
						if (getimagename == 'ALUDesign_BlackStolpe_Hardwood' || getimagename == 'ALUDesign_BlackStolpe_SmokedOak') {
							console.log("fencecount[0]" + fencecount[0]);
							if (fencecount[0] == 1) {
								newInstance.position.y = 0.27;
							} else if (fencecount[0] == 2) {
								newInstance.position.y = 0.27;
							} else if (fencecount[0] == 3) {
								newInstance.position.y = 0.37;
							} else if (fencecount[0] == 4) {
								newInstance.position.y = 0.479;
							} else if (fencecount[0] == 5) {
								newInstance.position.y = 0.59;
							} else if (fencecount[0] == 6) {
								newInstance.position.y = 0.7;
							} else if (fencecount[0] == 7) {
								newInstance.position.y = 0.81;
							} else if (fencecount[0] == 8) {
								newInstance.position.y = 0.912;
							} else if (fencecount[0] == 9) {
								newInstance.position.y = 1.02;
							} else if (fencecount[0] == 10) {
								newInstance.position.y = 1.12;
							} else if (fencecount[0] == 11) {
								newInstance.position.y = 1.23;
							} else if (fencecount[0] == 13) {
								newInstance.position.y = 1.45;
							} else if (fencecount[0] == 14) {
								newInstance.position.y = 1.56;
							}
							else if (fencecount[0] == 15) {
								newInstance.position.y = 1.67;
							}
							else if (fencecount[0] == 16) {
								newInstance.position.y = 1.78;
							}
							else if (fencecount[0] == 17) {
								newInstance.position.y = 1.89;
							}
							else if (fencecount[0] == 18) {
								newInstance.position.y = 1.99;
							}
							else if (fencecount[0] == 19) {
								newInstance.position.y = 2.1;
							}
							else if (fencecount[0] == 20) {
								newInstance.position.y = 2.21;
							}
							else if (fencecount[0] == 21) {
								newInstance.position.y = 2.31;
							}




						}
						if (getimagename == 'ALUDesign_SilverStolpe_Hardwood' || getimagename == 'ALUDesign_SilverStolpe_SmokedOak') {

							if (fencecount[0] == 1) {
								newInstance.position.y = -0.17;
							} else if (fencecount[0] == 2 || fencecount[0] == 3 || fencecount[0] == 4 || fencecount[0] == 5 || fencecount[0] == 6 || fencecount[0] == 7) {
								newInstance.position.y = -0.17;

							} else if (fencecount[0] == 8) {
								newInstance.position.y = -0.11;
							}
							else if (fencecount[0] == 9) {
								newInstance.position.y = 0;
							}
							else if (fencecount[0] == 10) {
								newInstance.position.y = 0.1;
							}
							else if (fencecount[0] == 11) {
								newInstance.position.y = 0.17;
							}
							else if (fencecount[0] == 13) {
								newInstance.position.y = 0.34;
							}
							else if (fencecount[0] == 14) {
								newInstance.position.y = 0.43;
							}
							else if (fencecount[0] == 15) {
								newInstance.position.y = 0.51;
							}
							else if (fencecount[0] == 16) {
								newInstance.position.y = 0.60;
							}
							else if (fencecount[0] == 17) {
								newInstance.position.y = 0.68;
							}
							else if (fencecount[0] == 18) {
								newInstance.position.y = 0.77;
							}
							else if (fencecount[0] == 19) {
								newInstance.position.y = 0.85;
							}
							else if (fencecount[0] == 20) {
								newInstance.position.y = 0.94;
							} else if (fencecount[0] == 21) {
								newInstance.position.y = 1.016;
							}
							else {
								newInstance.position.y = 1.016;
							}

							//newInstance.rotate(new BABYLON.Vector3(0, 0, 0), 3.14);	




						}

						if (getimagename == 'ALU_BlackStolpe_Grey_updated') {
							fencecount = counttt[0].split('.');
							if (fencecount[0] == 8) {
								newInstance.position.y = -0.56;
							}
						}


						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 == 'AluLight_black_black_60x60') {

								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 = -1.23;
								} else if (fencecount[0] == 2) {
									plane.position.y = -1.17;
								} else if (fencecount[0] == 3) {
									plane.position.y = -1.17;
								} else if (fencecount[0] == 4) {
									plane.position.y = -1.05;
								} else if (fencecount[0] == 5) {
									plane.position.y = -0.9;
								} else if (fencecount[0] == 6 || fencecount[0] == 7) {
									plane.position.y = -0.9;
								} else if (fencecount[0] == 8 || fencecount[0] == 9) {
									plane.position.y = -0.8;
								} else if (fencecount[0] == 10) {
									plane.position.y = -0.6;
								} else if (fencecount[0] == 11 || fencecount[0] == 12) {
									plane.position.y = -0.5;
								} else if (fencecount[0] == 13) {
									plane.position.y = -0.4;
								} else {
									plane.position.y = -0.4;
								}
								plane.position.x = 1.4;
								plane.position.z = -0.1;
								//plane.rotate(new BABYLON.Vector3(0, 90, 0), 1.5);



							}

							else if (getimagename == 'ALUDesign_BlackStolpe_Hardwood' || getimagename == 'ALUDesign_BlackStolpe_SmokedOak') {

								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 = -2.5;
								} else if (fencecount[0] == 11) {
									plane.position.y = -2.5;
								} else if (fencecount[0] == 21) {
									plane.position.y = -2.5;
								} else {
									plane.position.y = -2.5;
								}
								plane.position.x = 0.05;
								plane.position.z = -1.4;
								plane.rotate(new BABYLON.Vector3(0, 90, 0), 1.5);



							}
							else if (getimagename == 'ALUDesign_SilverStolpe_Hardwood' || getimagename == 'ALUDesign_SilverStolpe_SmokedOak') {

								fencecount = counttt[0].split('.');
								console.log("fencecount[0]" + fencecount[0]);
								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.75;
								} else if (fencecount[0] == 2) {
									plane.position.y = 0.75;
								} else if (fencecount[0] == 3) {
									plane.position.y = 0.63;
								} else if (fencecount[0] == 4) {
									plane.position.y = 0.59;
								} else if (fencecount[0] == 5) {
									plane.position.y = 0.49;
								} else if (fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 8 || fencecount[0] == 9 || fencecount[0] == 10) {
									plane.position.y = 0.39;
								} else if (fencecount[0] == 11) {
									plane.position.y = 0.65;
								} else if (fencecount[0] == 12 || fencecount[0] == 13 || fencecount[0] == 14 || fencecount[0] == 15) {
									plane.position.y = 0.9;
								}
								else if (fencecount[0] == 16 || fencecount[0] == 17) {
									plane.position.y = 1.2;
								}
								else if (fencecount[0] == 18 || fencecount[0] == 19 || fencecount[0] == 20) {
									plane.position.y = 1.5;
								}

								else if (fencecount[0] == 21) {
									plane.position.y = 1.5;
								} else {
									plane.position.y = 1.5;
								}
								//plane.position.y = 0;
								plane.position.x = -0.1;
								plane.position.z = 0.9;
								plane.rotate(new BABYLON.Vector3(2, 0, 2), Math.PI / 1);
								plane.scaling = new BABYLON.Vector3(0.63, 1, 1);


							}

							else if (getimagename == 'ALU_SilverStolpe_Black_updated') {
								fencecount = counttt[0].split('.');

								console.log("fencecount" + fencecount[0]);
								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 = -1.14;
								} else if (fencecount[0] == 2) {
									plane.position.y = -1.2;
								} else if (fencecount[0] == 3) {
									plane.position.y = -1.1;
								} else if (fencecount[0] == 4) {
									plane.position.y = -1.1;
								} else if (fencecount[0] == 5) {
									plane.position.y = -1;
								} else if (fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 8) {
									plane.position.y = -0.9;
								} else if (fencecount[0] == 9) {
									plane.position.y = -0.6;
								} else if (fencecount[0] == 10 || fencecount[0] == 11) {
									plane.position.y = -0.5;
								} else {
									plane.position.y = -fenceyposition;
								}
								plane.position.x = 0.05;
								plane.position.z = -1.4;
								plane.rotate(new BABYLON.Vector3(0, 90, 0), 1.5);

							}
							else if (getimagename == 'ALU_SilverStolpe_Grey_Updated') {

								fencecount = counttt[0].split('.');
								console.log(fencecount);
								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 = -1.14;
								} else if (fencecount[0] == 2) {
									plane.position.y = -1.2;
								} else if (fencecount[0] == 3) {
									plane.position.y = -1.1;
								} else if (fencecount[0] == 4) {
									plane.position.y = -1.1;
								} else if (fencecount[0] == 5) {
									plane.position.y = -1;
								} else if (fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 8) {
									plane.position.y = -0.9;
								} else if (fencecount[0] == 9) {
									plane.position.y = -0.6;
								} else if (fencecount[0] == 10 || fencecount[0] == 11) {
									plane.position.y = -0.5;
								} else if (fencecount[0] == 12 || fencecount[0] == 13) {
									plane.position.y = 1.2;
								}
								plane.position.z = -1.4;
								plane.rotate(new BABYLON.Vector3(0, 90, 0), 1.5);


							}
							else if (getimagename == 'ALU_BlackStolpe_Black_Updated') {
								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.47;
								} else if (fencecount[0] == 2) {
									plane.position.y = 0.55;
								} else if (fencecount[0] == 3) {
									plane.position.y = 0.6;
								} else if (fencecount[0] == 4) {
									plane.position.y = -0.8;
								} else if (fencecount[0] == 5) {
									plane.position.y = 0.7;
								} else if (fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 8) {
									plane.position.y = 0.8;
								} else if (fencecount[0] == 9) {
									plane.position.y = 1;
								} else if (fencecount[0] == 11) {
									plane.position.y = -0.3;
								} else if (fencecount[0] == 10 || fencecount[0] == 12 || fencecount[0] == 13) {
									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_BlackStolpe_Grey_updated') {
								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.96;
								} else if (fencecount[0] == 2) {
									plane.position.y = -1.2;
								} else if (fencecount[0] == 3) {
									plane.position.y = -1.1;
								} else if (fencecount[0] == 4) {
									plane.position.y = -1.1;
								} else if (fencecount[0] == 5) {
									plane.position.y = -1;
								} else if (fencecount[0] == 6 || fencecount[0] == 7) {
									plane.position.y = -0.9;
								} else if (fencecount[0] == 8) {
									plane.position.y = -0.2;
								} else if (fencecount[0] == 9) {
									plane.position.y = -0.6;
								} else if (fencecount[0] == 10 || fencecount[0] == 11) {
									plane.position.y = -0.5;
								} else {
									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);
							} else {
								plane.position.y = -0.300;
							}
							fenceimg = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite.png';
						}
						var plane2 = BABYLON.Mesh.CreatePlane("plane2" + 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;
							if (getimagename == 'AluLight_black_black_60x60') {
							} else {
								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 == 'AluLight_black_black_60x60') {

								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 = -1.23;
								} else if (fencecount[0] == 2) {
									plane2.position.y = -1.17;
								} else if (fencecount[0] == 3) {
									plane2.position.y = -1.17;
								} else if (fencecount[0] == 4) {
									plane2.position.y = -1.05;
								} else if (fencecount[0] == 5) {
									plane2.position.y = -0.9;
								} else if (fencecount[0] == 6 || fencecount[0] == 7) {
									plane2.position.y = -0.9;
								} else if (fencecount[0] == 8 || fencecount[0] == 9) {
									plane2.position.y = -0.8;
								} else if (fencecount[0] == 10) {
									plane2.position.y = -0.6;
								} else if (fencecount[0] == 11 || fencecount[0] == 12) {
									plane2.position.y = -0.5;
								} else if (fencecount[0] == 13) {
									plane2.position.y = -0.4;
								} else {
									plane2.position.y = -0.4;
								}

							}
							else if (getimagename == 'ALUDesign_BlackStolpe_Hardwood' || getimagename == 'ALUDesign_BlackStolpe_SmokedOak') {

								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 = -2.5;
								} else if (fencecount[0] == 11) {
									plane2.position.y = -2.5;
								} else if (fencecount[0] == 21) {
									plane2.position.y = -2.5;
								} else {
									plane2.position.y = -2.5;
								}
								plane2.position.x = 0.5;
								//plane2.position.y =-fenceyposition;

							}

							else if (getimagename == 'ALUDesign_SilverStolpe_Hardwood' || getimagename == 'ALUDesign_SilverStolpe_SmokedOak') {

								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.75;
								} else if (fencecount[0] == 2) {
									plane2.position.y = 0.75;
								} else if (fencecount[0] == 3) {
									plane2.position.y = 0.63;
								} else if (fencecount[0] == 4) {
									plane2.position.y = 0.59;
								} else if (fencecount[0] == 5) {
									plane2.position.y = 0.49;
								} else if (fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 8 || fencecount[0] == 9 || fencecount[0] == 10) {
									plane2.position.y = 0.39;
								} else if (fencecount[0] == 11) {
									plane2.position.y = 0.65;
								} else if (fencecount[0] == 12 || fencecount[0] == 13 || fencecount[0] == 14 || fencecount[0] == 15) {
									plane2.position.y = 0.9;
								}
								else if (fencecount[0] == 16 || fencecount[0] == 17) {
									plane2.position.y = 1.2;
								}
								else if (fencecount[0] == 18 || fencecount[0] == 19 || fencecount[0] == 20) {
									plane2.position.y = 1.5;
								}

								else if (fencecount[0] == 21) {
									plane2.position.y = 1.5;
								} else {
									plane2.position.y = 1.5;
								}
								plane2.position.x = 0.1;
								plane2.position.z = 0;
								//plane2.position.y =0;
								plane2.rotate(new BABYLON.Vector3(0, 0, 2), Math.PI / 1);
								plane2.scaling = new BABYLON.Vector3(0.63, 1, 1);
								//plane2.rotate(new BABYLON.Vector3(0, 90, 0), 1.5);	


							}

							else if (getimagename == 'ALU_SilverStolpe_Black_updated') {
								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 = -1.14;
								} else if (fencecount[0] == 2) {
									plane2.position.y = -1.2;
								} else if (fencecount[0] == 3) {
									plane2.position.y = -1.1;
								} else if (fencecount[0] == 4) {
									plane2.position.y = -1.1;
								} else if (fencecount[0] == 5) {
									plane2.position.y = -1;
								} else if (fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 8) {
									plane2.position.y = -0.9;
								} else if (fencecount[0] == 9) {
									plane2.position.y = -0.6;
								} else if (fencecount[0] == 10 || fencecount[0] == 11) {
									plane2.position.y = -0.5;
								} else {
									plane2.position.y = -fenceyposition;

								}
								plane2.position.x = 0.5;
								//plane2.position.y =-fenceyposition;
							}
							else if (getimagename == 'ALU_SilverStolpe_Grey_Updated') {

								fencecount = counttt[0].split('.');
								if (fencecount[0] == 1) {
									plane2.position.y = -1.14;
								} else if (fencecount[0] == 2) {
									plane2.position.y = -1.2;
								} else if (fencecount[0] == 3) {
									plane2.position.y = -1.1;
								} else if (fencecount[0] == 4) {
									plane2.position.y = -1.1;
								} else if (fencecount[0] == 5) {
									plane2.position.y = -1;
								} else if (fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 8) {
									plane2.position.y = -0.9;
								} else if (fencecount[0] == 9) {
									plane2.position.y = -0.6;
								} else if (fencecount[0] == 10 || fencecount[0] == 11) {
									plane2.position.y = -0.5;
								} else if (fencecount[0] == 12 || fencecount[0] == 13) {
									plane2.position.y = 1.2;
								}

							}
							else if (getimagename == 'ALU_BlackStolpe_Black_Updated') {
								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.47;
								} else if (fencecount[0] == 2) {
									plane2.position.y = 0.55;
								} else if (fencecount[0] == 3) {
									plane2.position.y = 0.6;
								} else if (fencecount[0] == 4) {
									plane2.position.y = -0.8;
								} else if (fencecount[0] == 5) {
									plane2.position.y = 0.7;
								} else if (fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 8) {
									plane2.position.y = 0.8;
								} else if (fencecount[0] == 9) {
									plane2.position.y = 1;
								} else if (fencecount[0] == 11) {
									plane2.position.y = -0.3;
								} else if (fencecount[0] == 10 || fencecount[0] == 12 || fencecount[0] == 13) {
									plane2.position.y = 1.2;
								}

							}
							else if (getimagename == 'ALU_BlackStolpe_Grey_updated') {


								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.96;
								} else if (fencecount[0] == 2) {
									plane2.position.y = -1.2;
								} else if (fencecount[0] == 3) {
									plane2.position.y = -1.1;
								} else if (fencecount[0] == 4) {
									plane2.position.y = -1.1;
								} else if (fencecount[0] == 5) {
									plane2.position.y = -1;
								} else if (fencecount[0] == 6 || fencecount[0] == 7) {
									plane2.position.y = -0.9;
								} else if (fencecount[0] == 8) {
									plane2.position.y = -0.2;
								} else if (fencecount[0] == 9) {
									plane2.position.y = -0.6;
								} else if (fencecount[0] == 10 || fencecount[0] == 11) {
									plane2.position.y = -0.5;
								} else {
									plane2.position.y = 1.2;
								}

							} else {
								plane2.position.y = -0.300;


							}
							if (getimagename == 'ALUDesign_SilverStolpe_Hardwood' || getimagename == 'ALUDesign_SilverStolpe_SmokedOak') {
								plane2.position.x = 0.1;
								plane2.position.z = -0.9;
								//plane2.position.y =0;


							} else {
								if (getimagename == 'AluLight_black_black_60x60') {
									plane2.position.x = 1.4;
									plane2.position.z = 0.1;
								} else {
									plane2.position.x = 0.3;
									plane2.position.z = 1.300;
								}
							}
							fenceimg1 = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite.png';
						}
						var advancedTexture = BABYLON.GUI.AdvancedDynamicTexture.CreateForMesh(plane);
						var advancedTexture2 = BABYLON.GUI.AdvancedDynamicTexture.CreateForMesh(plane2);

						var rect1 = new BABYLON.GUI.Rectangle();
						// console.log("------------");
						// console.log(rect1);
						// console.log(rect1._verticalAlignment);
						//console.log("------------");

						rect1.width = "70px";
						rect1.height = "70px";
						rect1.thickness = 0;
						rect1.value = index_id1;
						rect1.background = "#fff0";
						//rect1.horizontalAlignment = 3;
						// rect1.verticalAlignment = 3; 
						//rect1.horizontalAlignment = 2;
						//rect1.verticalAlignment = 2;
						//  console.log("------------");
						// console.log(rect1);
						// console.log(rect1._verticalAlignment);
						//console.log("------------");          
						advancedTexture.addControl(rect1);


						var rect2 = new BABYLON.GUI.Rectangle();
						rect2.width = "70px";
						rect2.height = "70px";
						rect2.thickness = 0;
						rect2.value = index_id1;
						advancedTexture2.addControl(rect2);

						var button1 = 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://kirkedal.nl/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 {
								if (getimagename == 'AluLight_black_black_60x60') {
									newInstancel.rotate(new BABYLON.Vector3(0, 0, 0), Math.PI * 0.50);

								} 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 {
								if (getimagename == 'AluLight_black_black_60x60') {
									newInstancel.position.x = (index_id22 * 1.55) - 0.141;
								} else {
									newInstancel.position.x = (index_id22 * 1.83);
								}
							}

						} else {
							if (getimagename == 'AluLight_black_black_60x60') {
								newInstancel.rotate(new BABYLON.Vector3(0, 0, 0), Math.PI * 0.50);
								newInstancel.position.x = (index_id22 * 1.55) - 0.141;

							} else {
								newInstancel.rotate(new BABYLON.Vector3(0, 1, 0), Math.PI * 0.50);
								newInstancel.position.x = index_id22 * 1.83;
							}

						}
						if (getimagename == 'ALUDesign_SilverStolpe_Hardwood' || getimagename == 'ALUDesign_BlackStolpe_Hardwood' || getimagename == 'ALUDesign_SilverStolpe_SmokedOak' || getimagename == 'ALUDesign_BlackStolpe_SmokedOak') {

							if (newInstancel.position.x == 0) {
								newInstancel.position.x = 0;
							} else {
								newInstancel.position.x = ((index_id22) * (1.77));
							}
						}
						//if(getimagename ==  'ALUDesign_BlackStolpe_Hardwood')
						//							{
						//							//newInstancel.position.y = 0.5;
						//							newInstancel.position.y = -0.5;
						//							//newInstancel.position.y = -0.17;
						//							newInstancel.rotate(new BABYLON.Vector3(0, 0, 180), 3.14);
						//							}

						//	if(getimagename ==  'ALUDesign_BlackStolpe_Hardwood')
						//							{ //alert('hello');
						//							
						//							//newInstance.position.y = 0.5;
						//							//newInstance.position.y = -0.5;
						//							//newInstance.position.y = -0.17;
						//							//newInstance.rotate(new BABYLON.Vector3(0, 0, 180), 3.14);	
						//							fencecount = counttt[0].split('.');
						//							console.log("fencecount-2-"+fencecount[0]);
						//							
						//							if(fencecount[0]==1){
						//							newInstancel.position.y = -0.5;
						//							}else if(fencecount[0]==2){
						//							newInstancel.position.y = -0.5;
						//							}else if(fencecount[0]==3){
						//							newInstancel.position.y = -0.5;
						//							}else if(fencecount[0]==4){
						//							newInstancel.position.y = -0.5;
						//							}else if(fencecount[0]==6){
						//							newInstancel.position.y = 0.7;
						//							}else if(fencecount[0]==11){
						//							newInstancel.position.y = 1.23;
						//							}else if(fencecount[0]==21){
						//							newInstancel.position.y = 2.31;
						//							}
						//							
						//							}else if(getimagename ==  'ALUDesign_SilverStolpe_Hardwood')
						//							{ //alert('hello');
						//							
						//							
						//							newInstancel.position.y = 0.8;
						//							
						//							 newInstancel.rotate(new BABYLON.Vector3(0, 0, 1),3.14);
						//								
						//						 	
						//							
						//							
						//							
						//							
						//							}
						//							else if(getimagename ==  'ALUDesign_SilverStolpe_SmokedOak')
						//							{ //alert('hello');
						//							newInstancel.position.y = 0.8;	
						//							 newInstancel.rotate(new BABYLON.Vector3(0, 0, 1),3.14);
						//							
						//							
						//							
						//							
						//							
						//							}
						if (getimagename == 'ALUDesign_BlackStolpe_Hardwood' || getimagename == 'ALUDesign_BlackStolpe_SmokedOak') {
							console.log("fencecount[0]" + fencecount[0]);
							if (fencecount[0] == 1) {
								newInstancel.position.y = 0.27;
							} else if (fencecount[0] == 2) {
								newInstancel.position.y = 0.27;
							} else if (fencecount[0] == 3) {
								newInstancel.position.y = 0.37;
							} else if (fencecount[0] == 4) {
								newInstancel.position.y = 0.479;
							} else if (fencecount[0] == 5) {
								newInstancel.position.y = 0.59;
							} else if (fencecount[0] == 6) {
								newInstancel.position.y = 0.7;
							} else if (fencecount[0] == 7) {
								newInstancel.position.y = 0.81;
							} else if (fencecount[0] == 8) {
								newInstancel.position.y = 0.912;
							} else if (fencecount[0] == 9) {
								newInstancel.position.y = 1.02;
							} else if (fencecount[0] == 10) {
								newInstancel.position.y = 1.12;
							} else if (fencecount[0] == 11) {
								newInstancel.position.y = 1.23;
							} else if (fencecount[0] == 13) {
								newInstancel.position.y = 1.45;
							} else if (fencecount[0] == 14) {
								newInstancel.position.y = 1.56;
							}
							else if (fencecount[0] == 15) {
								newInstancel.position.y = 1.67;
							}
							else if (fencecount[0] == 16) {
								newInstancel.position.y = 1.78;
							}
							else if (fencecount[0] == 17) {
								newInstancel.position.y = 1.89;
							}
							else if (fencecount[0] == 18) {
								newInstancel.position.y = 1.99;
							}
							else if (fencecount[0] == 19) {
								newInstancel.position.y = 2.1;
							}
							else if (fencecount[0] == 20) {
								newInstancel.position.y = 2.21;
							}
							else if (fencecount[0] == 21) {
								newInstancel.position.y = 2.31;
							}




						}
						if (getimagename == 'ALUDesign_SilverStolpe_Hardwood' || getimagename == 'ALUDesign_SilverStolpe_SmokedOak') {

							if (fencecount[0] == 1) {
								newInstancel.position.y = -0.17;
							} else if (fencecount[0] == 2 || fencecount[0] == 3 || fencecount[0] == 4 || fencecount[0] == 5 || fencecount[0] == 6 || fencecount[0] == 7) {
								newInstancel.position.y = -0.17;

							} else if (fencecount[0] == 8) {
								newInstancel.position.y = -0.11;
							}
							else if (fencecount[0] == 9) {
								newInstancel.position.y = 0;
							}
							else if (fencecount[0] == 10) {
								newInstancel.position.y = 0.1;
							}
							else if (fencecount[0] == 11) {
								newInstancel.position.y = 0.17;
							}
							else if (fencecount[0] == 13) {
								newInstancel.position.y = 0.34;
							}
							else if (fencecount[0] == 14) {
								newInstancel.position.y = 0.43;
							}
							else if (fencecount[0] == 15) {
								newInstancel.position.y = 0.51;
							}
							else if (fencecount[0] == 16) {
								newInstancel.position.y = 0.60;
							}
							else if (fencecount[0] == 17) {
								newInstancel.position.y = 0.68;
							}
							else if (fencecount[0] == 18) {
								newInstancel.position.y = 0.77;
							}
							else if (fencecount[0] == 19) {
								newInstancel.position.y = 0.85;
							}
							else if (fencecount[0] == 20) {
								newInstancel.position.y = 0.94;
							} else if (fencecount[0] == 21) {
								newInstancel.position.y = 1.016;
							}
							else {
								newInstancel.position.y = 1.016;
							}

							//newInstancel.rotate(new BABYLON.Vector3(0, 0, 1),3.14);	




						}

						//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

						if (getimagename == 'AluLight_black_black_60x60') {
							newInstancel.position.z = 0.77;
						} else {
							newInstancel.position.z = 0.915;
						}
						var plane = BABYLON.Mesh.CreatePlane("planel" + 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 {
							if (getimagename == 'AluLight_black_black_60x60') {
							} else {
								plane.rotate(new BABYLON.Vector3(0, 0.2, 0), 1.5);
							}
							if (getimagename == 'AluLight_black_black_60x60') {
								plane.position.x = 1.4;
							} else {
								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 == 'AluLight_black_black_60x60') {
								if (fencecount[0] == 1) {
									plane.position.y = -1.23;
								} else if (fencecount[0] == 2) {
									plane.position.y = -1.17;
								} else if (fencecount[0] == 3) {
									plane.position.y = -1.17;
								} else if (fencecount[0] == 4) {
									plane.position.y = -1.05;
								} else if (fencecount[0] == 5) {
									plane.position.y = -0.9;
								} else if (fencecount[0] == 6 || fencecount[0] == 7) {
									plane.position.y = -0.9;
								} else if (fencecount[0] == 8 || fencecount[0] == 9) {
									plane.position.y = -0.8;
								} else if (fencecount[0] == 10) {
									plane.position.y = -0.6;
								} else if (fencecount[0] == 11 || fencecount[0] == 12) {
									plane.position.y = -0.5;
								} else if (fencecount[0] == 13) {
									plane.position.y = -0.4;
								} else {
									plane.position.y = -0.4;
								}
							}
							else if (getimagename == 'ALUDesign_BlackStolpe_Hardwood' || getimagename == 'ALUDesign_BlackStolpe_SmokedOak') {


								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 = -2.5;
								} else if (fencecount[0] == 11) {
									plane.position.y = -2.5;
								} else if (fencecount[0] == 21) {
									plane.position.y = -2.5;
								} else {
									plane.position.y = -2.5;
								}


							}

							else if (getimagename == 'ALUDesign_SilverStolpe_Hardwood' || getimagename == 'ALUDesign_SilverStolpe_SmokedOak') {


								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.75;
								} else if (fencecount[0] == 2) {
									plane.position.y = 0.75;
								} else if (fencecount[0] == 3) {
									plane.position.y = 0.63;
								} else if (fencecount[0] == 4) {
									plane.position.y = 0.59;
								} else if (fencecount[0] == 5) {
									plane.position.y = 0.49;
								} else if (fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 8 || fencecount[0] == 9 || fencecount[0] == 10) {
									plane.position.y = 0.39;
								} else if (fencecount[0] == 11) {
									plane.position.y = 0.65;
								} else if (fencecount[0] == 12 || fencecount[0] == 13 || fencecount[0] == 14 || fencecount[0] == 15) {
									plane.position.y = 0.9;
								}
								else if (fencecount[0] == 16 || fencecount[0] == 17) {
									plane.position.y = 1.2;
								}
								else if (fencecount[0] == 18 || fencecount[0] == 19 || fencecount[0] == 20) {
									plane.position.y = 1.5;
								}

								else if (fencecount[0] == 21) {
									plane.position.y = 1.5;
								} else {
									plane.position.y = 1.5;
								}
								//plane.position.y =0;	
								plane.position.x = -0.1;
								plane.rotate(new BABYLON.Vector3(0, 0, 2), Math.PI / 1);
								plane.scaling = new BABYLON.Vector3(0.63, 1, 1);
							}


							else if (getimagename == 'ALU_SilverStolpe_Black_updated') {

								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 = -1.14;
								} else if (fencecount[0] == 2) {
									plane.position.y = -1.2;
								} else if (fencecount[0] == 3) {
									plane.position.y = -1.1;
								} else if (fencecount[0] == 4) {
									plane.position.y = -1.1;
								} else if (fencecount[0] == 5) {
									plane.position.y = -1;
								} else if (fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 8) {
									plane.position.y = -0.9;
								} else if (fencecount[0] == 9) {
									plane.position.y = -0.6;
								} else if (fencecount[0] == 10 || fencecount[0] == 11) {
									plane.position.y = -0.5;
								} else {
									plane.position.y = -fenceyposition;
								}

							}
							else if (getimagename == 'ALU_SilverStolpe_Grey_Updated') {
								/*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] == 1) {
									plane.position.y = -1.14;
								} else if (fencecount[0] == 2) {
									plane.position.y = -1.2;
								} else if (fencecount[0] == 3) {
									plane.position.y = -1.1;
								} else if (fencecount[0] == 4) {
									plane.position.y = -1.1;
								} else if (fencecount[0] == 5) {
									plane.position.y = -1;
								} else if (fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 8) {
									plane.position.y = -0.9;
								} else if (fencecount[0] == 9) {
									plane.position.y = -0.6;
								} else if (fencecount[0] == 10 || fencecount[0] == 11) {
									plane.position.y = -0.5;
								} else if (fencecount[0] == 12 || fencecount[0] == 13) {
									plane.position.y = 1.2;
								}

							}
							else if (getimagename == 'ALU_BlackStolpe_Black_Updated') {
								/*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.47;
								} else if (fencecount[0] == 2) {
									plane.position.y = 0.55;
								} else if (fencecount[0] == 3) {
									plane.position.y = 0.6;
								} else if (fencecount[0] == 4) {
									plane.position.y = -0.8;
								} else if (fencecount[0] == 5) {
									plane.position.y = 0.7;
								} else if (fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 8) {
									plane.position.y = 0.8;
								} else if (fencecount[0] == 9) {
									plane.position.y = 1;
								} else if (fencecount[0] == 11) {
									plane.position.y = -0.3;
								} else if (fencecount[0] == 10 || fencecount[0] == 12 || fencecount[0] == 13) {
									plane.position.y = 1.2;
								}
							}
							else if (getimagename == 'ALU_BlackStolpe_Grey_updated') {
								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.96;
								} else if (fencecount[0] == 2) {
									plane.position.y = -1.2;
								} else if (fencecount[0] == 3) {
									plane.position.y = -1.1;
								} else if (fencecount[0] == 4) {
									plane.position.y = -1.1;
								} else if (fencecount[0] == 5) {
									plane.position.y = -1;
								} else if (fencecount[0] == 6 || fencecount[0] == 7) {
									plane.position.y = -0.9;
								} else if (fencecount[0] == 8) {
									plane.position.y = -0.2;
								} else if (fencecount[0] == 9) {
									plane.position.y = -0.6;
								} else if (fencecount[0] == 10 || fencecount[0] == 11) {
									plane.position.y = -0.5;
								} else {
									plane.position.y = 1.2;
								}
							} else {
								plane.position.y = -0.300;
							}
							if (getimagename == 'ALUDesign_SilverStolpe_Hardwood' || getimagename == 'ALUDesign_SilverStolpe_SmokedOak') {
								plane.position.z = 0.9;
							} else {
								if (getimagename == 'AluLight_black_black_60x60') {
									plane.position.z = -0.1;
								} else {
									plane.position.z = -1.35;
								}
							}
							fenceimg = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite.png';
						}

						var plane2se = BABYLON.Mesh.CreatePlane("planel2" + 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 {
							if (getimagename == 'AluLight_black_black_60x60') {
							} else {
								plane2se.rotate(new BABYLON.Vector3(0, 0.2, 0), 4.5);
							}
							if (getimagename == 'AluLight_black_black_60x60') {
								plane2se.position.x = 1.4;
							} else {
								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 == 'AluLight_black_black_60x60') {
								if (fencecount[0] == 1) {
									plane2se.position.y = -1.23;
								} else if (fencecount[0] == 2) {
									plane2se.position.y = -1.17;
								} else if (fencecount[0] == 3) {
									plane2se.position.y = -1.17;
								} else if (fencecount[0] == 4) {
									plane2se.position.y = -1.05;
								} else if (fencecount[0] == 5) {
									plane2se.position.y = -0.9;
								} else if (fencecount[0] == 6 || fencecount[0] == 7) {
									plane2se.position.y = -0.9;
								} else if (fencecount[0] == 8 || fencecount[0] == 9) {
									plane2se.position.y = -0.8;
								} else if (fencecount[0] == 10) {
									plane2se.position.y = -0.6;
								} else if (fencecount[0] == 11 || fencecount[0] == 12) {
									plane2se.position.y = -0.5;
								} else if (fencecount[0] == 13) {
									plane2se.position.y = -0.4;
								} else {
									plane2se.position.y = -0.4;
								}
							}
							else if (getimagename == 'ALUDesign_BlackStolpe_Hardwood' || getimagename == 'ALUDesign_BlackStolpe_SmokedOak') {
								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 = -2.5;
								} else if (fencecount[0] == 11) {
									plane2se.position.y = -2.5;
								} else if (fencecount[0] == 21) {
									plane2se.position.y = -2.5;
								} else {
									plane2se.position.y = -2.5;
								}
							}

							else if (getimagename == 'ALUDesign_SilverStolpe_Hardwood' || getimagename == 'ALUDesign_SilverStolpe_SmokedOak') {
								if (fencecount[0] == 1) {
									plane2se.position.y = 0.75;
								} else if (fencecount[0] == 2) {
									plane2se.position.y = 0.75;
								} else if (fencecount[0] == 3) {
									plane2se.position.y = 0.63;
								} else if (fencecount[0] == 4) {
									plane2se.position.y = 0.59;
								} else if (fencecount[0] == 5) {
									plane2se.position.y = 0.49;
								} else if (fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 8 || fencecount[0] == 9 || fencecount[0] == 10) {
									plane2se.position.y = 0.39;
								} else if (fencecount[0] == 11) {
									plane2se.position.y = 0.65;
								} else if (fencecount[0] == 12 || fencecount[0] == 13 || fencecount[0] == 14 || fencecount[0] == 15) {
									plane2se.position.y = 0.9;
								}
								else if (fencecount[0] == 16 || fencecount[0] == 17) {
									plane2se.position.y = 1.2;
								}
								else if (fencecount[0] == 18 || fencecount[0] == 19 || fencecount[0] == 20) {
									plane2se.position.y = 1.5;
								}

								else if (fencecount[0] == 21) {
									plane2se.position.y = 1.5;
								} else {
									plane2se.position.y = 1.5;
								}
								plane2se.position.x = 0.1;
								//plane2se.position.y =0;	
								plane2se.rotate(new BABYLON.Vector3(0.3, 0, 2), Math.PI / 1);
								plane2se.scaling = new BABYLON.Vector3(0.63, 1, 1);
							}

							else if (getimagename == 'ALU_BlackStolpe_Grey_updated') {
								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.96;
								} else if (fencecount[0] == 2) {
									plane2se.position.y = -1.2;
								} else if (fencecount[0] == 3) {
									plane2se.position.y = -1.1;
								} else if (fencecount[0] == 4) {
									plane2se.position.y = -1.1;
								} else if (fencecount[0] == 5) {
									plane2se.position.y = -1;
								} else if (fencecount[0] == 6 || fencecount[0] == 7) {
									plane2se.position.y = -0.9;
								} else if (fencecount[0] == 8) {
									plane2se.position.y = -0.2;
								} else if (fencecount[0] == 9) {
									plane2se.position.y = -0.6;
								} else if (fencecount[0] == 10 || fencecount[0] == 11) {
									plane2se.position.y = -0.5;
								} else {
									plane2se.position.y = 1.2;
								}
							}
							else if (getimagename == 'ALU_SilverStolpe_Black_updated') {
								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 = -1.14;
								} else if (fencecount[0] == 2) {
									plane2se.position.y = -1.2;
								} else if (fencecount[0] == 3) {
									plane2se.position.y = -1.1;
								} else if (fencecount[0] == 4) {
									plane2se.position.y = -1.1;
								} else if (fencecount[0] == 5) {
									plane2se.position.y = -1;
								} else if (fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 8) {
									plane2se.position.y = -0.9;
								} else if (fencecount[0] == 9) {
									plane2se.position.y = -0.6;
								} else if (fencecount[0] == 10 || fencecount[0] == 11) {
									plane2se.position.y = -0.5;
								} else {
									plane2se.position.y = -fenceyposition;
								}

							}
							else if (getimagename == 'ALU_SilverStolpe_Grey_Updated') {
								/*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] == 1) {
									plane2se.position.y = -1.14;
								} else if (fencecount[0] == 2) {
									plane2se.position.y = -1.2;
								} else if (fencecount[0] == 3) {
									plane2se.position.y = -1.1;
								} else if (fencecount[0] == 4) {
									plane2se.position.y = -1.1;
								} else if (fencecount[0] == 5) {
									plane2se.position.y = -1;
								} else if (fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 8) {
									plane2se.position.y = -0.9;
								} else if (fencecount[0] == 9) {
									plane2se.position.y = -0.6;
								} else if (fencecount[0] == 10 || fencecount[0] == 11) {
									plane2se.position.y = -0.5;
								} else if (fencecount[0] == 12 || fencecount[0] == 13) {
									plane2se.position.y = 1.2;
								}


							}
							else if (getimagename == 'ALU_BlackStolpe_Black_Updated') {
								if (fencecount[0] == 1) {
									plane2se.position.y = 0.47;
								} else if (fencecount[0] == 2) {
									plane2se.position.y = 0.55;
								} else if (fencecount[0] == 3) {
									plane2se.position.y = 0.6;
								} else if (fencecount[0] == 4) {
									plane2se.position.y = -0.8;
								} else if (fencecount[0] == 5) {
									plane2se.position.y = 0.7;
								} else if (fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 8) {
									plane2se.position.y = 0.8;
								} else if (fencecount[0] == 9) {
									plane2se.position.y = 1;
								} else if (fencecount[0] == 11) {
									plane2se.position.y = -0.3;
								} else if (fencecount[0] == 10 || fencecount[0] == 12 || fencecount[0] == 13) {
									plane2se.position.y = 1.2;
								}
							} else {
								plane2se.position.y = -0.300;
							}
							if (getimagename == 'ALUDesign_SilverStolpe_Hardwood' || getimagename == 'ALUDesign_SilverStolpe_SmokedOak') {
								plane2se.position.z = -0.9;
							} else {
								if (getimagename == 'AluLight_black_black_60x60') {
									plane2se.position.z = 0.1;
								} else {
									plane2se.position.z = 1.400;
								}
							}
							fenceimg1 = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite.png';
						}
						plane2se.width = "70px";
						plane2se.height = "70px";
						var advancedTexturee = BABYLON.GUI.AdvancedDynamicTexture.CreateForMesh(plane);
						var advancedTexturee01 = BABYLON.GUI.AdvancedDynamicTexture.CreateForMesh(plane2se);
						var rect12 = new BABYLON.GUI.Rectangle();
						rect12.width = "70px";
						rect12.height = "70px";
						rect12.cornerRadius = 0;
						rect12.value = index_id;
						rect12.thickness = 0;
						advancedTexturee.addControl(rect12);

						var rect012 = new BABYLON.GUI.Rectangle();
						rect012.width = "70px";
						rect012.height = "70px";
						rect012.cornerRadius = 0;
						rect012.value = index_id;
						rect012.thickness = 0;
						rect012._rotation = 0;
						rect012.horizontal = 'center';
						rect012.vertical = 'center';
						rect012._rotation = 0;
						advancedTexturee01.addControl(rect012);
						var button2 = 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);


						if (getimagename == 'AluLight_black_black_60x60') {
							if (instanceCountl == 1) {
								//newInstanceu3.position.x = instanceCountl*1.83-1.192;
								newInstanceu3.position.x = instanceCountl * 1.55 - 0.915;
							} else {
								//newInstanceu3.position.x = instanceCountl*1.83-1.487;
								newInstanceu3.position.x = instanceCountl * 1.55 - 0.915;
							}
						} else {
							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 {
								if (getimagename == 'AluLight_black_black_60x60') {
									newInstanceu3.position.z = (index_idd3 * -1.55);
								} else {
									newInstanceu3.position.z = (index_idd3 * -1.83);
								}
							}
						} else {
							if (getimagename == 'AluLight_black_black_60x60') {
								newInstanceu3.position.z = (index_idd3 * -1.55);
							} 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 == 'AluLight_black_black_60x60') {
							newInstanceu3.rotate(new BABYLON.Vector3(0, 10, 0), Math.PI * 0.50);

						}

						if (getimagename == 'ALUDesign_SilverStolpe_Hardwood' || getimagename == 'ALUDesign_BlackStolpe_Hardwood' || getimagename == 'ALUDesign_SilverStolpe_SmokedOak' || getimagename == 'ALUDesign_BlackStolpe_SmokedOak') {
							console.log("instanceCountl" + instanceCountl);
							if (instanceCountl <= 2) {
								newInstanceu3.position.x = instanceCountl * 1.83 - 1.005;
							} else {
								newInstanceu3.position.x = instanceCountl * 1.83 - 1.055;
							}

							if (newInstanceu3.position.z == 0) {
								newInstanceu3.position.z = 0.02;
							} else {
								newInstanceu3.position.z = ((index_idd3) * (-1.77));
							}
						}
						//  if(getimagename ==  'ALUDesign_BlackStolpe_Hardwood')
						//							{
						//							//newInstanceu3.position.y = 0.5;
						//							newInstanceu3.position.y = -0.5;
						//							//newInstanceu3.position.y = -0.17;
						//							newInstanceu3.rotate(new BABYLON.Vector3(0, 0, 180), 3.14);
						//							
						//							}
						//if(getimagename ==  'ALUDesign_BlackStolpe_Hardwood')
						//							{ //alert('hello');
						//							
						//							//newInstance.position.y = 0.5;
						//							//newInstance.position.y = -0.5;
						//							//newInstance.position.y = -0.17;
						//							//newInstance.rotate(new BABYLON.Vector3(0, 0, 180), 3.14);	
						//							fencecount = counttt[0].split('.');
						//							console.log("fencecount-3-"+fencecount[0]);
						//							
						//							if(fencecount[0]==1){
						//							newInstanceu3.position.y = -0.5;
						//							}else if(fencecount[0]==2){
						//							newInstanceu3.position.y = -0.5;
						//							}else if(fencecount[0]==3){
						//							newInstanceu3.position.y = -0.5;
						//							}else if(fencecount[0]==4){
						//							newInstanceu3.position.y = -0.5;
						//							}else if(fencecount[0]==6){
						//							newInstanceu3.position.y = 0.7;
						//							}else if(fencecount[0]==11){
						//							newInstanceu3.position.y = 1.23;
						//							}else if(fencecount[0]==21){
						//							newInstanceu3.position.y = 2.31;
						//							}
						//							
						//							}else if(getimagename ==  'ALUDesign_SilverStolpe_Hardwood')
						//							{
						//								
						//								newInstanceu3.position.y = 0.8;
						//								newInstanceu3.rotate(new BABYLON.Vector3(0, 0, 0), 3.14);
						//							}
						//							else if(getimagename ==  'ALUDesign_SilverStolpe_SmokedOak')
						//							{
						//								
						//								newInstanceu3.position.y = 0.8;
						//								newInstanceu3.rotate(new BABYLON.Vector3(0, 0, 0), 3.14);
						//							}
						if (getimagename == 'ALUDesign_BlackStolpe_Hardwood' || getimagename == 'ALUDesign_BlackStolpe_SmokedOak') {
							console.log("fencecount[0]" + fencecount[0]);
							if (fencecount[0] == 1) {
								newInstanceu3.position.y = 0.27;
							} else if (fencecount[0] == 2) {
								newInstanceu3.position.y = 0.27;
							} else if (fencecount[0] == 3) {
								newInstanceu3.position.y = 0.37;
							} else if (fencecount[0] == 4) {
								newInstanceu3.position.y = 0.479;
							} else if (fencecount[0] == 5) {
								newInstanceu3.position.y = 0.59;
							} else if (fencecount[0] == 6) {
								newInstanceu3.position.y = 0.7;
							} else if (fencecount[0] == 7) {
								newInstanceu3.position.y = 0.81;
							} else if (fencecount[0] == 8) {
								newInstanceu3.position.y = 0.912;
							} else if (fencecount[0] == 9) {
								newInstanceu3.position.y = 1.02;
							} else if (fencecount[0] == 10) {
								newInstanceu3.position.y = 1.12;
							} else if (fencecount[0] == 11) {
								newInstanceu3.position.y = 1.23;
							} else if (fencecount[0] == 13) {
								newInstanceu3.position.y = 1.45;
							} else if (fencecount[0] == 14) {
								newInstanceu3.position.y = 1.56;
							}
							else if (fencecount[0] == 15) {
								newInstanceu3.position.y = 1.67;
							}
							else if (fencecount[0] == 16) {
								newInstanceu3.position.y = 1.78;
							}
							else if (fencecount[0] == 17) {
								newInstanceu3.position.y = 1.89;
							}
							else if (fencecount[0] == 18) {
								newInstanceu3.position.y = 1.99;
							}
							else if (fencecount[0] == 19) {
								newInstanceu3.position.y = 2.1;
							}
							else if (fencecount[0] == 20) {
								newInstanceu3.position.y = 2.21;
							}
							else if (fencecount[0] == 21) {
								newInstanceu3.position.y = 2.31;
							}




						}
						if (getimagename == 'ALUDesign_SilverStolpe_Hardwood' || getimagename == 'ALUDesign_SilverStolpe_SmokedOak') {

							if (fencecount[0] == 1) {
								newInstanceu3.position.y = -0.17;
							} else if (fencecount[0] == 2 || fencecount[0] == 3 || fencecount[0] == 4 || fencecount[0] == 5 || fencecount[0] == 6 || fencecount[0] == 7) {
								newInstanceu3.position.y = -0.17;

							} else if (fencecount[0] == 8) {
								newInstanceu3.position.y = -0.11;
							}
							else if (fencecount[0] == 9) {
								newInstanceu3.position.y = 0;
							}
							else if (fencecount[0] == 10) {
								newInstanceu3.position.y = 0.1;
							}
							else if (fencecount[0] == 11) {
								newInstanceu3.position.y = 0.17;
							}
							else if (fencecount[0] == 13) {
								newInstanceu3.position.y = 0.34;
							}
							else if (fencecount[0] == 14) {
								newInstanceu3.position.y = 0.43;
							}
							else if (fencecount[0] == 15) {
								newInstanceu3.position.y = 0.51;
							}
							else if (fencecount[0] == 16) {
								newInstanceu3.position.y = 0.60;
							}
							else if (fencecount[0] == 17) {
								newInstanceu3.position.y = 0.68;
							}
							else if (fencecount[0] == 18) {
								newInstanceu3.position.y = 0.77;
							}
							else if (fencecount[0] == 19) {
								newInstanceu3.position.y = 0.85;
							}
							else if (fencecount[0] == 20) {
								newInstanceu3.position.y = 0.94;
							} else if (fencecount[0] == 21) {
								newInstanceu3.position.y = 1.016;
							}
							else {
								newInstanceu3.position.y = 1.016;
							}

							//newInstanceu3.rotate(new BABYLON.Vector3(0, 0, 0), 3.14);	




						}
						//not used
						var plane = BABYLON.Mesh.CreatePlane("planeu" + 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 {
							if (getimagename == 'AluLight_black_black_60x60') {
							} else {
								plane.rotate(new BABYLON.Vector3(0, 0.2, 0), 1.5);
							}
							if (getimagename == 'AluLight_black_black_60x60') {
								plane.position.x = 1.4;
							} 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;
							}
							if (getimagename == 'AluLight_black_black_60x60') {
								if (fencecount[0] == 1) {
									plane.position.y = -1.23;
								} else if (fencecount[0] == 2) {
									plane.position.y = -1.17;
								} else if (fencecount[0] == 3) {
									plane.position.y = -1.17;
								} else if (fencecount[0] == 4) {
									plane.position.y = -1.05;
								} else if (fencecount[0] == 5) {
									plane.position.y = -0.9;
								} else if (fencecount[0] == 6 || fencecount[0] == 7) {
									plane.position.y = -0.9;
								} else if (fencecount[0] == 8 || fencecount[0] == 9) {
									plane.position.y = -0.8;
								} else if (fencecount[0] == 10) {
									plane.position.y = -0.6;
								} else if (fencecount[0] == 11 || fencecount[0] == 12) {
									plane.position.y = -0.5;
								} else if (fencecount[0] == 13) {
									plane.position.y = -0.4;
								} else {
									plane.position.y = -0.4;
								}
							}
							else if (getimagename == 'ALUDesign_BlackStolpe_Hardwood' || getimagename == 'ALUDesign_BlackStolpe_SmokedOak') {

								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 = -2.5;
								} else if (fencecount[0] == 11) {
									plane.position.y = -2.5;
								} else if (fencecount[0] == 21) {
									plane.position.y = -2.5;
								} else {
									plane.position.y = -2.5;
								}


							}

							else if (getimagename == 'ALUDesign_SilverStolpe_Hardwood' || getimagename == 'ALUDesign_SilverStolpe_SmokedOak') {


								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.75;
								} else if (fencecount[0] == 2) {
									plane.position.y = 0.75;
								} else if (fencecount[0] == 3) {
									plane.position.y = 0.63;
								} else if (fencecount[0] == 4) {
									plane.position.y = 0.59;
								} else if (fencecount[0] == 5) {
									plane.position.y = 0.49;
								} else if (fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 8 || fencecount[0] == 9 || fencecount[0] == 10) {
									plane.position.y = 0.39;
								} else if (fencecount[0] == 11) {
									plane.position.y = 0.65;
								} else if (fencecount[0] == 12 || fencecount[0] == 13 || fencecount[0] == 14 || fencecount[0] == 15) {
									plane.position.y = 0.9;
								}
								else if (fencecount[0] == 16 || fencecount[0] == 17) {
									plane.position.y = 1.2;
								}
								else if (fencecount[0] == 18 || fencecount[0] == 19 || fencecount[0] == 20) {
									plane.position.y = 1.5;
								}

								else if (fencecount[0] == 21) {
									plane.position.y = 1.5;
								} else {
									plane.position.y = 1.5;
								}
								//plane.position.y=0;
								plane.position.x = -0.1;
								plane.rotate(new BABYLON.Vector3(0, 0, 2), Math.PI / 1);
								plane.scaling = new BABYLON.Vector3(0.63, 1, 1);


							}


							else if (getimagename == 'ALU_SilverStolpe_Black_updated') {
								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 = -1.14;
								} else if (fencecount[0] == 2) {
									plane.position.y = -1.2;
								} else if (fencecount[0] == 3) {
									plane.position.y = -1.1;
								} else if (fencecount[0] == 4) {
									plane.position.y = -1.1;
								} else if (fencecount[0] == 5) {
									plane2se.position.y = -1;
								} else if (fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 8) {
									plane.position.y = -0.9;
								} else if (fencecount[0] == 9) {
									plane.position.y = -0.6;
								} else if (fencecount[0] == 10 || fencecount[0] == 11) {
									plane.position.y = -0.5;
								} else {
									plane.position.y = -fenceyposition;
								}

							}
							else if (getimagename == 'ALU_SilverStolpe_Grey_Updated') {
								/*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] == 1) {
									plane.position.y = -1.14;
								} else if (fencecount[0] == 2) {
									plane.position.y = -1.2;
								} else if (fencecount[0] == 3) {
									plane.position.y = -1.1;
								} else if (fencecount[0] == 4) {
									plane.position.y = -1.1;
								} else if (fencecount[0] == 5) {
									plane2se.position.y = -1;
								} else if (fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 8) {
									plane.position.y = -0.9;
								} else if (fencecount[0] == 9) {
									plane.position.y = -0.6;
								} else if (fencecount[0] == 10 || fencecount[0] == 11) {
									plane.position.y = -0.5;
								} else if (fencecount[0] == 12 || fencecount[0] == 13) {
									plane.position.y = 1.2;
								}

							}
							else if (getimagename == 'ALU_BlackStolpe_Black_Updated') {

								if (fencecount[0] == 1) {
									plane.position.y = 0.47;
								} else if (fencecount[0] == 2) {
									plane.position.y = 0.55;
								} else if (fencecount[0] == 3) {
									plane.position.y = 0.6;
								} else if (fencecount[0] == 4) {
									plane.position.y = -0.8;
								} else if (fencecount[0] == 5) {
									plane.position.y = 0.7;
								} else if (fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 8) {
									plane.position.y = 0.8;
								} else if (fencecount[0] == 9) {
									plane.position.y = 1;
								} else if (fencecount[0] == 11) {
									plane.position.y = -0.3;
								} else if (fencecount[0] == 10 || fencecount[0] == 12 || fencecount[0] == 13) {
									plane.position.y = 1.2;
								}
							}
							else if (getimagename == 'ALU_BlackStolpe_Grey_updated') {
								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.96;
								} else if (fencecount[0] == 2) {
									plane.position.y = -1.2;
								} else if (fencecount[0] == 3) {
									plane.position.y = -1.1;
								} else if (fencecount[0] == 4) {
									plane.position.y = -1.1;
								} else if (fencecount[0] == 5) {
									plane.position.y = -1;
								} else if (fencecount[0] == 6 || fencecount[0] == 7) {
									plane.position.y = -0.9;
								} else if (fencecount[0] == 8) {
									plane.position.y = -0.2;
								} else if (fencecount[0] == 9) {
									plane.position.y = -0.6;
								} else if (fencecount[0] == 10 || fencecount[0] == 11) {
									plane.position.y = -0.5;
								} else {
									plane.position.y = 1.2;
								}
							} else {
								plane.position.y = -0.300;
							}
							if (getimagename == 'ALUDesign_SilverStolpe_Hardwood' || getimagename == 'ALUDesign_SilverStolpe_SmokedOak') {
								plane.position.z = 0.9;
							} else {
								if (getimagename == 'AluLight_black_black_60x60') {
									plane.position.z = -0.1;
								} else {
									plane.position.z = -1.35;
								}
							}
							// plane.width = "100px";
							//                   plane.height = "100px";
							fenceimg = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite.png';
						}
						var plane2 = BABYLON.Mesh.CreatePlane("planeu2" + 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 {
							if (getimagename == 'AluLight_black_black_60x60') {
							} 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';

							if (getimagename == 'AluLight_black_black_60x60') {
								plane2.position.x = 1.4;
							} else {
								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 == 'AluLight_black_black_60x60') {
								if (fencecount[0] == 1) {
									plane2.position.y = -1.23;
								} else if (fencecount[0] == 2) {
									plane2.position.y = -1.17;
								} else if (fencecount[0] == 3) {
									plane2.position.y = -1.17;
								} else if (fencecount[0] == 4) {
									plane2.position.y = -1.05;
								} else if (fencecount[0] == 5) {
									plane2.position.y = -0.9;
								} else if (fencecount[0] == 6 || fencecount[0] == 7) {
									plane2.position.y = -0.9;
								} else if (fencecount[0] == 8 || fencecount[0] == 9) {
									plane2.position.y = -0.8;
								} else if (fencecount[0] == 10) {
									plane2.position.y = -0.6;
								} else if (fencecount[0] == 11 || fencecount[0] == 12) {
									plane2.position.y = -0.5;
								} else if (fencecount[0] == 13) {
									plane2.position.y = -0.4;
								} else {
									plane2.position.y = -0.4;
								}
							}
							else if (getimagename == 'ALUDesign_BlackStolpe_Hardwood' || getimagename == 'ALUDesign_BlackStolpe_SmokedOak') {

								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 = -2.5;
								} else if (fencecount[0] == 11) {
									plane2.position.y = -2.5;
								} else if (fencecount[0] == 21) {
									plane2.position.y = -2.5;
								} else {
									plane2.position.y = -2.5;
								}


							}

							else if (getimagename == 'ALUDesign_SilverStolpe_Hardwood' || getimagename == 'ALUDesign_SilverStolpe_SmokedOak') {

								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.75;
								} else if (fencecount[0] == 2) {
									plane2.position.y = 0.75;
								} else if (fencecount[0] == 3) {
									plane2.position.y = 0.63;
								} else if (fencecount[0] == 4) {
									plane2.position.y = 0.59;
								} else if (fencecount[0] == 5) {
									plane2.position.y = 0.49;
								} else if (fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 8 || fencecount[0] == 9 || fencecount[0] == 10) {
									plane2.position.y = 0.39;
								} else if (fencecount[0] == 11) {
									plane2.position.y = 0.65;
								} else if (fencecount[0] == 12 || fencecount[0] == 13 || fencecount[0] == 14 || fencecount[0] == 15) {
									plane2.position.y = 0.9;
								}
								else if (fencecount[0] == 16 || fencecount[0] == 17) {
									plane2.position.y = 1.2;
								}
								else if (fencecount[0] == 18 || fencecount[0] == 19 || fencecount[0] == 20) {
									plane2.position.y = 1.5;
								}

								else if (fencecount[0] == 21) {
									plane2.position.y = 1.5;
								} else {
									plane2.position.y = 1.5;
								}
								//plane2.position.y=0;
								plane2.position.x = 0.1;
								plane2.rotate(new BABYLON.Vector3(0.1, 0, 2), Math.PI / 1);
								plane2.scaling = new BABYLON.Vector3(0.63, 1, 1);

							}




							else if (getimagename == 'ALU_SilverStolpe_Black_updated') {
								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 = -1.14;
								} else if (fencecount[0] == 2) {
									plane2.position.y = -1.2;
								} else if (fencecount[0] == 3) {
									plane2.position.y = -1.1;
								} else if (fencecount[0] == 4) {
									plane2.position.y = -1.1;
								} else if (fencecount[0] == 5) {
									plane2.position.y = -1;
								} else if (fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 8) {
									plane2.position.y = -0.9;
								} else if (fencecount[0] == 9) {
									plane2.position.y = -0.6;
								} else if (fencecount[0] == 10 || fencecount[0] == 11) {
									plane2.position.y = -0.5;
								} else {
									plane2.position.y = -fenceyposition;
								}

							} else if (getimagename == 'ALU_SilverStolpe_Grey_Updated') {

								fencecount = counttt[0].split('.');

								if (fencecount[0] == 1) {
									plane2.position.y = -1.14;
								} else if (fencecount[0] == 2) {
									plane2.position.y = -1.2;
								} else if (fencecount[0] == 3) {
									plane2.position.y = -1.1;
								} else if (fencecount[0] == 4) {
									plane2.position.y = -1.1;
								} else if (fencecount[0] == 5) {
									plane2.position.y = -1;
								} else if (fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 8) {
									plane2.position.y = -0.9;
								} else if (fencecount[0] == 9) {
									plane2.position.y = -0.6;
								} else if (fencecount[0] == 10 || fencecount[0] == 11) {
									plane2.position.y = -0.5;
								} else if (fencecount[0] == 12 || fencecount[0] == 13) {
									plane2.position.y = 1.2;
								}


							} else if (getimagename == 'ALU_BlackStolpe_Black_Updated') {
								/*	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.47;
								} else if (fencecount[0] == 2) {
									plane2.position.y = 0.55;
								} else if (fencecount[0] == 3) {
									plane2.position.y = 0.6;
								} else if (fencecount[0] == 4) {
									plane2.position.y = -0.8;
								} else if (fencecount[0] == 5) {
									plane2.position.y = 0.7;
								} else if (fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 8) {
									plane2.position.y = 0.8;
								} else if (fencecount[0] == 9) {
									plane2.position.y = 1;
								} else if (fencecount[0] == 11) {
									plane2.position.y = -0.3;
								} else if (fencecount[0] == 10 || fencecount[0] == 12 || fencecount[0] == 13) {
									plane2.position.y = 1.2;
								}


							} else if (getimagename == 'ALU_BlackStolpe_Grey_updated') {
								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] > 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.96;
								} else if (fencecount[0] == 2) {
									plane2.position.y = -1.2;
								} else if (fencecount[0] == 3) {
									plane2.position.y = -1.1;
								} else if (fencecount[0] == 4) {
									plane2.position.y = -1.1;
								} else if (fencecount[0] == 5) {
									plane2.position.y = -1;
								} else if (fencecount[0] == 6 || fencecount[0] == 7) {
									plane2.position.y = -0.9;
								} else if (fencecount[0] == 8) {
									plane2.position.y = -0.2;
								} else if (fencecount[0] == 9) {
									plane2.position.y = -0.6;
								} else if (fencecount[0] == 10 || fencecount[0] == 11) {
									plane2.position.y = -0.5;
								} else {
									plane2.position.y = 1.2;
								}



							} else {
								plane2.position.y = -0.300;
							}
							if (getimagename == 'ALUDesign_SilverStolpe_Hardwood' || getimagename == 'ALUDesign_SilverStolpe_SmokedOak') {
								plane2.position.z = -0.9;
							} else {

								if (getimagename == 'AluLight_black_black_60x60') {
									plane2.position.z = 0.1;
								} else {
									plane2.position.z = 1.4;
								}

							}
						}
						console.log(plane2);

						var advancedTexture = BABYLON.GUI.AdvancedDynamicTexture.CreateForMesh(plane);
						var advancedTexture01 = BABYLON.GUI.AdvancedDynamicTexture.CreateForMesh(plane2);

						var rect1 = new BABYLON.GUI.Rectangle();
						rect1.width = "70px";
						rect1.height = "70px";
						rect1.cornerRadius = 0;
						rect1.thickness = 0;
						advancedTexture.addControl(rect1);
						var rect01 = new BABYLON.GUI.Rectangle();
						rect01.width = "70px";
						rect01.height = "70px";
						rect01.cornerRadius = 0;
						rect01.thickness = 0;
						advancedTexture01.addControl(rect01);
						var button1 = 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++) {
					var mesh = '';
					const index_id = index34;
					const index_id332 = index34;
					//glb_data = row_url_4;
					if (row4_array.length > 0) {

						if (row4_array[index_id] == index_id && color4[index_id] == 'door') {

							scene_custom.dispose();
							//glb_data = 'https://kirkedal.nl/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("fenced" + 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 {
								if (getimagename == 'AluLight_black_black_60x60') {
									newInstancel.rotate(new BABYLON.Vector3(0, 0, 0), Math.PI * 0.50);
								} 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 {
								if (getimagename == 'AluLight_black_black_60x60') {
									newInstancel.position.x = (index_id332 * 1.55) - 0.1487;
								} else {
									newInstancel.position.x = (index_id332 * 1.83);
								}
							}
						} else {
							if (getimagename == 'AluLight_black_black_60x60') {
								newInstancel.rotate(new BABYLON.Vector3(0, 0, 0), Math.PI * 0.50);
								newInstancel.position.x = (index_id332 * 1.55) - 0.1487;
							} else {
								newInstancel.rotate(new BABYLON.Vector3(0, 1, 0), Math.PI * 0.50);
								newInstancel.position.x = index_id332 * 1.83;
							}
						}

						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 == 'ALUDesign_SilverStolpe_Hardwood' || getimagename == 'ALUDesign_BlackStolpe_Hardwood' || getimagename == 'ALUDesign_SilverStolpe_SmokedOak' || getimagename == 'ALUDesign_BlackStolpe_SmokedOak') {
							//console.log("value12"+value12);
							// console.log("squere"+squere);
							if (squere <= 2) {
								newInstancel.position.z = 0.116 - value12;
							} else {
								newInstancel.position.z = 0.128 - value12;
							}
							if (newInstancel.position.x == 0) {
								newInstancel.position.x = 0;
							} else {
								newInstancel.position.x = ((index_id332) * (1.77));
							}
						}

						//if(getimagename ==  'ALUDesign_BlackStolpe_Hardwood')
						//							{
						//							//newInstancel.position.y = 0.5;
						//							newInstancel.position.y = -0.5;
						//							//newInstancel.position.y = -0.17;
						//							newInstancel.rotate(new BABYLON.Vector3(0, 0, 180), 3.14);
						//							}
						//if(getimagename ==  'ALUDesign_BlackStolpe_Hardwood')
						//							{ //alert('hello');
						//							
						//							//newInstance.position.y = 0.5;
						//							//newInstance.position.y = -0.5;
						//							//newInstance.position.y = -0.17;
						//							//newInstance.rotate(new BABYLON.Vector3(0, 0, 180), 3.14);	
						//							fencecount = counttt[0].split('.');
						//							console.log("fencecount-4-"+fencecount[0]);
						//							
						//							if(fencecount[0]==1){
						//							newInstancel.position.y = -0.5;
						//							}else if(fencecount[0]==2){
						//							newInstancel.position.y = -0.5;
						//							}else if(fencecount[0]==3){
						//							newInstancel.position.y = -0.5;
						//							}else if(fencecount[0]==4){
						//							newInstancel.position.y = -0.5;
						//							}else if(fencecount[0]==6){
						//							newInstancel.position.y = 0.7;
						//							}else if(fencecount[0]==11){
						//							newInstancel.position.y = 1.23;
						//							}else if(fencecount[0]==21){
						//							newInstancel.position.y = 2.31;
						//							}
						//							
						//							}else if(getimagename ==  'ALUDesign_SilverStolpe_Hardwood')
						//							{
						//								newInstancel.position.y = 0.8;
						//								newInstancel.rotate(new BABYLON.Vector3(0, 0, 1), 3.14);
						//								}
						//								else if(getimagename ==  'ALUDesign_SilverStolpe_SmokedOak')
						//							{
						//								newInstancel.position.y = 0.8;
						//								newInstancel.rotate(new BABYLON.Vector3(0, 0, 1), 3.14);
						//																}
						if (getimagename == 'ALUDesign_BlackStolpe_Hardwood' || getimagename == 'ALUDesign_BlackStolpe_SmokedOak') {
							console.log("fencecount[0]" + fencecount[0]);
							if (fencecount[0] == 1) {
								newInstancel.position.y = 0.27;
							} else if (fencecount[0] == 2) {
								newInstancel.position.y = 0.27;
							} else if (fencecount[0] == 3) {
								newInstancel.position.y = 0.37;
							} else if (fencecount[0] == 4) {
								newInstancel.position.y = 0.479;
							} else if (fencecount[0] == 5) {
								newInstancel.position.y = 0.59;
							} else if (fencecount[0] == 6) {
								newInstancel.position.y = 0.7;
							} else if (fencecount[0] == 7) {
								newInstancel.position.y = 0.81;
							} else if (fencecount[0] == 8) {
								newInstancel.position.y = 0.912;
							} else if (fencecount[0] == 9) {
								newInstancel.position.y = 1.02;
							} else if (fencecount[0] == 10) {
								newInstancel.position.y = 1.12;
							} else if (fencecount[0] == 11) {
								newInstancel.position.y = 1.23;
							} else if (fencecount[0] == 13) {
								newInstancel.position.y = 1.45;
							} else if (fencecount[0] == 14) {
								newInstancel.position.y = 1.56;
							}
							else if (fencecount[0] == 15) {
								newInstancel.position.y = 1.67;
							}
							else if (fencecount[0] == 16) {
								newInstancel.position.y = 1.78;
							}
							else if (fencecount[0] == 17) {
								newInstancel.position.y = 1.89;
							}
							else if (fencecount[0] == 18) {
								newInstancel.position.y = 1.99;
							}
							else if (fencecount[0] == 19) {
								newInstancel.position.y = 2.1;
							}
							else if (fencecount[0] == 20) {
								newInstancel.position.y = 2.21;
							}
							else if (fencecount[0] == 21) {
								newInstancel.position.y = 2.31;
							}




						}
						if (getimagename == 'ALUDesign_SilverStolpe_Hardwood' || getimagename == 'ALUDesign_SilverStolpe_SmokedOak') {

							if (fencecount[0] == 1) {
								newInstancel.position.y = -0.17;
							} else if (fencecount[0] == 2 || fencecount[0] == 3 || fencecount[0] == 4 || fencecount[0] == 5 || fencecount[0] == 6 || fencecount[0] == 7) {
								newInstancel.position.y = -0.17;

							} else if (fencecount[0] == 8) {
								newInstancel.position.y = -0.11;
							}
							else if (fencecount[0] == 9) {
								newInstancel.position.y = 0;
							}
							else if (fencecount[0] == 10) {
								newInstancel.position.y = 0.1;
							}
							else if (fencecount[0] == 11) {
								newInstancel.position.y = 0.17;
							}
							else if (fencecount[0] == 13) {
								newInstancel.position.y = 0.34;
							}
							else if (fencecount[0] == 14) {
								newInstancel.position.y = 0.43;
							}
							else if (fencecount[0] == 15) {
								newInstancel.position.y = 0.51;
							}
							else if (fencecount[0] == 16) {
								newInstancel.position.y = 0.60;
							}
							else if (fencecount[0] == 17) {
								newInstancel.position.y = 0.68;
							}
							else if (fencecount[0] == 18) {
								newInstancel.position.y = 0.77;
							}
							else if (fencecount[0] == 19) {
								newInstancel.position.y = 0.85;
							}
							else if (fencecount[0] == 20) {
								newInstancel.position.y = 0.94;
							} else if (fencecount[0] == 21) {
								newInstancel.position.y = 1.016;
							}
							else {
								newInstancel.position.y = 1.016;
							}

							//newInstancel.rotate(new BABYLON.Vector3(0, 0, 1), 3.14);	




						}

						//  newInstancel.rotate(new BABYLON.Vector3(0, 1, 0), Math.PI * 0.50);
						var plane = BABYLON.Mesh.CreatePlane("planed" + 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 {
							if (getimagename == 'AluLight_black_black_60x60') {
							} else {
								plane.rotate(new BABYLON.Vector3(0, 0.2, 0), 1.5);
							}
							if (getimagename == 'AluLight_black_black_60x60') {
								plane.position.x = 1.4;
							} else {
								plane.position.x = 0;
							}
							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 == 'AluLight_black_black_60x60') {
								if (fencecount[0] == 1) {
									plane.position.y = -1.23;
								} else if (fencecount[0] == 2) {
									plane.position.y = -1.17;
								} else if (fencecount[0] == 3) {
									plane.position.y = -1.17;
								} else if (fencecount[0] == 4) {
									plane.position.y = -1.05;
								} else if (fencecount[0] == 5) {
									plane.position.y = -0.9;
								} else if (fencecount[0] == 6 || fencecount[0] == 7) {
									plane.position.y = -0.9;
								} else if (fencecount[0] == 8 || fencecount[0] == 9) {
									plane.position.y = -0.8;
								} else if (fencecount[0] == 10) {
									plane.position.y = -0.6;
								} else if (fencecount[0] == 11 || fencecount[0] == 12) {
									plane.position.y = -0.5;
								} else if (fencecount[0] == 13) {
									plane.position.y = -0.4;
								} else {
									plane.position.y = -0.4;
								}
							}

							else if (getimagename == 'ALUDesign_BlackStolpe_Hardwood' || getimagename == 'ALUDesign_BlackStolpe_SmokedOak') {

								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 = -2.5;
								} else if (fencecount[0] == 11) {
									plane.position.y = -2.5;
								} else if (fencecount[0] == 21) {
									plane.position.y = -2.5;
								} else {
									plane.position.y = -2.5;
								}


							}

							else if (getimagename == 'ALUDesign_SilverStolpe_Hardwood' || getimagename == 'ALUDesign_SilverStolpe_SmokedOak') {

								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.75;
								} else if (fencecount[0] == 2) {
									plane.position.y = 0.75;
								} else if (fencecount[0] == 3) {
									plane.position.y = 0.63;
								} else if (fencecount[0] == 4) {
									plane.position.y = 0.59;
								} else if (fencecount[0] == 5) {
									plane.position.y = 0.49;
								} else if (fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 8 || fencecount[0] == 9 || fencecount[0] == 10) {
									plane.position.y = 0.39;
								} else if (fencecount[0] == 11) {
									plane.position.y = 0.65;
								} else if (fencecount[0] == 12 || fencecount[0] == 13 || fencecount[0] == 14 || fencecount[0] == 15) {
									plane.position.y = 0.9;
								}
								else if (fencecount[0] == 16 || fencecount[0] == 17) {
									plane.position.y = 1.2;
								}
								else if (fencecount[0] == 18 || fencecount[0] == 19 || fencecount[0] == 20) {
									plane.position.y = 1.5;
								}

								else if (fencecount[0] == 21) {
									plane.position.y = 1.5;
								} else {
									plane.position.y = 1.5;
								}
								//plane.position.y=0;
								plane.position.x = -0.1;
								plane.rotate(new BABYLON.Vector3(0, 0, 2), Math.PI / 1);
								plane.scaling = new BABYLON.Vector3(0.63, 1, 1);

							}




							else if (getimagename == 'ALU_SilverStolpe_Black_updated') {
								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 = -1.14;
								} else if (fencecount[0] == 2) {
									plane.position.y = -1.2;
								} else if (fencecount[0] == 3) {
									plane.position.y = -1.1;
								} else if (fencecount[0] == 4) {
									plane.position.y = -1.1;
								} else if (fencecount[0] == 5) {
									plane.position.y = -1;
								} else if (fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 8) {
									plane.position.y = -0.9;
								} else if (fencecount[0] == 9) {
									plane.position.y = -0.6;
								} else if (fencecount[0] == 10 || fencecount[0] == 11) {
									plane.position.y = -0.5;
								} else {
									plane.position.y = -fenceyposition;
								}

							}
							else if (getimagename == 'ALU_SilverStolpe_Grey_Updated') {

								fencecount = counttt[0].split('.');
								//console.log(fencecount);
								if (fencecount[0] == 1) {
									plane.position.y = -1.14;
								} else if (fencecount[0] == 2) {
									plane.position.y = -1.2;
								} else if (fencecount[0] == 3) {
									plane.position.y = -1.1;
								} else if (fencecount[0] == 4) {
									plane.position.y = -1.1;
								} else if (fencecount[0] == 5) {
									plane.position.y = -1;
								} else if (fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 8) {
									plane.position.y = -0.9;
								} else if (fencecount[0] == 9) {
									plane.position.y = -0.6;
								} else if (fencecount[0] == 10 || fencecount[0] == 11) {
									plane.position.y = -0.5;
								} else if (fencecount[0] == 12 || fencecount[0] == 13) {
									plane.position.y = 1.2;
								}

							}
							else if (getimagename == 'ALU_BlackStolpe_Black_Updated') {
								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.47;
								} else if (fencecount[0] == 2) {
									plane.position.y = 0.55;
								} else if (fencecount[0] == 3) {
									plane.position.y = 0.6;
								} else if (fencecount[0] == 4) {
									plane.position.y = -0.8;
								} else if (fencecount[0] == 5) {
									plane.position.y = 0.7;
								} else if (fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 8) {
									plane.position.y = 0.8;
								} else if (fencecount[0] == 9) {
									plane.position.y = 1;
								} else if (fencecount[0] == 11) {
									plane.position.y = -0.3;
								} else if (fencecount[0] == 10 || fencecount[0] == 12 || fencecount[0] == 13) {
									plane.position.y = 1.2;
								}

								//plane.position.y =-fenceyposition;
							}
							else if (getimagename == 'ALU_BlackStolpe_Grey_updated') {
								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/2;
								if (fencecount[0] == 1) {
									plane.position.y = -0.96;
								} else if (fencecount[0] == 2) {
									plane.position.y = -1.2;
								} else if (fencecount[0] == 3) {
									plane.position.y = -1.1;
								} else if (fencecount[0] == 4) {
									plane.position.y = -1.1;
								} else if (fencecount[0] == 5) {
									plane.position.y = -1;
								} else if (fencecount[0] == 6 || fencecount[0] == 7) {
									plane.position.y = -0.9;
								} else if (fencecount[0] == 8) {
									plane.position.y = -0.2;
								} else if (fencecount[0] == 9) {
									plane.position.y = -0.6;
								} else if (fencecount[0] == 10 || fencecount[0] == 11) {
									plane.position.y = -0.5;
								} else {
									plane.position.y = 1.2;
								}
							}
							else {
								plane.position.y = -0.300;
							}
							if (getimagename == 'ALUDesign_SilverStolpe_Hardwood' || getimagename == 'ALUDesign_SilverStolpe_SmokedOak') {
								plane.position.z = 0.9;
							} else {
								if (getimagename == 'AluLight_black_black_60x60') {
									plane.position.z = -0.1;
								} else {
									plane.position.z = -1.35;
								}
							}
							fenceimg = 'https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite.png';
						}
						// plane.width = "100px";
						//                   plane.height = "100px";
						var plane2 = BABYLON.Mesh.CreatePlane("planed2" + 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';

							if (getimagename == 'AluLight_black_black_60x60') {
							} else {
								plane2.rotate(new BABYLON.Vector3(0, 0.2, 0), 4.5);
							}
							if (getimagename == 'AluLight_black_black_60x60') {
								plane2.position.x = 1.4;
							} else {
								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 == 'AluLight_black_black_60x60') {
								if (fencecount[0] == 1) {
									plane2.position.y = -1.23;
								} else if (fencecount[0] == 2) {
									plane2.position.y = -1.17;
								} else if (fencecount[0] == 3) {
									plane2.position.y = -1.17;
								} else if (fencecount[0] == 4) {
									plane2.position.y = -1.05;
								} else if (fencecount[0] == 5) {
									plane2.position.y = -0.9;
								} else if (fencecount[0] == 6 || fencecount[0] == 7) {
									plane2.position.y = -0.9;
								} else if (fencecount[0] == 8 || fencecount[0] == 9) {
									plane2.position.y = -0.8;
								} else if (fencecount[0] == 10) {
									plane2.position.y = -0.6;
								} else if (fencecount[0] == 11 || fencecount[0] == 12) {
									plane2.position.y = -0.5;
								} else if (fencecount[0] == 13) {
									plane2.position.y = -0.4;
								} else {
									plane2.position.y = -0.4;
								}
							}
							else if (getimagename == 'ALUDesign_BlackStolpe_Hardwood' || getimagename == 'ALUDesign_BlackStolpe_SmokedOak') {

								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 = -2.5;
								} else if (fencecount[0] == 11) {
									plane2.position.y = -2.5;
								} else if (fencecount[0] == 21) {
									plane2.position.y = -2.5;
								} else {
									plane2.position.y = -2.5;
								}
								//	plane2.position.y =-fenceyposition;

							}

							else if (getimagename == 'ALUDesign_SilverStolpe_Hardwood' || getimagename == 'ALUDesign_SilverStolpe_SmokedOak') {

								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.75;
								} else if (fencecount[0] == 2) {
									plane2.position.y = 0.75;
								} else if (fencecount[0] == 3) {
									plane2.position.y = 0.63;
								} else if (fencecount[0] == 4) {
									plane2.position.y = 0.59;
								} else if (fencecount[0] == 5) {
									plane2.position.y = 0.49;
								} else if (fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 8 || fencecount[0] == 9 || fencecount[0] == 10) {
									plane2.position.y = 0.39;
								} else if (fencecount[0] == 11) {
									plane2.position.y = 0.65;
								} else if (fencecount[0] == 12 || fencecount[0] == 13 || fencecount[0] == 14 || fencecount[0] == 15) {
									plane2.position.y = 0.9;
								}
								else if (fencecount[0] == 16 || fencecount[0] == 17) {
									plane2.position.y = 1.2;
								}
								else if (fencecount[0] == 18 || fencecount[0] == 19 || fencecount[0] == 20) {
									plane2.position.y = 1.5;
								}

								else if (fencecount[0] == 21) {
									plane2.position.y = 1.5;
								} else {
									plane2.position.y = 1.5;
								}
								//	plane2.position.y =-fenceyposition;
								//plane2.position.y=0;
								plane2.position.x = 0.1;
								plane2.rotate(new BABYLON.Vector3(0.2, 0, 2), Math.PI / 1);
								plane2.scaling = new BABYLON.Vector3(0.63, 1, 1);
							}




							else if (getimagename == 'ALU_SilverStolpe_Black_updated') {
								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 = -1.14;
								} else if (fencecount[0] == 2) {
									plane2.position.y = -1.2;
								} else if (fencecount[0] == 3) {
									plane2.position.y = -1.1;
								} else if (fencecount[0] == 4) {
									plane2.position.y = -1.1;
								} else if (fencecount[0] == 5) {
									plane2.position.y = -1;
								} else if (fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 8) {
									plane2.position.y = -0.9;
								} else if (fencecount[0] == 9) {
									plane2.position.y = -0.6;
								} else if (fencecount[0] == 10 || fencecount[0] == 11) {
									plane2.position.y = -0.5;
								} else {
									plane2.position.y = -fenceyposition;
								}
								//	plane2.position.y =-fenceyposition;
							}
							else if (getimagename == 'ALU_SilverStolpe_Grey_Updated') {
								/*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] > 5) {
									fenceyposition = fencecount[0] * 0.024;
								} else if (fencecount[0] <= 2) {

									fenceyposition = 0.9;
								} else {
									fenceyposition = fencecount[0] * 0.12;
								}
								//console.log(fencecount);
								if (fencecount[0] == 1) {
									plane2.position.y = -1.14;
								} else if (fencecount[0] == 2) {
									plane2.position.y = -1.2;
								} else if (fencecount[0] == 3) {
									plane2.position.y = -1.1;
								} else if (fencecount[0] == 4) {
									plane2.position.y = -1.1;
								} else if (fencecount[0] == 5) {
									plane2.position.y = -1;
								} else if (fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 8) {
									plane2.position.y = -0.9;
								} else if (fencecount[0] == 9) {
									plane2.position.y = -0.6;
								} else if (fencecount[0] == 10 || fencecount[0] == 11) {
									plane2.position.y = -0.5;
								} else if (fencecount[0] == 12 || fencecount[0] == 13) {
									plane2.position.y = 1.2;
								}

							} else if (getimagename == 'ALU_BlackStolpe_Black_Updated') {
								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.47;
								} else if (fencecount[0] == 2) {
									plane2.position.y = 0.55;
								} else if (fencecount[0] == 3) {
									plane2.position.y = 0.6;
								} else if (fencecount[0] == 4) {
									plane2.position.y = -0.8;
								} else if (fencecount[0] == 5) {
									plane.position.y = 0.7;
								} else if (fencecount[0] == 6 || fencecount[0] == 7 || fencecount[0] == 8) {
									plane2.position.y = 0.8;
								} else if (fencecount[0] == 9) {
									plane2.position.y = 1;
								} else if (fencecount[0] == 11) {
									plane2.position.y = -0.3;
								} else if (fencecount[0] == 10 || fencecount[0] == 12 || fencecount[0] == 13) {
									plane2.position.y = 1.2;
								}
							} else if (getimagename == 'ALU_BlackStolpe_Grey_updated') {
								//plane2.position.y =fenceyposition/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;
								}
								if (fencecount[0] == 1) {
									plane2.position.y = -0.96;
								} else if (fencecount[0] == 2) {
									plane2.position.y = -1.2;
								} else if (fencecount[0] == 3) {
									plane2.position.y = -1.1;
								} else if (fencecount[0] == 4) {
									plane2.position.y = -1.1;
								} else if (fencecount[0] == 5) {
									plane2.position.y = -1;
								} else if (fencecount[0] == 6 || fencecount[0] == 7) {
									plane2.position.y = -0.9;
								} else if (fencecount[0] == 8) {
									plane2.position.y = -0.2;
								} else if (fencecount[0] == 9) {
									plane2.position.y = -0.6;
								} else if (fencecount[0] == 10 || fencecount[0] == 11) {
									plane2.position.y = -0.5;
								} else {
									plane2.position.y = 1.2;
								}
							}
							else {
								plane2.position.y = -0.300;
							}
							if (getimagename == 'ALUDesign_SilverStolpe_Hardwood' || getimagename == 'ALUDesign_SilverStolpe_SmokedOak') {
								plane2.position.z = -0.9;
							} else {
								if (getimagename == 'AluLight_black_black_60x60') {
									plane2.position.z = 0.1;
								} else {
									plane2.position.z = 1.5;
								}
							}
						}
						// plane2.width = "100px";
						//                   plane2.height = "100px";
						// var advancedTexture = BABYLON.GUI.AdvancedDynamicTexture.CreateFullscreenUI("UI");
						var advancedTexturee = BABYLON.GUI.AdvancedDynamicTexture.CreateForMesh(plane);
						var advancedTexture01 = BABYLON.GUI.AdvancedDynamicTexture.CreateForMesh(plane2);

						//var advancedTexturee = BABYLON.GUI.AdvancedDynamicTexture.CreateFullscreenUI("UI");
						var rect12 = new BABYLON.GUI.Rectangle();
						rect12.width = "70px";
						rect12.height = "70px";
						rect12.value = index_id;
						rect12.thickness = 0;
						advancedTexturee.addControl(rect12);
						var rect120 = new BABYLON.GUI.Rectangle();
						rect120.width = "70px";
						rect120.height = "70px";
						rect120.value = index_id;
						rect120.thickness = 0;
						advancedTexture01.addControl(rect120);
						var button2 = 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: true,
	});
	//scene.debugLayer.show();



	return scene;

		};
	//fencecolor

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

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

	/*engine.onResizeObservable.add(function () {
		
	});*/

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


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


	});

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

	});



	}


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

		setTimeout(function () {

			location.reload();

		}, 500);



	});

	function chengelog(xposition, yposition, scene, index_id, image_name, row_count, custom_mesh, custom_button, custom_advancedTexturee, custom_type) {

		BABYLON.SceneLoader.ImportMesh("", "", image_name, scene, function (newMeshesl) {
			var mesh = newMeshesl[1];
			mesh.isVisible = false;
			var newInstancel = mesh.createInstance("fencel" + index_id);
			newInstancel.position.x = xposition;
			newInstancel.position.z = yposition;
			if (row_count == '2') {
				if (custom_type == 'door') {

					newInstancel.rotate(new BABYLON.Vector3(0, 0, -10), Math.PI * 0.5);
					//  newInstancel.rotation = new BABYLON.Vector3(0, 80, 0);
					newInstancel.rotation.x = 10;
					newInstancel.rotation.y = 0;
					newInstancel.rotation.z = 0;

				} else {
					newInstancel.rotate(new BABYLON.Vector3(0, 1, 0), Math.PI * 0.50);
				}


			}
			if (row_count == '4') {
				if (custom_type == 'door') {

					newInstancel.rotate(new BABYLON.Vector3(0, 0, -10), Math.PI * 0.5);
					//  newInstancel.rotation = new BABYLON.Vector3(0, 80, 0);
					newInstancel.rotation.x = 10;
					newInstancel.rotation.y = 0;
					newInstancel.rotation.z = 0;

				} else {
					newInstancel.rotate(new BABYLON.Vector3(0, 1, 0), Math.PI * 0.50);
				}
			}
			custom_button.dispose();
			custom_advancedTexturee.dispose();
			custom_mesh.dispose();
			if (custom_type == 'fence') {
				const advancedTexturee = BABYLON.GUI.AdvancedDynamicTexture.CreateFullscreenUI("UI");
				const button2 = BABYLON.GUI.Button.CreateImageOnlyButton(
					"but" + index_id,
					"https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/editingWhite.png"
				);
				button2.onPointerUpObservable.add(function () {
					file2 = row_count;
					id = index_id;
					xposition = xposition;
					yposition = yposition;
					load_service_PopupBox1(file2, id, xposition, yposition, scene, mesh, button2, advancedTexturee);
				});
				var rect12 = new BABYLON.GUI.Rectangle();
				rect12.width = "15px";
				rect12.height = "15px";
				rect12.class = "custom_edit_icon_button";
				rect12.cornerRadius = 0;
				rect12.value = index_id;
				rect12.background = "white";
				advancedTexturee.addControl(rect12);
				rect12.addControl(button2);

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

		});
		return true;
	}

</script>





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

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

	<div class="file-addon-wrap">
	</div>
	<div id="ModalButtonRow1" style="background-color: rgb(255, 255, 255);">
		<label
			style="       width: 25%;float: inherit;margin: auto;text-align: justify;    font-weight: 600;margin-top: 15px;">Vælg
			farve: </label>
		<select class="custom_glb_type">
			<option>Select :</option>
			<option value="gray" color="gray">Grey</option>
			<option value="black" color="black">Black</option>
			<option value="hardwood" color="hardwood">Hardwood</option>
			<option value="Smoked_Oak" color="Smoked_Oak">Smoked Oak</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>
		<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').val();

		jQuery(".error_message").hide();
		unload_service_PopupBox1();
		// myfunction();
		colors = jQuery('.custom_glb_type').attr('color');
		file = jQuery('#ModalButtonRow1').attr('file');


		custom_height = jQuery(".custom_height").val();
		//custom_type = jQuery(".custom_type").val();

		if ($("input[name=custom_type]:checked").val() == "door") {
			custom_type = 'door';

			//jQuery(".custom_height").hide();
		}
		else if ($("input[name=custom_type]:checked").val() == "fence") {
			custom_type = 'fence';
			if (custom_height == '') {
				jQuery(".error_message").show();
				return false;
			}
		}
		name = jQuery('.custom_glb_type').val();
		if (custom_type == '') {
			return false;
		}
		fencee = jQuery("#fencetype").val();

		jsondata = JSON.parse(fencee);

		myJsonString = {};
		jQuery.each(jsondata, function (key, value) {

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

							fencelength = valuee.lengthss;
							height = jQuery("#custom_height").val();
							lengthtotal = fencelength / 0.14 * height / 1.8;

							valuee.heigth = Math.ceil(lengthtotal);
							valuee.f_row_type = 'fence';
							if (name == 'gray') {
								name = 'grey';
							}
							valuee.color = name[0].toUpperCase() + name.substr(1);
						} else {

							fencelength = valuee.lengthss;
							height = jQuery("#custom_height").val();
							lengthtotal = fencelength / 0.14 * height / 1.8;

							valuee.heigth = 0;
							valuee.f_row_type = 'door';
							if (name == 'gray') {
								name = 'grey';
							}
							valuee.color = name[0].toUpperCase() + name.substr(1);
						}

					}
				});
			} else {

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


		jQuery("#fencetype").val(data);




		slop = jQuery('.sidebar_calc_box4 img').attr('color_val');
		heigth = Math.ceil(custom_height / 0.14);
		console.log("heigth" + custom_height / 0.091);
		console.log("slop" + slop);
		console.log("name" + name);
		if (custom_type == 'fence') {
			if (name == 'grey' && slop == 'alu') {
				if (heigth > 13) {
					images_fence = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_SilverStolpe_Grey_Updated/round_I_GLB_silver_grey_v05_13.glb";
				} else {
					images_fence = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_SilverStolpe_Grey_Updated/round_I_GLB_silver_grey_v05_" + heigth + ".glb";
				}
			} else if (name == 'grey' && slop == 'black') {
				if (heigth > 13) {
					images_fence = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_Grey_updated/round_I_GLB_black_grey_v05_13.glb";
				} else {
					images_fence = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_Grey_updated/round_I_GLB_black_grey_v05_" + heigth + ".glb";
				}
			} else if (name == 'black' && slop == 'black') {
				if (heigth > 13) {
					images_fence = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_Black_Updated/blackwood_round_black_I_GLB_V05_13.glb";
				} else {
					images_fence = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_Black_Updated/blackwood_round_black_I_GLB_V05_" + heigth + ".glb";
				}
			} else if (name == 'black' && slop == 'alu') {

				if (heigth > 13) {
					images_fence = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_SilverStolpe_Black_updated/blackwood_round_silver_I_GLB_V05_13.glb";
				} else {
					images_fence = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_SilverStolpe_Black_updated/blackwood_round_silver_I_GLB_V05_" + heigth + ".glb";
				}
			} else if (name == 'hardwood' && slop == 'alu') {

				heigth = Math.ceil(custom_height / 0.091);
				if (heigth > 21) {
					images_fence = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_Hardwood/ALUDesign_SilverStolpe_Hardwood_21.glb";
				} else {
					images_fence = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_Hardwood/ALUDesign_SilverStolpe_Hardwood_" + heigth + ".glb";
				}


			} else if (name == 'hardwood' && slop == 'black') {

				heigth = Math.ceil(custom_height / 0.091);
				if (heigth > 21) {
					images_fence = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_Hardwood/ALUDesign_BlackStolpe_Hardwood_21.glb";
				} else {
					images_fence = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_Hardwood/ALUDesign_BlackStolpe_Hardwood_" + heigth + ".glb";
				}


			} else if (name == 'Smoked_Oak' && slop == 'black') {
				heigth = Math.ceil(custom_height / 0.091);

				if (heigth > 21) {
					images_fence = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_SmokedOak/ALUDesign_BlackStolpe_SmokedOak_21.glb";
				} else {
					images_fence = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_BlackStolpe_SmokedOak/ALUDesign_BlackStolpe_SmokedOak_" + heigth + ".glb";
				}


			} else if (name == 'Smoked_Oak' && slop == 'alu') {

				heigth = Math.ceil(custom_height / 0.091);
				if (heigth > 21) {
					images_fence = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_SmokedOak/ALUDesign_SilverStolpe_SmokedOak_21.glb";
				} else {
					images_fence = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALUDesign_SilverStolpe_SmokedOak/ALUDesign_SilverStolpe_SmokedOak_" + heigth + ".glb";
				}


			}


			else {
				if (heigth > 13) {
					images_fence = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_Black_Updated/blackwood_round_black_I_GLB_V05_13.glb";
				} else {
					images_fence = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/ALU_BlackStolpe_Black_Updated/blackwood_round_black_I_GLB_V05_" + heigth + ".glb";
				}
			}
		} else {
			if (name == 'grey' && slop == 'alu') {

				//images_door = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/door/Door_1_tex_1.glb";

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

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

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



		if (heigth > 13) {
			if (custom_type == 'door') {
				//image_name = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1 (1).glb";
				image_name = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
				if (file == '1') {

					if (row1_array.length == 0) {
						row1_array1.push(colors);
						row1_array[colors] = colors;
						color1[colors] = 'door';
						custom_height_image1[colors] = images_door;


					} else {
						row1_array1.push(colors);
						row1_array[colors] = colors;
						color1[colors] = 'door';
						custom_height_image1[colors] = images_door;

					}
				}
				if (file == '2') {
					if (row2_array.length == 0) {
						row2_array1.push(colors);
						row2_array[colors] = colors;
						color2[colors] = 'door';
						custom_height_image2[colors] = images_door;

					} else {
						row2_array1.push(colors);
						row2_array[colors] = colors;
						color2[colors] = 'door';
						custom_height_image2[colors] = images_door;

					}
				}
				if (file == '3') {
					if (row3_array.length == 0) {
						row3_array1.push(colors);
						row3_array[colors] = colors;
						color3[colors] = 'door';
						custom_height_image3[colors] = images_door;


					} else {
						row3_array1.push(colors);
						row3_array[colors] = colors;
						color3[colors] = 'door';
						custom_height_image3[colors] = images_door;


					}
				}
				if (file == '4') {
					if (row4_array.length == 0) {
						row4_array1.push(colors);
						row4_array[colors] = colors;
						color4[colors] = 'door';
						custom_height_image4[colors] = images_door;

					} else {
						row4_array1.push(colors);
						row4_array[colors] = colors;
						color4[colors] = 'door';
						custom_height_image4[colors] = images_door;

					}
				}


				if (file == 2) {
					yposition = yposition_custom;
				} else {
					yposition = yposition_custom + 0.50;
				}
			} else {
				if (file == '1') {

					if (row1_array.length == 0) {
						row1_array1.push(colors);
						row1_array[colors] = colors;
						color1[colors] = 'fence';
						custom_height_image1[colors] = images_fence;

					} else {
						row1_array1.push(colors);
						row1_array[colors] = colors;
						color1[colors] = 'fence';
						custom_height_image1[colors] = images_fence;

					}
				}



				/*row1_array[colors]= colors;
				color1[colors] = 'fence';
				row1_array1[colors] = colors;
				custom_height_image1[colors] =images_fence; */
				// }else{
				/*row1_array[colors]= colors;
				color1[colors] = 'fence';
				row1_array1[colors] = colors;
				custom_height_image1[colors] =images_fence; */
				// }

				if (file == '2') {


					if (row2_array.length == 0) {
						row2_array1.push(colors);
						row2_array[colors] = colors;
						color2[colors] = 'fence';
						custom_height_image2[colors] = images_fence;

					} else {
						row2_array1.push(colors);
						row2_array[colors] = colors;
						color2[colors] = 'fence';
						custom_height_image2[colors] = images_fence;

					}
				}
				if (file == '3') {
					if (row3_array.length == 0) {
						row3_array1.push(colors);
						row3_array[colors] = colors;
						color3[colors] = 'fence';
						custom_height_image3[colors] = images_fence;


					} else {
						row3_array1.push(colors);
						row3_array[colors] = colors;
						color3[colors] = 'fence';
						custom_height_image3[colors] = images_fence;

					}
				}
				if (file == '4') {
					if (row4_array.length == 0) {
						row4_array1.push(colors);
						row4_array[colors] = colors;
						color4[colors] = 'fence';
						custom_height_image4[colors] = images_fence;

					} else {
						row4_array1.push(colors);
						row4_array[colors] = colors;
						color4[colors] = 'fence';
						custom_height_image4[colors] = images_fence;

					}
				}

				//image_name = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/gray/round_I_GLB_silver_grey_v05_13.glb";
			}
		} else {
			if (custom_type == 'door') {
				//image_name = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1 (1).glb";
				image_name = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/Door_1_tex_1.glb";
				if (file == '1') {

					if (row1_array.length == 0) {
						row1_array[colors] = colors;
						color1[colors] = 'door';
						row1_array1.push(colors);
						custom_height_image1[colors] = images_door;
					} else {
						row1_array[colors] = colors;
						color1[colors] = 'door';
						row1_array1.push(colors);
						custom_height_image1[colors] = images_door;

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

				if (file == 2) {
					yposition = yposition_custom;
				} else {
					yposition = yposition_custom + 0.50;
				}
			} else {
				if (file == '1') {

					if (row1_array.length == 0) {
						row1_array[colors] = colors;
						color1[colors] = 'fence';
						row1_array1.push(colors);
						custom_height_image1[colors] = images_fence;
					} else {
						row1_array[colors] = colors;
						color1[colors] = 'fence';
						row1_array1.push(colors);
						custom_height_image1[colors] = images_fence;

					}
				}
				if (file == '2') {
					if (row2_array.length == 0) {
						row2_array1.push(colors);
						row2_array[colors] = colors;
						color2[colors] = 'fence';
						custom_height_image2[colors] = images_fence;
					} else {
						row2_array1.push(colors);
						row2_array[colors] = colors;
						color2[colors] = 'fence';
						custom_height_image2[colors] = images_fence;
					}
				}
				if (file == '3') {
					if (row3_array.length == 0) {
						row3_array1.push(colors);
						row3_array[colors] = colors;
						color3[colors] = 'fence';
						custom_height_image3[colors] = images_fence;

					} else {
						row3_array1.push(colors);
						row3_array[colors] = colors;
						color3[colors] = 'fence';
						custom_height_image3[colors] = images_fence;
					}
				}
				if (file == '4') {
					if (row4_array.length == 0) {
						row4_array1.push(colors);
						row4_array[colors] = colors;
						color4[colors] = 'fence';
						custom_height_image4[colors] = images_fence;
					} else {
						row4_array1.push(colors);
						row4_array[colors] = colors;
						color4[colors] = 'fence';
						custom_height_image4[colors] = images_fence;
					}
				}
				image_name = "https://kirkedal.de/wp-content/themes/kallyas-child/image/3d/gray/round_I_GLB_silver_grey_v05_" + heigth + ".glb";
			}
		}


		setTimeout(function () {
			jQuery('.btn_beregn').trigger('click');
			//myfunction(); 
			// console.log(row3_array);
			// /myfunction();

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

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

	});


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

	//});
	function unload_service_PopupBox1() {    // TO Unload the Popupbox
		jQuery('#gift-wrap-option1').fadeOut("slow");
		jQuery(".shield-engraving1").css({ // this is just for style       
			"opacity": "1"
		});
		jQuery(".shield-engraving1").css({ // this is just for style       
			"display": "none"
		});

	}
	function load_service_PopupBox1(file1, color, xposition, yposition, scene, mesh, button2, advancedTexturee) {
		scene_custom = scene;
		xposition_custom = xposition;
		yposition_custom = yposition;
		index_custom = color;
		custom_mesh = mesh;
		custom_button = button2;
		custom_advancedTexturee = advancedTexturee;


		fencetype = jQuery("#fencetype").val();
		/* console.log("---------------");
		   console.log(fencetype);
		 console.log("---------------");*/

		console.log("file1=" + file1 + "--color=" + color + "-------------");
		arr_fencetype = jQuery.parseJSON(fencetype);
		console.log(arr_fencetype);
		console.log(arr_fencetype[file1 - 1][color]);
		var color_valueforpopup = arr_fencetype[file1 - 1][color]['color'];
		console.log(color_valueforpopup);




		if (color_valueforpopup == "Grey") {
			jQuery('.custom_glb_type option[color="gray"]').hide();
			jQuery('.custom_glb_type option[color="black"]').show();
			jQuery('.custom_glb_type option[color="hardwood"]').show();
			jQuery('.custom_glb_type option[color="Smoked_Oak"]').show();

			jQuery('.custom_radio_button input#door').show();
			jQuery('.custom_radio_button label[for="door"]').show();

		} else if (color_valueforpopup == "Black") {

			jQuery('.custom_glb_type option[color="gray"]').show();
			jQuery('.custom_glb_type option[color="black"]').hide();
			jQuery('.custom_glb_type option[color="hardwood"]').show();
			jQuery('.custom_glb_type option[color="Smoked_Oak"]').show();

			jQuery('.custom_radio_button input#door').show();
			jQuery('.custom_radio_button label[for="door"]').show();

		} else if (color_valueforpopup == "Hardwood") {

			jQuery('.custom_glb_type option[color="gray"]').show();
			jQuery('.custom_glb_type option[color="black"]').show();
			jQuery('.custom_glb_type option[color="hardwood"]').hide();
			jQuery('.custom_glb_type option[color="Smoked_Oak"]').show();

			jQuery('.custom_radio_button input#door').hide();
			jQuery('.custom_radio_button label[for="door"]').hide();

		}
		else if (color_valueforpopup == "Smoked_Oak") {

			jQuery('.custom_glb_type option[color="gray"]').show();
			jQuery('.custom_glb_type option[color="black"]').show();
			jQuery('.custom_glb_type option[color="hardwood"]').show();
			jQuery('.custom_glb_type option[color="Smoked_Oak"]').hide();

			jQuery('.custom_radio_button input#door').hide();
			jQuery('.custom_radio_button label[for="door"]').hide();

		}




		// To Load the Popupbox
		jQuery("#door").removeAttr("disabled");
		if (file1 == '1') {
			if (color1[color] == 'door') {

			} else {

				jQuery.each(color1, function (key, valuee) {

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

			} else {
				jQuery.each(color2, function (key, valuee) {

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

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

			} else {
				jQuery.each(color3, function (key, valuee) {

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

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

			} else {
				//$("#door").removeAttr("disabled");
				jQuery.each(color4, function (key, valuee) {

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

		jQuery('.custom_glb_type').attr('color', color);
		jQuery('#ModalButtonRow1').attr('file', file1);
		jQuery('#gift-wrap-option1').fadeIn("slow");
		jQuery(".shield-engraving1").css({ // this is just for style
			"opacity": "0.59"
		});

		jQuery(".shield-engraving1").css({ // this is just for style       
			"position": "fixed"
		});
		jQuery(".shield-engraving1").css({ // this is just for style       
			"display": "block"
		});
		// jQuery("html, body").animate({ scrollTop: 0 }, "slow");
	}


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

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



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

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

		jQuery(".minimizebutton").hide();
	});



</script>{"id":2047,"date":"2021-07-17T04:30:50","date_gmt":"2021-07-17T04:30:50","guid":{"rendered":"https:\/\/kirkedal.se\/?page_id=2047"},"modified":"2021-07-17T11:39:55","modified_gmt":"2021-07-17T11:39:55","slug":"new-calculator","status":"publish","type":"page","link":"https:\/\/kirkedal.de\/de\/new-calculator\/","title":{"rendered":"new calculator"},"content":{"rendered":"","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-2047","page","type-page","status-publish","hentry","prodpage-classic"],"acf":[],"_links":{"self":[{"href":"https:\/\/kirkedal.de\/de\/wp-json\/wp\/v2\/pages\/2047","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=2047"}],"version-history":[{"count":2,"href":"https:\/\/kirkedal.de\/de\/wp-json\/wp\/v2\/pages\/2047\/revisions"}],"predecessor-version":[{"id":2049,"href":"https:\/\/kirkedal.de\/de\/wp-json\/wp\/v2\/pages\/2047\/revisions\/2049"}],"wp:attachment":[{"href":"https:\/\/kirkedal.de\/de\/wp-json\/wp\/v2\/media?parent=2047"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}