jQuery(window).load(function() {
update(3);
setTimeout(function() {
updateplaatje();
}, 2000);
});
var preventdel = 0;
function removeframe() {
jQuery(“#zoomframecontainer”).remove();
window.location = “#default”;
}
window.onhashchange = function() {
if (jQuery(“#zoomframecontainer”).length > 0 && preventdel != 1) {
removeframe();
}
}
jQuery(document).ready(function() {
jQuery(“#naarwinkelwagen”).click(function() {naarwinkelwagen()});
jQuery(“#naarwinkelwagen”).appendTo(“.quantity”).first();
jQuery(“.single_add_to_cart_button”).first().hide();
var naarwinkelwagentext = jQuery(“.single_add_to_cart_button”).first().html();
jQuery(“#naarwinkelwagen”).html(naarwinkelwagentext);
jQuery(“#naarwinkelwagen”).show();
jQuery(“.wp-post-image”).eq(0).parent().removeAttr(“href”);
jQuery(“.wp-post-image”).first().removeAttr(“srcset”);
jQuery(“.wp-post-image”).first().removeAttr(“data-src”);
jQuery(“.wp-post-image”).first().removeAttr(“data-large_image”);
jQuery(“.woocommerce-product-gallery__image”).eq(0).removeAttr(“data-thumb”);
jQuery(“#rolluikcontainer”).show();
updateindicatie();
jQuery(‘‘).insertAfter(‘.wp-post-image’).first();
jQuery(‘.wp-post-image’).addClass(‘img-enlargable’).click(function() {
var src = jQuery(this).attr(‘src’);
var maxwidthzoom = document.getElementsByClassName(“rolluikoutercontainer”)[0].offsetWidth – 150;
var maxheightzoom = document.getElementsByClassName(“rolluikoutercontainer”)[0].offsetHeight – 150;
jQuery(‘
display: ‘flex’,
justifyContent: ‘center’,
alignItems: ‘center’,
background: ‘RGBA(245,245,245,.95)’,
backgroundSize: ‘contain’,
padding: ’25px’,
width: ‘100%’,
height: ‘100%’,
position: ‘fixed’,
zIndex: ‘10000’,
top: ‘0’,
left: ‘0’,
cursor: ‘zoom-out’
}).click(function() {
jQuery(this).fadeOut(500);
setTimeout(function() {
jQuery(“#zoomframecontainer”).remove();
}, 500);
lockchange = 1;
window.location = “#default”;
setTimeout(function() {
lockchange = 0;
}, 550);
}).appendTo(‘body’);
jQuery(‘
background: ‘url(‘ + src + ‘) no-repeat center’,
width: ‘100%’,
height: ‘100%’,
backgroundSize: ‘contain’,
maxWidth: maxwidthzoom,
maxHeight: maxheightzoom,
cursor: ‘zoom-out’
}).appendTo(‘#zoomframecontainer’);
jQuery(“#zoomframecontainer”).first().fadeIn(500);
preventdel = 1;
window.location = “#zoom”;
setTimeout(function() {
preventdel = 0;
}, 100);
});
jQuery(“input”).each(function(index) {
jQuery(“input”).eq(index).change(function() {
update();
});
if (jQuery(this).val().indexOf(‘Meer’) > -1) {
jQuery(this).next().children(1).hide();
}
if (jQuery(this).parents().eq(3).prev().text().indexOf(‘Aantal delen’) > -1) {
jQuery(this).change(function() {
jQuery(“.wp-post-image”).attr(“src”, “/wp-content/uploads/loading.gif”);
update(3);
});
}
jQuery(“.typekap, .montage, .apartekleur, .kleur”).click(function() {
updateplaatje();
});
jQuery(“.breedte, .hoogte”).change(function() {
updateplaatje();
});
if (jQuery(this).parents().eq(3).text().indexOf(‘Gelijke delen’) > -1) {
jQuery(this).change(function() {
jQuery(“.wp-post-image”).attr(“src”, “/wp-content/uploads/loading.gif”);
update(3);
});
}
if (jQuery(this).parents().eq(3).text().indexOf(‘Zelf de breedtes per deel opgeven’) > -1) {
jQuery(this).change(function() {
jQuery(“.wp-post-image”).attr(“src”, “/wp-content/uploads/loading.gif”);
update(3);
});
}
});
jQuery(‘:input, a’).attr(‘tabindex’, ‘-1’);
jQuery(window).keydown(function(event) {
if (event.keyCode == 13) {
event.preventDefault();
return false;
}
});
jQuery(“.montage”).eq(1).attr(“enabled”, “false”);
jQuery(“.montage”).eq(1).attr(“disabled”, “true”);
jQuery(“.montage”).eq(1).parents().eq(2).click(function(event) {
event.preventDefault();
});
jQuery(“.montage”).eq(1).parent().next().html(“Sorry, montageoptie momenteel niet beschikbaar“);
});
function updateplaatje() {
jQuery(“.wp-post-image”).attr(“src”, “/wp-content/uploads/loading.gif”);
setTimeout(function() {
update(1);
}, 50);
}
jQuery(“#tmcp_textfield_9, #tmcp_textfield_10, #tmcp_textfield_11, #tmcp_textfield_12, #tmcp_textfield_13, #tmcp_textfield_14”).focusout(function() {
var nieuwelement = “”;
setTimeout(function() {
nieuwelement = document.activeElement.getAttribute(“id”);
if (nieuwelement != “tmcp_textfield_9” && nieuwelement != “tmcp_textfield_10” && nieuwelement != “tmcp_textfield_11” && nieuwelement != “tmcp_textfield_12” && nieuwelement != “tmcp_textfield_13” && nieuwelement != “tmcp_textfield_14”) {
jQuery(“#applybutton1”).hide();
}
}, 1);
});
jQuery(“#tmcp_textfield_9”).focusout(function() {
if (jQuery(“#tmcp_choice_0_0_1”).is(“:checked”)) {
jQuery(“#tmcp_textfield_11”).val(jQuery(“#tmcp_textfield_5”).val() – jQuery(“#tmcp_textfield_9”).val());
jQuery(“#tmcp_textfield_11”).trigger(‘keyup’);
update(2);
}
});
jQuery(“#tmcp_textfield_10”).focusout(function() {
if (jQuery(“#tmcp_choice_0_1_2”).is(“:checked”)) {
jQuery(“#tmcp_textfield_11”).val(jQuery(“#tmcp_textfield_5”).val() – jQuery(“#tmcp_textfield_9”).val() – jQuery(“#tmcp_textfield_10”).val());
jQuery(“#tmcp_textfield_11”).trigger(‘keyup’);
update(2);
}
});
jQuery(“#tmcp_textfield_11”).focusout(function() {
if (jQuery(“#tmcp_choice_0_0_1”).is(“:checked”)) {
jQuery(“#tmcp_textfield_9”).val(jQuery(“#tmcp_textfield_5”).val() – jQuery(“#tmcp_textfield_11”).val());
jQuery(“#tmcp_textfield_9”).trigger(‘keyup’);
update(2);
}
});
jQuery(“#tmcp_textfield_12”).focusout(function() {
if (jQuery(“#tmcp_choice_0_0_1”).is(“:checked”)) {
jQuery(“#tmcp_textfield_11”).val(jQuery(“#tmcp_textfield_5”).val() – jQuery(“#tmcp_textfield_9”).val());
jQuery(“#tmcp_textfield_11”).trigger(‘keyup’);
update(2);
}
});
jQuery(“#tmcp_textfield_13”).focusout(function() {
if (jQuery(“#tmcp_choice_0_1_2”).is(“:checked”)) {
jQuery(“#tmcp_textfield_11”).val(jQuery(“#tmcp_textfield_5”).val() – jQuery(“#tmcp_textfield_9”).val() – jQuery(“#tmcp_textfield_10”).val());
jQuery(“#tmcp_textfield_11”).trigger(‘keyup’);
update(2);
}
});
jQuery(“#tmcp_textfield_14”).focusout(function() {
if (jQuery(“#tmcp_choice_0_0_1”).is(“:checked”)) {
jQuery(“#tmcp_textfield_9”).val(jQuery(“#tmcp_textfield_5”).val() – jQuery(“#tmcp_textfield_11”).val());
jQuery(“#tmcp_textfield_9”).trigger(‘keyup’);
update(2);
}
});
jQuery(“#tmcp_textfield_5, #tmcp_textfield_6”).focus(function() {
jQuery(“#applybutton”).show();
});
jQuery(“#tmcp_textfield_5”).focusout(function() {
jQuery(“#applybutton”).hide();
if (jQuery(“#tmcp_choice_0_0_1”).is(“:checked”)) {
var br1 = Number(jQuery(“#tmcp_textfield_5”).val()) / 2;
var br2 = Number(jQuery(“#tmcp_textfield_5”).val()) – br1;
jQuery(“#tmcp_textfield_9”).val(br1);
jQuery(“#tmcp_textfield_11”).val(br2);
jQuery(“#tmcp_textfield_9, #tmcp_textfield_11”).trigger(“keyup”);
} else if (jQuery(“#tmcp_choice_0_1_2”).is(“:checked”)) {
var br1 = Number(jQuery(“#tmcp_textfield_5”).val()) / 3;
var br2 = Number(jQuery(“#tmcp_textfield_5”).val()) – br1;
jQuery(“#tmcp_textfield_9”).val(br1);
jQuery(“#tmcp_textfield_10”).val(br1);
jQuery(“#tmcp_textfield_11”).val(br2);
jQuery(“#tmcp_textfield_9, #tmcp_textfield_10, #tmcp_textfield_11”).trigger(“keyup”);
}
});
jQuery(“#tmcp_textfield_6”).focusout(function() {
jQuery(“#applybutton”).hide();
var toetepassenhoogte = Number(jQuery(“#tmcp_textfield_6”).val());
jQuery(“#tmcp_textfield_12, #tmcp_textfield_13, #tmcp_textfield_14”).val(toetepassenhoogte);
jQuery(“#tmcp_textfield_12, #tmcp_textfield_13, #tmcp_textfield_14”).trigger(“keyup”);
});
jQuery(“#tmcp_textfield_9, #tmcp_textfield_10, #tmcp_textfield_11, #tmcp_textfield_12, #tmcp_textfield_13, #tmcp_textfield_14”).focus(function() {
jQuery(“#applybutton1”).show();
});
jQuery(window).resize(function() {
update();
});
var lockchange = 0;
var currentmode = 0;
var zoomschaal = 1;
var scale = 1;
var bezig = 0;
var canvas = document.createElement(‘canvas’);
var context = canvas.getContext(‘2d’);
canvas.width = document.getElementById(“rolluikcontainer”).offsetWidth;
canvas.height = document.getElementById(“rolluikcontainer”).offsetHeight;
context.clearRect(0, 0, canvas.width, canvas.height);
var pantserkleur = ‘rgb(255, 255, 255)’;
var kapkleur = ‘rgb(255, 255, 255)’;
var geleiderskleur = ‘rgb(255, 255, 255)’;
var onderlatkleur = ‘rgb(255, 255, 255)’;
var kaphoogte = 150;
var khoffset = 0;
var geleiderbreedte = 53;
function update(genplaatje) {
setTimeout(function() {
if ((genplaatje == 1 || genplaatje == 2 || genplaatje == 3) && bezig == 0) {
// plaatje
bezig = 1;
if (genplaatje == 3) {
jQuery(“#tmcp_textfield_12”).val(jQuery(“#tmcp_textfield_6”).val());
jQuery(“#tmcp_textfield_13”).val(jQuery(“#tmcp_textfield_6”).val());
jQuery(“#tmcp_textfield_14”).val(jQuery(“#tmcp_textfield_6”).val());
if (jQuery(“#tmcp_choice_0_0_1”).is(“:checked”)) {
var breedteeerstedeel = (jQuery(“#tmcp_textfield_5”).val() / 2).toFixed(0);
var breedtetweededeel = jQuery(“#tmcp_textfield_5”).val() – breedteeerstedeel;
jQuery(“#tmcp_textfield_9”).val(breedteeerstedeel);
jQuery(“#tmcp_textfield_11”).val(breedtetweededeel);
} else if (jQuery(“#tmcp_choice_0_1_2”).is(“:checked”)) {
var breedteeerstedeel = (jQuery(“#tmcp_textfield_5”).val() / 3).toFixed(0);
var breedtetweededeel = breedteeerstedeel;
var breedtederdedeel = jQuery(“#tmcp_textfield_5”).val() – breedteeerstedeel – breedtetweededeel;
jQuery(“#tmcp_textfield_9”).val(breedteeerstedeel);
jQuery(“#tmcp_textfield_10”).val(breedtetweededeel);
jQuery(“#tmcp_textfield_11”).val(breedtederdedeel);
}
}
if (jQuery(“.rolluikoutercontainer”).first().css(“display”) != “none”) {
jQuery(“.wp-post-image”).first().css(“filter”, “opacity(1)”);
jQuery(“.wp-post-image”).first().css(“-webkit-filter”, “opacity(1)”);
// onderlathoogte deel 1
var ingevuldehoogte = jQuery(“#tmcp_textfield_6”).val();
hoogtepr1 = (Number(jQuery(“#tmcp_textfield_12”).val()) / Number(jQuery(“#tmcp_textfield_6”).val()) * 100).toFixed(1);
jQuery(“#onderlatlinks1”).css(“top”, “calc(” + hoogtepr1 + “% – 40px)”);
jQuery(“#onderlatmidden1”).css(“top”, “calc(” + hoogtepr1 + “% – 40px)”);
jQuery(“#onderlatrechts1”).css(“top”, “calc(” + hoogtepr1 + “% – 40px)”);
// onderlathoogte deel 2
if (jQuery(“#tmcp_choice_0_0_1”).is(“:checked”)) {
hoogtepr2 = (Number(jQuery(“#tmcp_textfield_14”).val()) / Number(jQuery(“#tmcp_textfield_6”).val()) * 100).toFixed(1);
} else {
hoogtepr2 = (Number(jQuery(“#tmcp_textfield_13”).val()) / Number(jQuery(“#tmcp_textfield_6”).val()) * 100).toFixed(1);
}
jQuery(“#onderlatlinks2”).css(“top”, “calc(” + hoogtepr2 + “% – 40px)”);
jQuery(“#onderlatmidden2”).css(“top”, “calc(” + hoogtepr2 + “% – 40px)”);
jQuery(“#onderlatrechts2”).css(“top”, “calc(” + hoogtepr2 + “% – 40px)”);
// onderlathoogte deel 3
hoogtepr3 = (Number(jQuery(“#tmcp_textfield_14”).val()) / Number(jQuery(“#tmcp_textfield_6”).val()) * 100).toFixed(1);
jQuery(“#onderlatlinks3”).css(“top”, “calc(” + hoogtepr3 + “% – 40px)”);
jQuery(“#onderlatmidden3”).css(“top”, “calc(” + hoogtepr3 + “% – 40px)”);
jQuery(“#onderlatrechts3”).css(“top”, “calc(” + hoogtepr3 + “% – 40px)”);
// geleider hoogte links
jQuery(“#geleiderlinks”).css(“height”, “calc(” + hoogtepr1 + “% – 200px)”);
jQuery(“#geleiderlinksonder”).css(“top”, “calc(” + hoogtepr1 + “% – 45px)”);
// geleider hoogte rechts
jQuery(“#geleiderrechts”).css(“height”, “calc(” + hoogtepr3 + “% – 200px)”);
jQuery(“#geleiderrechtsonder”).css(“top”, “calc(” + hoogtepr3 + “% – 45px)”);
// geleider hoogte midden1
if (jQuery(“#tmcp_choice_0_1_2”).is(“:checked”)) {
if (Number(jQuery(“#tmcp_textfield_13”).val()) <= Number(jQuery("#tmcp_textfield_12").val())) {
jQuery("#geleidermidden1").css("height", "calc(" + hoogtepr1 + "% - 200px)");
jQuery("#geleidermiddenonder1").css("top", "calc(" + hoogtepr1 + "% - 45px)");
} else {
jQuery("#geleidermidden1").css("height", "calc(" + hoogtepr2 + "% - 200px)");
jQuery("#geleidermiddenonder1").css("top", "calc(" + hoogtepr2 + "% - 45px)");
}
}
// geleider hoogte midden2
if (jQuery("#tmcp_choice_0_1_2").is(":checked")) {
if (Number(jQuery("#tmcp_textfield_13").val()) <= Number(jQuery("#tmcp_textfield_14").val())) {
jQuery("#geleidermidden2").css("height", "calc(" + hoogtepr3 + "% - 200px)");
jQuery("#geleidermiddenonder2").css("top", "calc(" + hoogtepr3 + "% - 45px)");
} else {
jQuery("#geleidermidden2").css("height", "calc(" + hoogtepr2 + "% - 200px)");
jQuery("#geleidermiddenonder2").css("top", "calc(" + hoogtepr2 + "% - 45px)");
}
}
jQuery("#geleiderrechts").css("height", "calc(" + hoogtepr3 + "% - 200px)");
jQuery("#geleiderrechtsonder").css("top", "calc(" + hoogtepr3 + "% - 45px)");
// geleiders verdeling
if (jQuery("#tmcp_choice_4_1_8").is(":checked")) {
// breedte
var brdeel1 = jQuery("#tmcp_textfield_9").val();
if (jQuery("#tmcp_choice_0_0_1").is(":checked")) {
var brdeel2 = jQuery("#tmcp_textfield_11").val();
var ingevuldebreedte = jQuery("#tmcp_textfield_5").val();
breedtepr1 = Number(((brdeel1 / ingevuldebreedte) * 100).toFixed(1));
breedtepr2 = Number(100 - breedtepr1).toFixed(1);
// percentages toepassen
jQuery(".verdeelgeleiders.nummer2").css("left", "calc(" + breedtepr1 + "% - 16px)");
jQuery("#geleidermiddenboven2").css("left", "calc(" + breedtepr1 + "% - 18px)");
jQuery("#onderlatlinks1").css("left", "30px");
jQuery("#onderlatrechts1").css("left", "calc(" + breedtepr1 + "% - 33px)");
jQuery("#onderlatmidden1").css("left", "40px");
jQuery("#onderlatmidden1").css("width", "calc(" + breedtepr1 + "% - 65px)");
jQuery("#onderlatlinks2").css("left", "calc(" + breedtepr1 + "% + 11px)");
jQuery("#onderlatrechts2").css("left", "calc(" + 100 + "% - 54px)");
jQuery("#onderlatmidden2").css("left", "calc(" + breedtepr1 + "% + 26px)");
jQuery("#onderlatmidden2").css("width", "calc(" + breedtepr2 + "% - 61px)");
jQuery("#onderlatlinks3").hide();
jQuery("#onderlatrechts3").hide();
jQuery("#onderlatmidden3").hide();
} else if (jQuery("#tmcp_choice_0_1_2").is(":checked")) {
var brdeel2 = jQuery("#tmcp_textfield_10").val();
var ingevuldebreedte = jQuery("#tmcp_textfield_5").val();
breedtepr1 = Number(((brdeel1 / ingevuldebreedte) * 100).toFixed(1));
breedtepr2 = Number(((brdeel2 / ingevuldebreedte) * 100).toFixed(1));
breedtepr3 = Number(100 - breedtepr2 - breedtepr1).toFixed(1);
// percentages toepassen
jQuery(".verdeelgeleiders.nummer1").css("left", "calc(" + breedtepr1 + "% - 16px)");
jQuery("#geleidermiddenboven1").css("left", "calc(" + breedtepr1 + "% - 18px)");
jQuery(".verdeelgeleiders.nummer3").css("left", "calc(" + (Number(breedtepr1 + breedtepr2)) + "% - 22px)");
jQuery("#geleidermiddenboven2").css("left", "calc(" + (Number(breedtepr1 + breedtepr2)) + "% - 23px)");
jQuery("#onderlatlinks1").css("left", "30px");
jQuery("#onderlatrechts1").css("left", "calc(" + breedtepr1 + "% - 33px)");
jQuery("#onderlatmidden1").css("left", "40px");
jQuery("#onderlatmidden1").css("width", "calc(" + breedtepr1 + "% - 65px)");
jQuery("#onderlatlinks2").css("left", "calc(" + breedtepr1 + "% + 10px)");
jQuery("#onderlatrechts2").css("left", "calc(" + (breedtepr1 + breedtepr2) + "% - 33px)");
jQuery("#onderlatmidden2").css("left", "calc(" + breedtepr1 + "% + 26px)");
jQuery("#onderlatmidden2").css("width", "calc(" + breedtepr2 + "% - 51px)");
jQuery("#onderlatlinks3").show();
jQuery("#onderlatrechts3").show();
jQuery("#onderlatmidden3").show();
jQuery("#onderlatlinks3").css("left", "calc(" + (breedtepr1 + breedtepr2) + "% + 5px)");
jQuery("#onderlatrechts3").css("left", "calc(" + 100 + "% - 54px)");
jQuery("#onderlatmidden3").css("left", "calc(" + (breedtepr1 + breedtepr2) + "% + 20px)");
jQuery("#onderlatmidden3").css("width", "calc(" + breedtepr3 + "% - 61px)");
}
} else {
// breedte
if (jQuery("#tmcp_choice_0_0_1").is(":checked")) {
// percentages toepassen
jQuery(".verdeelgeleiders.nummer2").css("left", "calc(" + 50 + "% - 16px)");
jQuery("#geleidermiddenboven2").css("left", "calc(" + 50 + "% - 19px)");
jQuery("#onderlatlinks1").css("left", "30px");
jQuery("#onderlatrechts1").css("left", "calc(" + 50 + "% - 33px)");
jQuery("#onderlatmidden1").css("left", "40px");
jQuery("#onderlatmidden1").css("width", "calc(" + 50 + "% - 65px)");
jQuery("#onderlatlinks2").css("left", "calc(" + 50 + "% + 11px)");
jQuery("#onderlatrechts2").css("left", "calc(" + 100 + "% - 54px)");
jQuery("#onderlatmidden2").css("left", "calc(" + 50 + "% + 26px)");
jQuery("#onderlatmidden2").css("width", "calc(" + 50 + "% - 61px)");
jQuery("#onderlatlinks3").hide();
jQuery("#onderlatrechts3").hide();
jQuery("#onderlatmidden3").hide();
} else if (jQuery("#tmcp_choice_0_1_2").is(":checked")) {
// percentages toepassen
jQuery(".verdeelgeleiders.nummer1").css("left", "calc(" + 33.3 + "% - 16px)");
jQuery("#geleidermiddenboven1").css("left", "calc(" + 33.3 + "% - 18px)");
jQuery(".verdeelgeleiders.nummer3").css("left", "calc(" + 66.6 + "% - 22px)");
jQuery("#geleidermiddenboven2").css("left", "calc(" + 66.6 + "% - 23px)");
jQuery("#onderlatlinks1").css("left", "30px");
jQuery("#onderlatrechts1").css("left", "calc(" + 33.3 + "% - 33px)");
jQuery("#onderlatmidden1").css("left", "40px");
jQuery("#onderlatmidden1").css("width", "calc(" + 33.3 + "% - 65px)");
jQuery("#onderlatlinks2").css("left", "calc(" + 33.3 + "% + 10px)");
jQuery("#onderlatrechts2").css("left", "calc(" + 66.6 + "% - 33px)");
jQuery("#onderlatmidden2").css("left", "calc(" + 33.3 + "% + 26px)");
jQuery("#onderlatmidden2").css("width", "calc(" + 33.3 + "% - 51px)");
jQuery("#onderlatlinks3").show();
jQuery("#onderlatrechts3").show();
jQuery("#onderlatmidden3").show();
jQuery("#onderlatlinks3").css("left", "calc(" + 66.6 + "% + 5px)");
jQuery("#onderlatrechts3").css("left", "calc(" + 100 + "% - 54px)");
jQuery("#onderlatmidden3").css("left", "calc(" + 66.6 + "% + 20px)");
jQuery("#onderlatmidden3").css("width", "calc(" + 33.3 + "% - 61px)");
}
// hoogte
}
jQuery(".corrigeer").remove();
jQuery(".rolluikoutercontainer").css("visibility", "visible");
var canvas = document.createElement('canvas');
jQuery(".wp-post-image").first().show();
jQuery(".loepje").first().show();
var canvas = document.createElement('canvas');
var context = canvas.getContext('2d');
canvas.width = document.getElementById("rolluikcontainer").offsetWidth;
canvas.height = document.getElementById("rolluikcontainer").offsetHeight;
context.clearRect(0, 0, canvas.width, canvas.height);
var hoogtepr1 = (Number(jQuery("#tmcp_textfield_12").val()) / Number(jQuery("#tmcp_textfield_6").val()) * 100).toFixed(1);
var pixelshoogte1 = (hoogtepr1 / 100 * canvas.height);
var hoogtepantser1 = pixelshoogte1 - 100;
if (jQuery("#tmcp_choice_0_0_1").is(":checked")) {
var hoogtepr2 = (Number(jQuery("#tmcp_textfield_14").val()) / Number(jQuery("#tmcp_textfield_6").val()) * 100).toFixed(1);
} else {
var hoogtepr2 = (Number(jQuery("#tmcp_textfield_13").val()) / Number(jQuery("#tmcp_textfield_6").val()) * 100).toFixed(1);
}
var pixelshoogte2 = (hoogtepr2 / 100 * canvas.height);
var hoogtepantser2 = pixelshoogte2 - 100;
var hoogtepr3 = (Number(jQuery("#tmcp_textfield_14").val()) / Number(jQuery("#tmcp_textfield_6").val()) * 100).toFixed(1);
var pixelshoogte3 = (hoogtepr3 / 100 * canvas.height);
var hoogtepantser3 = pixelshoogte3 - 100;
// pantser 1
var pantser = new Image();
pantser.onload = function() {
var pattern = context.createPattern(pantser, 'repeat');
var pixelsbreedte1 = (breedtepr1 / 100 * canvas.width);
var breedtepantser1 = pixelsbreedte1 - 10;
context.rect(20, 60, breedtepantser1, hoogtepantser1);
context.fillStyle = pattern;
context.fill();
// pantser 2
var pixelsbreedte2 = (breedtepr2 / 100 * canvas.width);
var breedtepantser2 = pixelsbreedte2 - 30;
context.rect((breedtepantser1 + 20), 60, breedtepantser2, hoogtepantser2);
context.fillStyle = pattern;
context.fill();
// pantser 3
var pixelsbreedte3 = (breedtepr3 / 100 * canvas.width);
var breedtepantser3 = pixelsbreedte3 - 30;
context.rect((breedtepantser1 + breedtepantser2 + 40), 60, breedtepantser3, hoogtepantser3);
context.fillStyle = pattern;
context.fill();
context.globalCompositeOperation = 'source-atop';
context.fillStyle = pantserkleur;
context.globalAlpha = 0.75;
context.beginPath();
context.fillRect(20, 60, (canvas.width - 50), (canvas.height - 100));
context.globalCompositeOperation = 'source-over';
context.globalAlpha = 1;
var aantal = 0;
jQuery("#rolluikcontainer > img”).each(function(i) {
var canvascur = document.createElement(‘canvas’);
var contextcur = canvascur.getContext(‘2d’);
canvascur.width = document.getElementById(“rolluikcontainer”).offsetWidth;
canvascur.height = document.getElementById(“rolluikcontainer”).offsetHeight;
var img = jQuery(this).get(0);
var sx = jQuery(this).get(0).offsetLeft;
var sy = jQuery(this).get(0).offsetTop;
var sWidth = jQuery(this).get(0).offsetWidth;
var sHeight = jQuery(this).get(0).offsetHeight;
var donotrender = 0;
if (jQuery(this).hasClass(“kap”)) {
if (jQuery(“#tmcp_choice_1_0_3”).is(“:checked”)) {
if (jQuery(this).hasClass(“rond”)) {
donotrender = 1;
}
} else {
if (jQuery(this).hasClass(“schuin”)) {
donotrender = 1;
}
}
} else if (jQuery(this).hasClass(“verdeelgeleiders”)) {
if (jQuery(“#tmcp_choice_0_0_1”).is(“:checked”)) {
if (jQuery(this).hasClass(“3delig”)) {
donotrender = 1;
}
} else {
if (jQuery(this).hasClass(“2delig”)) {
donotrender = 1;
}
}
}
if (donotrender == 0) {
contextcur.globalCompositeOperation = ‘source-over’;
contextcur.drawImage(img, sx, sy, sWidth, sHeight);
contextcur.globalAlpha = 0.75;
contextcur.globalCompositeOperation = ‘source-atop’;
if (jQuery(this).is(“.kap”)) {
contextcur.fillStyle = kapkleur;
contextcur.fillRect(0, 0, canvascur.width, canvascur.height);
}
if (jQuery(this).is(“.geleiders”)) {
contextcur.fillStyle = geleiderskleur;
contextcur.fillRect(0, 0, canvascur.width, canvascur.height);
}
if (jQuery(this).is(“.onderlat”)) {
contextcur.fillStyle = onderlatkleur;
contextcur.fillRect(0, 0, canvascur.width, canvascur.height);
}
}
var curtodraw = new Image();
curtodraw.onload = function() {
aantal = aantal + 1;
context.drawImage(curtodraw, 0, 0, canvas.width, canvas.height);
if (aantal == 30) {
secondcanvas();
}
}
curtodraw.src = canvascur.toDataURL(“image/png”);
});
var finalcanvas = document.createElement(‘canvas’);
var finalcontext = finalcanvas.getContext(‘2d’);
finalcanvas.width = document.getElementById(“rolluikcontainer”).offsetWidth + 120;
finalcanvas.height = document.getElementById(“rolluikcontainer”).offsetHeight + 20;
finalcontext.clearRect(0, 0, canvas.width, canvas.height);
function secondcanvas() {
var secondimg = new Image();
secondimg.onload = function() {
finalcontext.drawImage(secondimg, 40, 20, canvas.width, canvas.height);
secondimagedone();
}
secondimg.src = canvas.toDataURL(“image/png”);
}
function secondimagedone() {
finalcontext.font = “bold 17px Arial”;
finalcontext.fillStyle = “#64646d”;
var widthhelft = finalcanvas.width / 2 – 60;
var heightarrow1 = finalcanvas.height / 2 – 7;
var heighthelft = finalcanvas.height / 2 + 17;
var heightarrow2 = finalcanvas.height / 2 + 41;
var geleiderhoogte = Number(jQuery(“.hoogte”).eq(0).val()) – kaphoogte;
var lamelbreedte = Number(jQuery(“.breedte”).eq(0).val()) – (geleiderbreedte * 2);
var arrowoffset = 60;
var showdetails = 0;
// if (jQuery(“#tmcp_choice_11_0_15”).is(“:checked”)) {
showdetails = 1;
// }
finalcontext.fillText(jQuery(“#tmcp_textfield_5″).val() + ” mm”, widthhelft, 17);
finalcontext.fillText(jQuery(“#tmcp_textfield_6″).val() + ” mm”, (canvas.width + 40), heighthelft);
finalcontext.font = “bold 11px Arial”;
finalcontext.strokeStyle = “#c5c5c5”;
finalcontext.lineWidth = 1;
finalcontext.fillText(kaphoogte, 0, 90 – khoffset);
finalcontext.beginPath();
finalcontext.moveTo(25, 47 – khoffset);
finalcontext.lineTo(25, 120);
finalcontext.stroke();
finalcontext.beginPath();
finalcontext.moveTo(25, 47 – khoffset);
finalcontext.lineTo(30, 47 – khoffset);
finalcontext.stroke();
finalcontext.beginPath();
finalcontext.moveTo(25, 120);
finalcontext.lineTo(30, 120);
finalcontext.stroke();
finalcontext.beginPath();
finalcontext.moveTo((canvas.width + 60), (50 – khoffset));
finalcontext.lineTo((canvas.width + 60), (heighthelft – 25));
finalcontext.stroke();
finalcontext.beginPath();
finalcontext.moveTo((canvas.width + 60), (heighthelft + 15));
finalcontext.lineTo((canvas.width + 60), (canvas.height + 5));
finalcontext.stroke();
finalcontext.beginPath();
finalcontext.moveTo((canvas.width + 50), (50 – khoffset));
finalcontext.lineTo((canvas.width + 60), (50 – khoffset));
finalcontext.stroke();
finalcontext.beginPath();
finalcontext.moveTo((canvas.width + 60), (canvas.height + 5));
finalcontext.lineTo((canvas.width + 50), (canvas.height + 5));
finalcontext.stroke();
finalcontext.beginPath();
finalcontext.moveTo(40, 12);
finalcontext.lineTo((widthhelft – 15), 12);
finalcontext.stroke();
finalcontext.beginPath();
finalcontext.moveTo((widthhelft + 85), 12);
finalcontext.lineTo((canvas.width + 37), 12);
finalcontext.stroke();
finalcontext.beginPath();
finalcontext.moveTo((canvas.width + 37), 12);
finalcontext.lineTo((canvas.width + 37), 22);
finalcontext.stroke();
finalcontext.beginPath();
finalcontext.moveTo(40, 12);
finalcontext.lineTo(40, 22);
finalcontext.stroke();
if (showdetails == 1) {
if (lamelbreedte.toString().length == 3) {
finalcontext.fillText(lamelbreedte, (widthhelft + 23), canvas.height + 20);
} else {
finalcontext.fillText(lamelbreedte, (widthhelft + 20), canvas.height + 20);
}
finalcontext.fillText(geleiderbreedte, 55, canvas.height + 15);
finalcontext.fillText(geleiderbreedte, (canvas.width + 8), canvas.height + 15);
finalcontext.fillText(geleiderhoogte, 15, (heighthelft + 40 – khoffset));
finalcontext.beginPath();
finalcontext.moveTo(25, 122);
finalcontext.lineTo(25, (heighthelft + 20 – khoffset));
finalcontext.stroke();
finalcontext.beginPath();
finalcontext.moveTo(25, (heighthelft + 55) – khoffset);
finalcontext.lineTo(25, (canvas.height + 4));
finalcontext.stroke();
finalcontext.beginPath();
finalcontext.moveTo(25, (canvas.height + 4));
finalcontext.lineTo(30, (canvas.height + 4));
finalcontext.stroke();
finalcontext.beginPath();
finalcontext.moveTo(73, (canvas.height + 15));
finalcontext.lineTo((widthhelft + 15), (canvas.height + 15));
finalcontext.stroke();
finalcontext.beginPath();
finalcontext.moveTo((widthhelft + 50), (canvas.height + 15));
finalcontext.lineTo((canvas.width + 2), (canvas.height + 15));
finalcontext.stroke();
finalcontext.beginPath();
finalcontext.moveTo(73, (canvas.height + 15));
finalcontext.lineTo(73, (canvas.height + 5));
finalcontext.stroke();
finalcontext.beginPath();
finalcontext.moveTo((canvas.width + 2), (canvas.height + 15));
finalcontext.lineTo((canvas.width + 2), (canvas.height + 5));
finalcontext.stroke();
}
var finalimg = finalcanvas.toDataURL(“image/png”);
jQuery(“.wp-post-image”).first().attr(“src”, finalimg);
jQuery(“#zoomframecontainer”).remove();
}
}
pantser.src = ‘/wp-content/uploads/Rolluik-lamel.png’;
} else {
jQuery(“.corrigeer”).remove();
jQuery(“.wp-post-image”).first().css(“filter”, “opacity(0.2)”);
jQuery(“.wp-post-image”).first().css(“-webkit-filter”, “opacity(0.2)”);
jQuery(“.loepje”).first().hide();
jQuery(“
” + foutcode + “
“).prependTo(“.woocommerce-product-gallery__image > a”).first();
}
}
// levertijd
var ftime = 100;
var ttime = 150;
setTimeout(function() {
jQuery(“.levertijd”).remove();
jQuery(“
“).appendTo(“.tm-floating-box”).first();
}, ftime);
var langerelevertijd = 0;
// bij aparte kleuren
if (jQuery(“#tmcp_choice_15_0_20”).is(“:checked”)) {
langerelevertijd = 1;
}
// bij afgeschuind
if (jQuery(“#tmcp_choice_1_0_3”).is(“:checked”)) {
if (jQuery(“#tmcp_choice_16_6_27”).is(“:checked”)) {
if (jQuery(“#tmcp_choice_17_2_30”).is(“:checked”)) {
langerelevertijd = 1;
}
if (jQuery(“#tmcp_choice_17_3_31”).is(“:checked”)) {
langerelevertijd = 1;
}
if (jQuery(“#tmcp_choice_17_4_32”).is(“:checked”)) {
langerelevertijd = 1;
}
if (jQuery(“#tmcp_choice_17_5_33”).is(“:checked”)) {
langerelevertijd = 1;
}
if (jQuery(“#tmcp_choice_17_6_34”).is(“:checked”)) {
langerelevertijd = 1;
}
}
} else {
// bij rond
langerelevertijd = 1;
if (jQuery(“#tmcp_choice_16_0_21”).is(“:checked”)) {
langerelevertijd = 0;
}
if (jQuery(“#tmcp_choice_16_5_26”).is(“:checked”)) {
langerelevertijd = 0;
}
if (jQuery(“#tmcp_choice_16_6_27”).is(“:checked”)) {
if (jQuery(“#tmcp_choice_17_0_28”).is(“:checked”)) {
langerelevertijd = 0;
}
}
}
if (jQuery(“#tmcp_choice_11_1_16”).is(“:checked”)) {
langerelevertijd = 2;
}
if (langerelevertijd == 1) {
setTimeout(function() {
jQuery(“#variantstr”).html(“bezorgd”);
jQuery(“.fromday”).html(“4”);
jQuery(“.today”).html(“5”);
updateindicatie();
}, ttime);
} else if (langerelevertijd == 2) {
setTimeout(function() {
jQuery(“#variantstr”).html(“geplaatst. De producten worden eerst bij u bezorgd, waarna de monteur contact met u zal opnemen voor een afspraak”);
jQuery(“.fromday”).html(“5”);
jQuery(“.today”).html(“8”);
updateindicatie();
}, ttime);
} else if (langerelevertijd == 0) {
jQuery(“#variantstr”).html(“bezorgd”);
setTimeout(function() {
jQuery(“.fromday”).html(“4”);
jQuery(“.today”).html(“5”);
updateindicatie();
}, ttime);
}
setTimeout(function() {
var calcheight = document.getElementsByClassName(“entry-summary”)[0].offsetHeight – 400;
jQuery(“.wp-post-image”).first().parents().eq(1).css(“height”, calcheight);
}, 250);
// Binnen bereik
if (jQuery(“#tmcp_textfield_6, #tmcp_textfield_12, #tmcp_textfield_13, #tmcp_textfield_14”).val() > 2800) {
jQuery(“.rolluikoutercontainer”).first().hide();
foutcode = “Corrigeer de maat …
Maximale hoogte: 2800 mm.”;
} else if ((jQuery(“#tmcp_textfield_6”).val() < 600) || (jQuery("#tmcp_textfield_12").val() < 600) || (jQuery("#tmcp_textfield_13").val() < 600) || (jQuery("#tmcp_textfield_14").val() < 600)) {
jQuery(".rolluikoutercontainer").first().hide();
foutcode = "Corrigeer de maat ...
Minimale hoogte: 600 mm.”;
} else if ((jQuery(“#tmcp_textfield_9”).val() < 700) || (jQuery("#tmcp_textfield_10").val() < 700) || (jQuery("#tmcp_textfield_11").val() < 700)) {
jQuery(".rolluikoutercontainer").first().hide();
foutcode = "Corrigeer de maat ...
Minimale breedte per deel: 700 mm.”;
} else if (jQuery(“#tmcp_choice_0_1_2”).is(“:checked”) && (jQuery(“#tmcp_textfield_5”).val() < 2100)) {
jQuery(".rolluikoutercontainer").first().hide();
foutcode = "Corrigeer de maat ...
Minimale breedte 3-delig rolluik: 2100 mm.”;
} else if (jQuery(“#tmcp_choice_0_1_2”).is(“:checked”) && (jQuery(“#tmcp_textfield_5”).val() > 4800)) {
jQuery(“.rolluikoutercontainer”).first().hide();
foutcode = “Corrigeer de maat …
Maximale breedte 3-delig rolluik: 4800 mm.”;
} else if (jQuery(“#tmcp_choice_0_0_1”).is(“:checked”) && (jQuery(“#tmcp_textfield_5”).val() < 1400)) {
jQuery(".rolluikoutercontainer").first().hide();
foutcode = "Corrigeer de maat ...
Minimale breedte 2-delig rolluik: 1400 mm.”;
} else if (jQuery(“#tmcp_choice_0_0_1”).is(“:checked”) && (jQuery(“#tmcp_textfield_5”).val() > 4200)) {
jQuery(“.rolluikoutercontainer”).first().hide();
foutcode = “Corrigeer de maat …
Maximale breedte 2-delig rolluik: 4200 mm.”;
} else if (jQuery(“#tmcp_choice_0_0_1”).is(“:checked”) && !jQuery(“#tmcp_choice_4_0_7”).is(“:checked”) && ((Number(jQuery(“#tmcp_textfield_9”).val()) + Number(jQuery(“#tmcp_textfield_11”).val())) != Number(jQuery(“#tmcp_textfield_5”).val()))) {
jQuery(“.rolluikoutercontainer”).first().hide();
foutcode = “De breedte van het linker deel en rechter deel samen moet uitkomen op ” + jQuery(“#tmcp_textfield_5″).val() + ” mm.”;
} else if (jQuery(“#tmcp_choice_0_1_2”).is(“:checked”) && !jQuery(“#tmcp_choice_4_0_7”).is(“:checked”) && ((Number(jQuery(“#tmcp_textfield_9”).val()) + Number(jQuery(“#tmcp_textfield_10”).val()) + Number(jQuery(“#tmcp_textfield_11”).val())) != Number(jQuery(“#tmcp_textfield_5”).val()))) {
jQuery(“.rolluikoutercontainer”).first().hide();
foutcode = “De breedte van de delen samen moet uitkomen op ” + jQuery(“#tmcp_textfield_5″).val() + ” mm.”;
} else if ((jQuery(“#tmcp_choice_0_0_1”).is(“:checked”)) && !jQuery(“#tmcp_choice_4_0_7”).is(“:checked”) && (Number(jQuery(“#tmcp_textfield_12”).val()) > Number(jQuery(“#tmcp_textfield_6”).val()) || (Number(jQuery(“#tmcp_textfield_14”).val()) > Number(jQuery(“#tmcp_textfield_6”).val())))) {
jQuery(“.rolluikoutercontainer”).first().hide();
foutcode = “Je hebt een hoogte ingevuld, die groter is dan ‘grootste hoogte’: ” + jQuery(“#tmcp_textfield_6″).val() + ” mm.”;
document.getElementById(‘tmcp_textfield_6’).parentElement.scrollIntoView({
block: ‘center’,
behavior: ‘smooth’
});
} else if ((jQuery(“#tmcp_choice_0_0_1”).is(“:checked”)) && !jQuery(“#tmcp_choice_4_0_7”).is(“:checked”) && (Number(jQuery(“#tmcp_textfield_12”).val()) != Number(jQuery(“#tmcp_textfield_6”).val()) && (Number(jQuery(“#tmcp_textfield_14”).val()) != Number(jQuery(“#tmcp_textfield_6”).val())))) {
jQuery(“.rolluikoutercontainer”).first().hide();
foutcode = “Eén van de delen moet gelijk zijn aan ‘grootste hoogte’: ” + jQuery(“#tmcp_textfield_6″).val() + ” mm.”;
} else if ((jQuery(“#tmcp_choice_0_1_2”).is(“:checked”)) && !jQuery(“#tmcp_choice_4_0_7”).is(“:checked”) && (Number(jQuery(“#tmcp_textfield_12”).val()) > Number(jQuery(“#tmcp_textfield_6”).val()) || Number(jQuery(“#tmcp_textfield_13”).val()) > Number(jQuery(“#tmcp_textfield_6”).val()) || (Number(jQuery(“#tmcp_textfield_14”).val()) > Number(jQuery(“#tmcp_textfield_6”).val())))) {
jQuery(“.rolluikoutercontainer”).first().hide();
foutcode = “Je hebt een hoogte ingevuld, die groter is dan ‘grootste hoogte’: ” + jQuery(“#tmcp_textfield_6″).val() + ” mm.”;
document.getElementById(‘tmcp_textfield_6’).parentElement.scrollIntoView({
block: ‘center’,
behavior: ‘smooth’
});
} else if ((jQuery(“#tmcp_choice_0_1_2”).is(“:checked”)) && !jQuery(“#tmcp_choice_4_0_7”).is(“:checked”) && (Number(jQuery(“#tmcp_textfield_12”).val()) != Number(jQuery(“#tmcp_textfield_6”).val()) && Number(jQuery(“#tmcp_textfield_13”).val()) != Number(jQuery(“#tmcp_textfield_6”).val()) && (Number(jQuery(“#tmcp_textfield_14”).val()) != Number(jQuery(“#tmcp_textfield_6”).val())))) {
jQuery(“.rolluikoutercontainer”).first().hide();
foutcode = “Eén van de delen moet gelijk zijn aan ‘grootste hoogte’: ” + jQuery(“#tmcp_textfield_6″).val() + ” mm.”;
} else {
jQuery(“.rolluikoutercontainer”).first().show();
jQuery(“.wp-post-image”).first().css(“filter”, “opacity(1)”);
jQuery(“.wp-post-image”).first().css(“-webkit-filter”, “opacity(1)”);
}
// bereken opp
var breedte = jQuery(“#tmcp_textfield_5”).val();
var hoogte = jQuery(“#tmcp_textfield_6”).val();
var opp = (breedte * hoogte) / 1000;
jQuery(“#tmcp_textfield_133”).val(opp);
jQuery(“#tmcp_textfield_133”).trigger(‘keyup’);
// formaat aanpassen
var breedte = jQuery(“#tmcp_textfield_5”).val() * 0.4;
var hoogte = jQuery(“#tmcp_textfield_6”).val() * 0.4;
jQuery(“#rolluikcontainer”).css(“width”, breedte + “px”);
jQuery(“#rolluikcontainer”).css(“height”, hoogte + “px”);
// kaphoogtes
var ingevuldehoogte = jQuery(“#tmcp_textfield_6”).val();
if (ingevuldehoogte <= 1300) {
jQuery(".kap").css("height", "70px");
jQuery(".kap").css("top", "30px");
jQuery("#pantserkleur").css("top", "30px");
kaphoogte = 150;
khoffset = 0;
} else if (ingevuldehoogte > 1300 && ingevuldehoogte <= 1600) {
jQuery(".kap").css("height", "76px");
jQuery(".kap").css("top", "24px");
jQuery("#pantserkleur").css("top", "24px");
kaphoogte = 165;
khoffset = 5;
} else if (ingevuldehoogte > 1600 && ingevuldehoogte <= 2100) {
jQuery(".kap").css("height", "82px");
jQuery(".kap").css("top", "20px");
jQuery("#pantserkleur").css("top", "20px");
kaphoogte = 180;
khoffset = 10;
} else if (ingevuldehoogte > 2100 && ingevuldehoogte <= 2850) {
jQuery(".kap").css("height", "88px");
jQuery(".kap").css("top", "16px");
jQuery("#pantserkleur").css("top", "16px");
kaphoogte = 205;
khoffset = 15;
} else if (ingevuldehoogte > 2850) {
if (jQuery(“#tmcp_choice_1_0_3”).is(“:checked”)) {
jQuery(“.kap”).css(“height”, “93px”);
jQuery(“.kap”).css(“top”, “10px”);
jQuery(“#pantserkleur”).css(“top”, “10px”);
kaphoogte = 230;
khoffset = 20;
} else {
jQuery(“.kap”).css(“height”, “88px”);
jQuery(“.kap”).css(“top”, “16px”);
jQuery(“#pantserkleur”).css(“top”, “16px”);
kaphoogte = 205;
khoffset = 15;
}
}
// kleur
if (jQuery(“#tmcp_choice_15_0_20”).is(‘:checked’)) {
// aparte kleur omkasting
if (jQuery(“#tmcp_choice_18_0_35”).is(‘:checked’)) {
kapkleur = “#fdfdfd”;
geleiderskleur = “#fdfdfd”;
onderlatkleur = “#fdfdfd”;
} else if (jQuery(“#tmcp_choice_18_1_36”).is(‘:checked’)) {
kapkleur = “#fcf8ee”;
geleiderskleur = “#fcf8ee”;
onderlatkleur = “#fcf8ee”;
} else if (jQuery(“#tmcp_choice_18_2_37”).is(‘:checked’)) {
kapkleur = “rgb(39, 39, 39)”;
geleiderskleur = “rgb(39, 39, 39)”;
onderlatkleur = “rgb(39, 39, 39)”;
} else if (jQuery(“#tmcp_choice_18_3_38”).is(‘:checked’)) {
kapkleur = “rgb(5, 5, 35)”;
geleiderskleur = “rgb(5, 5, 35)”;
onderlatkleur = “rgb(5, 5, 35)”;
} else if (jQuery(“#tmcp_choice_18_4_39”).is(‘:checked’)) {
kapkleur = “#000000”;
geleiderskleur = “#000000”;
onderlatkleur = “#000000”;
} else if (jQuery(“#tmcp_choice_18_5_40”).is(‘:checked’)) {
kapkleur = “rgb(0, 30, 0)”;
geleiderskleur = “rgb(0, 30, 0)”;
onderlatkleur = “rgb(0, 30, 0)”;
} else if (jQuery(“#tmcp_choice_18_6_41”).is(‘:checked’)) {
kapkleur = “#c9bdb4”;
geleiderskleur = “#c9bdb4”;
onderlatkleur = “#c9bdb4”;
} else if (jQuery(“#tmcp_choice_18_7_42”).is(‘:checked’)) {
kapkleur = “#e4d4b7”;
geleiderskleur = “#e4d4b7”;
onderlatkleur = “#e4d4b7”;
} else if (jQuery(“#tmcp_choice_18_8_43”).is(‘:checked’)) {
kapkleur = “#3d2000”;
geleiderskleur = “#3d2000”;
onderlatkleur = “#3d2000”;
} else if (jQuery(“#tmcp_choice_18_9_44”).is(‘:checked’)) {
kapkleur = “#a9b4b3”;
geleiderskleur = “#a9b4b3”;
onderlatkleur = “#a9b4b3”;
} else if (jQuery(“#tmcp_choice_18_10_45”).is(‘:checked’)) {
kapkleur = “#650000”;
geleiderskleur = “#650000”;
onderlatkleur = “#650000”;
} else if (jQuery(“#tmcp_choice_18_11_46”).is(‘:checked’)) {
kapkleur = “#bfbfbf”;
geleiderskleur = “#bfbfbf”;
onderlatkleur = “#bfbfbf”;
} else if (jQuery(“#tmcp_choice_18_12_47”).is(‘:checked’)) {
kapkleur = “rgb(80, 80, 80)”;
geleiderskleur = “rgb(80, 80, 80)”;
onderlatkleur = “rgb(80, 80, 80)”;
}
// pantser
if (jQuery(“#tmcp_choice_19_0_48”).is(‘:checked’)) {
pantserkleur = “#fdfdfd”;
} else if (jQuery(“#tmcp_choice_19_1_49”).is(‘:checked’)) {
pantserkleur = “#fcf8ee”;
} else if (jQuery(“#tmcp_choice_19_2_50”).is(‘:checked’)) {
pantserkleur = “rgb(39, 39, 39)”;
} else if (jQuery(“#tmcp_choice_19_3_51”).is(‘:checked’)) {
pantserkleur = “rgb(5, 5, 35)”;
} else if (jQuery(“#tmcp_choice_19_4_52”).is(‘:checked’)) {
pantserkleur = “#000000”;
} else if (jQuery(“#tmcp_choice_19_5_53”).is(‘:checked’)) {
pantserkleur = “rgb(0, 30, 0)”;
} else if (jQuery(“#tmcp_choice_19_6_54”).is(‘:checked’)) {
pantserkleur = “#c9bdb4”;
} else if (jQuery(“#tmcp_choice_19_7_55”).is(‘:checked’)) {
pantserkleur = “#e4d4b7”;
} else if (jQuery(“#tmcp_choice_19_8_56”).is(‘:checked’)) {
pantserkleur = “#3d2000”;
} else if (jQuery(“#tmcp_choice_19_9_57”).is(‘:checked’)) {
pantserkleur = “#a9b4b3”;
} else if (jQuery(“#tmcp_choice_19_10_58”).is(‘:checked’)) {
pantserkleur = “#650000”;
} else if (jQuery(“#tmcp_choice_19_11_59”).is(‘:checked’)) {
pantserkleur = “#bfbfbf”;
} else if (jQuery(“#tmcp_choice_19_12_60”).is(‘:checked’)) {
pantserkleur = “rgb(80, 80, 80)”;
}
} else {
// alle onderdelen zelfde kleur
if (jQuery(“#tmcp_choice_16_0_21”).is(‘:checked’)) {
pantserkleur = “#fdfdfd”;
kapkleur = “#fdfdfd”;
geleiderskleur = “#fdfdfd”;
onderlatkleur = “#fdfdfd”;
} else if (jQuery(“#tmcp_choice_16_1_22”).is(‘:checked’)) {
pantserkleur = “#fcf8ee”;
kapkleur = “#fcf8ee”;
geleiderskleur = “#fcf8ee”;
onderlatkleur = “#fcf8ee”;
} else if (jQuery(“#tmcp_choice_16_2_23”).is(‘:checked’)) {
pantserkleur = “rgb(39, 39, 39)”;
kapkleur = “rgb(39, 39, 39)”;
geleiderskleur = “rgb(39, 39, 39)”;
onderlatkleur = “rgb(39, 39, 39)”;
} else if (jQuery(“#tmcp_choice_16_3_24”).is(‘:checked’)) {
pantserkleur = “#bfbfbf”;
kapkleur = “#bfbfbf”;
geleiderskleur = “#bfbfbf”;
onderlatkleur = “#bfbfbf”;
} else if (jQuery(“#tmcp_choice_16_4_25”).is(‘:checked’)) {
pantserkleur = “#c9bdb4”;
kapkleur = “#c9bdb4”;
geleiderskleur = “#c9bdb4”;
onderlatkleur = “#c9bdb4”;
} else if (jQuery(“#tmcp_choice_16_5_26”).is(‘:checked’)) {
pantserkleur = “#3d2000”;
kapkleur = “#3d2000”;
geleiderskleur = “#3d2000”;
onderlatkleur = “#3d2000”;
} else if (jQuery(“#tmcp_choice_17_0_28”).is(‘:checked’)) {
pantserkleur = “#a9b4b3”;
kapkleur = “#a9b4b3”;
geleiderskleur = “#a9b4b3”;
onderlatkleur = “#a9b4b3”;
} else if (jQuery(“#tmcp_choice_17_1_29”).is(‘:checked’)) {
pantserkleur = “#e4d4b7”;
kapkleur = “#e4d4b7”;
geleiderskleur = “#e4d4b7”;
onderlatkleur = “#e4d4b7”;
} else if (jQuery(“#tmcp_choice_17_2_30”).is(‘:checked’)) {
pantserkleur = “rgb(5, 5, 35)”;
kapkleur = “rgb(5, 5, 35)”;
geleiderskleur = “rgb(5, 5, 35)”;
onderlatkleur = “rgb(5, 5, 35)”;
} else if (jQuery(“#tmcp_choice_17_3_31”).is(‘:checked’)) {
pantserkleur = “#000000”;
kapkleur = “#000000”;
geleiderskleur = “#000000”;
onderlatkleur = “#000000”;
} else if (jQuery(“#tmcp_choice_17_4_32”).is(‘:checked’)) {
pantserkleur = “rgb(0, 30, 0)”;
kapkleur = “rgb(0, 30, 0)”;
geleiderskleur = “rgb(0, 30, 0)”;
onderlatkleur = “rgb(0, 30, 0)”;
} else if (jQuery(“#tmcp_choice_17_5_33”).is(‘:checked’)) {
pantserkleur = “#650000”;
kapkleur = “#650000”;
geleiderskleur = “#650000”;
onderlatkleur = “#650000”;
} else if (jQuery(“#tmcp_choice_17_6_34”).is(‘:checked’)) {
pantserkleur = “rgb(80, 80, 80)”;
kapkleur = “rgb(80, 80, 80)”;
geleiderskleur = “rgb(80, 80, 80)”;
onderlatkleur = “rgb(80, 80, 80)”;
}
}
var indexb = 0;
var indexh = 0;
function getelementprice(breedtecm, hoogtecm) {
if (breedtecm <= 100) {
indexb = 0;
} else if (breedtecm > 100 && breedtecm <= 110) {
indexb = 1;
} else if (breedtecm > 110 && breedtecm <= 120) {
indexb = 2;
} else if (breedtecm > 120 && breedtecm <= 130) {
indexb = 3;
} else if (breedtecm > 130 && breedtecm <= 140) {
indexb = 4;
} else if (breedtecm > 140 && breedtecm <= 150) {
indexb = 5;
} else if (breedtecm > 150 && breedtecm <= 160) {
indexb = 6;
} else if (breedtecm > 160 && breedtecm <= 170) {
indexb = 7;
} else if (breedtecm > 170 && breedtecm <= 180) {
indexb = 8;
} else if (breedtecm > 180 && breedtecm <= 190) {
indexb = 9;
} else if (breedtecm > 190 && breedtecm <= 200) {
indexb = 10;
} else if (breedtecm > 200 && breedtecm <= 210) {
indexb = 11;
} else if (breedtecm > 210 && breedtecm <= 220) {
indexb = 12;
} else if (breedtecm > 220 && breedtecm <= 230) {
indexb = 13;
} else if (breedtecm > 230 && breedtecm <= 240) {
indexb = 14;
} else if (breedtecm > 240 && breedtecm <= 250) {
indexb = 15;
} else if (breedtecm > 250 && breedtecm <= 260) {
indexb = 16;
} else if (breedtecm > 260 && breedtecm <= 270) {
indexb = 17;
} else if (breedtecm > 270 && breedtecm <= 280) {
indexb = 18;
} else if (breedtecm > 280 && breedtecm <= 290) {
indexb = 19;
} else if (breedtecm > 290 && breedtecm <= 300) {
indexb = 20;
} else if (breedtecm > 300 && breedtecm <= 310) {
indexb = 21;
} else if (breedtecm > 310 && breedtecm <= 320) {
indexb = 22;
} else if (breedtecm > 320 && breedtecm <= 330) {
indexb = 23;
} else if (breedtecm > 330) {
indexb = 24;
}
if (hoogtecm <= 100) {
indexh = 0;
} else if (hoogtecm > 100 && hoogtecm <= 110) {
indexh = 1;
} else if (hoogtecm > 110 && hoogtecm <= 120) {
indexh = 2;
} else if (hoogtecm > 120 && hoogtecm <= 130) {
indexh = 3;
} else if (hoogtecm > 130 && hoogtecm <= 140) {
indexh = 4;
} else if (hoogtecm > 140 && hoogtecm <= 150) {
indexh = 5;
} else if (hoogtecm > 150 && hoogtecm <= 160) {
indexh = 6;
} else if (hoogtecm > 160 && hoogtecm <= 170) {
indexh = 7;
} else if (hoogtecm > 170 && hoogtecm <= 180) {
indexh = 8;
} else if (hoogtecm > 180 && hoogtecm <= 190) {
indexh = 9;
} else if (hoogtecm > 190 && hoogtecm <= 200) {
indexh = 10;
} else if (hoogtecm > 200 && hoogtecm <= 210) {
indexh = 11;
} else if (hoogtecm > 210 && hoogtecm <= 220) {
indexh = 12;
} else if (hoogtecm > 220 && hoogtecm <= 230) {
indexh = 13;
} else if (hoogtecm > 230 && hoogtecm <= 240) {
indexh = 14;
} else if (hoogtecm > 240 && hoogtecm <= 250) {
indexh = 15;
} else if (hoogtecm > 250 && hoogtecm <= 260) {
indexh = 16;
} else if (hoogtecm > 260 && hoogtecm <= 270) {
indexh = 17;
} else if (hoogtecm > 270 && hoogtecm <= 280) {
indexh = 18;
} else if (hoogtecm > 280 && hoogtecm <= 290) {
indexh = 19;
} else if (hoogtecm > 290) {
indexh = 20;
}
}
// Basisprijs invullen
var prijskoppeling = 33;
var prijselement1 = 0;
var prijselement2 = 0;
var prijselement3 = 0;
var prijstotaal = 0;
if (jQuery(“#tmcp_choice_0_0_1”).is(“:checked”)) {
// 2 delig
prijskoppeling = 33;
if (jQuery(“#tmcp_choice_4_0_7”).is(“:checked”)) {
// gelijk verdelen, dus breedte = 50% van totale breedte
// prijselement1
var huidigbreed = Number(jQuery(“#tmcp_textfield_5”).val() / 10 / 2).toFixed(0);
var huidighoog = jQuery(“#tmcp_textfield_6”).val() / 10;
getelementprice(huidigbreed, huidighoog);
if (jQuery(“#tmcp_choice_1_0_3”).is(“:checked”)) {
prijselement1 = Number((1.21 * afgeschuind[indexh][indexb]).toFixed(0)) + 75;
} else if (jQuery(“#tmcp_choice_1_1_4”).is(“:checked”)) {
// rond
prijselement1 = Number((1.21 * afgeschuind[indexh][indexb]).toFixed(0)) * 1.1 + 75;
}
// prijselement2
var huidigbreed = Number(jQuery(“#tmcp_textfield_5”).val() / 10 / 2).toFixed(0);
var huidighoog = jQuery(“#tmcp_textfield_6”).val() / 10;
getelementprice(huidigbreed, huidighoog);
if (jQuery(“#tmcp_choice_1_0_3”).is(“:checked”)) {
prijselement2 = Number((1.21 * afgeschuind[indexh][indexb]).toFixed(0)) + 75;
} else if (jQuery(“#tmcp_choice_1_1_4”).is(“:checked”)) {
// rond
prijselement2 = Number((1.21 * afgeschuind[indexh][indexb]).toFixed(0)) * 1.1 + 75;
}
// prijselement3
prijselement3 = 0;
} else if (jQuery(“#tmcp_choice_4_1_8”).is(“:checked”)) {
// Zelf breedtes per deel opgeven, 2-delig
// prijselement1
var huidigbreed = Number(jQuery(“#tmcp_textfield_9”).val() / 10).toFixed(0);
var huidighoog = jQuery(“#tmcp_textfield_12”).val() / 10;
getelementprice(huidigbreed, huidighoog);
if (jQuery(“#tmcp_choice_1_0_3”).is(“:checked”)) {
prijselement1 = Number((1.21 * afgeschuind[indexh][indexb]).toFixed(0)) + 75;
} else if (jQuery(“#tmcp_choice_1_1_4”).is(“:checked”)) {
// rond
prijselement1 = Number((1.21 * afgeschuind[indexh][indexb]).toFixed(0)) * 1.1 + 75;
}
// prijselement2
var huidigbreed = Number(jQuery(“#tmcp_textfield_11”).val() / 10).toFixed(0);
var huidighoog = jQuery(“#tmcp_textfield_14”).val() / 10;
getelementprice(huidigbreed, huidighoog);
if (jQuery(“#tmcp_choice_1_0_3”).is(“:checked”)) {
prijselement2 = Number((1.21 * afgeschuind[indexh][indexb]).toFixed(0)) + 75;
} else if (jQuery(“#tmcp_choice_1_1_4”).is(“:checked”)) {
// rond
prijselement2 = Number((1.21 * afgeschuind[indexh][indexb]).toFixed(0)) * 1.1 + 75;
}
// prijselement3
prijselement3 = 0;
}
} else if (jQuery(“#tmcp_choice_0_1_2”).is(“:checked”)) {
// 3 delig
prijskoppeling = 65;
if (jQuery(“#tmcp_choice_4_0_7”).is(“:checked”)) {
// gelijk verdelen, dus breedte = 33.3% van totale breedte
// prijselement1
var huidigbreed = Number(jQuery(“#tmcp_textfield_5”).val() / 10 / 3).toFixed(0);
var huidighoog = jQuery(“#tmcp_textfield_6”).val() / 10;
getelementprice(huidigbreed, huidighoog);
if (jQuery(“#tmcp_choice_1_0_3”).is(“:checked”)) {
prijselement1 = Number((1.21 * afgeschuind[indexh][indexb]).toFixed(0)) + 75;
} else if (jQuery(“#tmcp_choice_1_1_4”).is(“:checked”)) {
// rond
prijselement1 = Number((1.21 * afgeschuind[indexh][indexb]).toFixed(0)) * 1.1 + 75;
}
// prijselement2
var huidigbreed = Number(jQuery(“#tmcp_textfield_5”).val() / 10 / 3).toFixed(0);
var huidighoog = jQuery(“#tmcp_textfield_6”).val() / 10;
getelementprice(huidigbreed, huidighoog);
if (jQuery(“#tmcp_choice_1_0_3”).is(“:checked”)) {
prijselement2 = Number((1.21 * afgeschuind[indexh][indexb]).toFixed(0)) + 75;
} else if (jQuery(“#tmcp_choice_1_1_4”).is(“:checked”)) {
// rond
prijselement2 = Number((1.21 * afgeschuind[indexh][indexb]).toFixed(0)) * 1.1 + 75;
}
// prijselement3
var huidigbreed = Number(jQuery(“#tmcp_textfield_5”).val() / 10 / 3).toFixed(0);
var huidighoog = jQuery(“#tmcp_textfield_6”).val() / 10;
getelementprice(huidigbreed, huidighoog);
if (jQuery(“#tmcp_choice_1_0_3”).is(“:checked”)) {
prijselement3 = Number((1.21 * afgeschuind[indexh][indexb]).toFixed(0)) + 100;
} else if (jQuery(“#tmcp_choice_1_1_4”).is(“:checked”)) {
// rond
prijselement3 = Number((1.21 * afgeschuind[indexh][indexb]).toFixed(0)) * 1.1 + 100;
}
} else if (jQuery(“#tmcp_choice_4_1_8”).is(“:checked”)) {
// prijselement1
var huidigbreed = Number(jQuery(“#tmcp_textfield_9”).val() / 10).toFixed(0);
var huidighoog = jQuery(“#tmcp_textfield_12”).val() / 10;
getelementprice(huidigbreed, huidighoog);
if (jQuery(“#tmcp_choice_1_0_3”).is(“:checked”)) {
prijselement1 = Number((1.21 * afgeschuind[indexh][indexb]).toFixed(0)) + 75;
} else if (jQuery(“#tmcp_choice_1_1_4”).is(“:checked”)) {
// rond
prijselement1 = Number((1.21 * afgeschuind[indexh][indexb]).toFixed(0)) * 1.1 + 75;
}
// prijselement2
var huidigbreed = Number(jQuery(“#tmcp_textfield_10”).val() / 10).toFixed(0);
var huidighoog = jQuery(“#tmcp_textfield_13”).val() / 10;
getelementprice(huidigbreed, huidighoog);
if (jQuery(“#tmcp_choice_1_0_3”).is(“:checked”)) {
prijselement2 = Number((1.21 * afgeschuind[indexh][indexb]).toFixed(0)) + 75;
} else if (jQuery(“#tmcp_choice_1_1_4”).is(“:checked”)) {
// rond
prijselement2 = Number((1.21 * afgeschuind[indexh][indexb]).toFixed(0)) * 1.1 + 75;
}
// prijselement3
var huidigbreed = Number(jQuery(“#tmcp_textfield_11”).val() / 10).toFixed(0);
var huidighoog = jQuery(“#tmcp_textfield_14”).val() / 10;
getelementprice(huidigbreed, huidighoog);
if (jQuery(“#tmcp_choice_1_0_3”).is(“:checked”)) {
prijselement3 = Number((1.21 * afgeschuind[indexh][indexb]).toFixed(0)) + 100;
} else if (jQuery(“#tmcp_choice_1_1_4”).is(“:checked”)) {
// rond
prijselement3 = Number((1.21 * afgeschuind[indexh][indexb]).toFixed(0)) * 1.1 + 100;
}
}
}
jQuery(“.kaphoogte”).eq(0).val(kaphoogte + ” mm”);
jQuery(“.geleiderbreedte”).eq(0).val(geleiderbreedte + ” mm”);
jQuery(“.kaphoogte, .geleiderhoogte”).trigger(‘keyup’);
// prijsinvullen
prijstotaal = prijskoppeling + prijselement1 + prijselement2 + prijselement3;
try {
jQuery(“.basisprijs”).eq(0).val(prijstotaal);
jQuery(“.basisprijs”).eq(0).trigger(‘keyup’);
} catch (error) {}
// vensterbankprofiel
if (jQuery(“.vensterbankprofielen”).eq(0).is(‘:checked’)) {
try {
jQuery(“.vensterbankprofiel”).eq(0).val(jQuery(“.breedte”).eq(0).val() / 1000 * 7.45);
jQuery(“.vensterbankprofiel”).eq(0).trigger(‘keyup’);
} catch (error) {}
}
if (jQuery(“.vensterbankprofielen”).eq(1).is(‘:checked’)) {
try {
jQuery(“.vensterbankprofiel”).eq(0).val(jQuery(“.breedte”).eq(0).val() / 1000 * 9.30);
jQuery(“.vensterbankprofiel”).eq(0).trigger(‘keyup’);
} catch (error) {}
}
// end function
try {
updatevatex();
} catch (error) {}
if (genplaatje == 3) {
setTimeout(function() {
update(1);
}, 100);
}
setTimeout(function() {
bezig = 0;
}, 250);
}, 20);
}
// global var foutcode
var foutcode = “Corrigeer de maat …”;
var breedtepr1 = 50;
var breedtepr2 = 50;
var breedtepr3 = 50;
// prijzen
var afgeschuind = [
// index: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
// L ? B ? 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 320 330 340
/* index: 0, 100 */
[132, 138, 147, 156, 166, 173, 181, 190, 199, 207, 214, 223, 233, 238, 249, 257, 264, 276, 283, 292, 300, 309, 318, 326, 337],
/* index: 1, 110 */
[136, 147, 156, 166, 173, 181, 192, 201, 208, 218, 227, 236, 248, 255, 261, 268, 281, 290, 298, 307, 316, 324, 335, 343, 350],
/* index: 2, 120 */
[141, 155, 166, 173, 181, 192, 203, 210, 220, 231, 238, 251, 259, 266, 277, 287, 294, 303, 311, 322, 333, 341, 348, 357, 367],
/* index: 3, 130 */
[151, 164, 173, 181, 192, 203, 212, 222, 231, 242, 253, 262, 272, 283, 292, 303, 311, 322, 333, 343, 350, 367, 369, 378, 385],
/* index: 4, 140 */
[162, 171, 181, 192, 203, 212, 225, 235, 246, 255, 264, 277, 289, 298, 309, 320, 329, 341, 350, 363, 370, 380, 387, 398, 406],
/* index: 5, 150 */
[168, 177, 190, 201, 210, 222, 235, 248, 255, 264, 279, 290, 300, 311, 320, 335, 344, 356, 367, 378, 385, 395, 404, 411, 423],
/* index: 6, 160 */
[171, 182, 199, 208, 220, 231, 246, 255, 264, 279, 292, 300, 311, 322, 335, 346, 361, 370, 382, 393, 402, 410, 421, 428, 436],
/* index: 7, 170 */
[179, 194, 207, 218, 231, 242, 255, 264, 279, 292, 305, 318, 329, 341, 352, 365, 378, 387, 402, 411, 423, 430, 439, 449, 456],
/* index: 8, 180 */
[190, 203, 214, 227, 238, 253, 264, 279, 292, 305, 320, 335, 344, 357, 370, 383, 398, 408, 421, 432, 441, 450, 458, 467, 477],
/* index: 9, 190 */
[203, 214, 231, 246, 257, 268, 287, 298, 311, 326, 343, 356, 369, 382, 395, 408, 424, 436, 450, 464, 471, 482, 491, 499, 510],
/* index: 10,200 */
[214, 231, 246, 259, 272, 290, 305, 320, 335, 348, 363, 378, 393, 406, 421, 434, 450, 464, 478, 495, 506, 514, 523, 531, 540],
/* index: 11,210 */
[222, 236, 253, 266, 283, 298, 315, 329, 344, 361, 374, 387, 406, 421, 434, 450, 464, 478, 495, 512, 519, 529, 538, 545, 555],
/* index: 12,220 */
[227, 248, 261, 277, 292, 307, 324, 341, 356, 370, 383, 402, 419, 434, 445, 464, 478, 495, 512, 527, 536, 544, 999, 999, 999],
/* index: 13,230 */
[235, 253, 266, 287, 300, 316, 335, 348, 365, 382, 398, 413, 430, 445, 458, 478, 495, 512, 527, 534, 544, 999, 999, 999, 999],
/* index: 14,240 */
[238, 259, 277, 292, 309, 324, 343, 357, 374, 391, 410, 426, 443, 458, 471, 493, 512, 527, 536, 544, 999, 999, 999, 999, 999],
/* index: 15,250 */
[249, 264, 283, 300, 318, 337, 352, 369, 383, 404, 423, 439, 456, 471, 488, 508, 527, 534, 999, 999, 999, 999, 999, 999, 999],
/* index: 16,260 */
[255, 272, 292, 309, 326, 344, 363, 380, 398, 413, 432, 452, 469, 488, 499, 523, 542, 999, 999, 999, 999, 999, 999, 999, 999],
/* index: 17,270 */
[261, 281, 300, 318, 337, 356, 374, 391, 408, 426, 445, 464, 428, 499, 514, 538, 999, 999, 999, 999, 999, 999, 999, 999, 999],
/* index: 18,280 */
[266, 289, 307, 326, 344, 365, 383, 402, 421, 436, 456, 477, 495, 514, 527, 551, 999, 999, 999, 999, 999, 999, 999, 999, 999],
/* index: 19,290 */
[277, 296, 316, 337, 352, 374, 393, 410, 428, 450, 469, 490, 508, 527, 544, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999],
/* index: 20,300 */
[287, 305, 324, 344, 363, 382, 402, 421, 436, 464, 484, 501, 518, 540, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999]
];