function showDetailsTable()
{
var current = document.getElementById("detailsTable").style.display;
if (current == "block") {
document.getElementById("detailsTable").style.display = "none";
} else {
document.getElementById("detailsTable").style.display = "block";
}
}
function testVar(value,fieldID,alertShown)
{
if (value != '' ) {
if ( value != parseFloat(value) ) {
document.getElementById(fieldID).style.borderColor = "red";
if (alertShown != 1) {
alert("Please enter all measurements in metres only. No letters allowed");
var alertShown = 1;
}
}
if ( parseFloat(value) < 0) {
document.getElementById(fieldID).style.borderColor = "red";
if (alertShown != 1) {
alert("Please enter all measurements in as positive numbers only");
var alertShown = 1;
}
}
}
return alertShown;
}
function calculateArea() {
borderReset();
var alertShown = 0;
document.getElementById("totalSqm").innerHTML = "0";
document.getElementById("showtotalEst").innerHTML = "$0";
document.getElementById("showcostperEst").innerHTML = "$0";
document.getElementById("shownumBoards").innerHTML = "0";
document.getElementById("showfascingBoardsNum").innerHTML = "0";
document.getElementById("showclipsNum").innerHTML = "0";
document.getElementById("showscrewNum").innerHTML = "0";
document.getElementById("showsurscrewsNum").innerHTML = "0";
var width1 = document.getElementById("width1").value;
var length1 = document.getElementById("length1").value;
var edge1 = document.getElementById("edge1").value;
var width2 = document.getElementById("width2").value;
var length2 = document.getElementById("length2").value;
var edge2 = document.getElementById("edge2").value;
var width3 = document.getElementById("width3").value;
var length3 = document.getElementById("length3").value;
var edge3 = document.getElementById("edge3").value;
alertShown=testVar(width1,"width1",alertShown);
alertShown=testVar(length1,"length1",alertShown);
alertShown=testVar(edge1,"edge1",alertShown);
alertShown=testVar(width2,"width2",alertShown);
alertShown=testVar(length2,"length2",alertShown);
alertShown=testVar(edge2,"edge2",alertShown);
alertShown=testVar(width3,"width3",alertShown);
alertShown=testVar(length3,"length3",alertShown);
alertShown=testVar(edge3,"edge3",alertShown);
var deckScrewCost = 26.5;
var deckClipsCost = 22.96;
var faceBrdsCost = 24.05;
var surfaceScrewCost = 14.25;
var deckBoardCost = 24.97;
if (edge1 == '') { var edge1=0; }
if (edge2 == '') { var edge2=0; }
if (edge3 == '') { var edge3=0; }
var faceboards = parseFloat(edge1) + parseFloat(edge2) + parseFloat(edge3);
if (alertShown == 1) { return;}
var faceBoardsNum =Math.ceil(faceboards / 1.85).toFixed(0);
var faceBoardsEst = (faceBoardsNum * faceBrdsCost ).toFixed(0);
var surfaceScrewsNum = Math.ceil((faceboards /0.4625) * 2 / 50).toFixed(0);
var surfaceScrewsEst = (surfaceScrewsNum * surfaceScrewCost ).toFixed(0);
if (width1 !== null && length1 !== null) {
var area1 = width1 * length1;
var boardsNum1 = Math.ceil(area1 * 4);
var boardsEst1 = boardsNum1 * deckBoardCost ; //was 24.98
} else {
var boardsEst1 = 0;
}
if (width2 !== null && length2 !== null) {
var area2 = width2 * length2;
var boardsNum2 = Math.ceil(area2 * 4);
var boardsEst2 = boardsNum2 * deckBoardCost
} else {
var boardsEst2 = 0;
}
if (width3 !== null && length3 !== null) {
var area3 = width3 * length3;
var boardsNum3 = Math.ceil(area3 * 4);
var boardsEst3 = boardsNum3 * deckBoardCost
} else {
var boardsEst3 = 0;
}
var sumBoardNum = boardsNum1 + boardsNum2 + boardsNum3;
var sumBoardsEst = (boardsEst1 + boardsEst2 + boardsEst3).toFixed(0);
var totalSqm = area1 + area2 + area3;
var deckClipsNum = Math.ceil(sumBoardNum * 5 /100).toFixed(0); //Same for deck screws
var deckClipsEst = (deckClipsNum * deckClipsCost).toFixed(0);
var deckScrewsNum = deckClipsNum; //Same for deck screws
var deckScrewsEst = (deckScrewsNum * deckScrewCost).toFixed(0); //Same for deck screws
var estTotal = (parseFloat(sumBoardsEst ) + parseFloat(faceBoardsEst) + parseFloat(deckClipsEst) + parseFloat(deckScrewsEst) + parseFloat(surfaceScrewsEst));
document.getElementById("showtotalEst").innerHTML = '$'+estTotal.toLocaleString("en-US");
if (totalSqm == 0) {
costperEst = 0;
} else {
var costperEst = (estTotal / totalSqm).toFixed(0) ;
}
if (estTotal == 0 ) { var costperEst = 0; }
document.getElementById("showcostperEst").innerHTML = '$'+costperEst.toLocaleString("en-US");
document.getElementById("totalSqm").innerHTML = totalSqm.toLocaleString("en-US");
document.getElementById("shownumBoards").innerHTML = sumBoardNum ;
document.getElementById("showfascingBoardsNum").innerHTML = faceBoardsNum;
document.getElementById("showclipsNum").innerHTML = deckClipsNum + ' Bag/s of 100';
document.getElementById("showscrewNum").innerHTML = deckScrewsNum + ' Bag/s of 100';
document.getElementById("showsurscrewsNum").innerHTML = surfaceScrewsNum + ' Bag/s of 50';
document.getElementById("showboardsEst").innerHTML = '$'+sumBoardsEst.toLocaleString("en-US");
document.getElementById("showfascingBoardsEst").innerHTML = '$'+faceBoardsEst.toLocaleString("en-US");
document.getElementById("showclipsEst").innerHTML = '$'+deckClipsEst.toLocaleString("en-US");
document.getElementById("showscrewEst").innerHTML = '$'+deckScrewsEst.toLocaleString("en-US");
document.getElementById("showsurscrewsEst").innerHTML = '$'+surfaceScrewsEst.toLocaleString("en-US");
}
function borderReset() {
document.getElementById("width1").style.borderColor = "#e1e1e1";
document.getElementById("width3").style.borderColor = "#e1e1e1";
document.getElementById("width2").style.borderColor = "#e1e1e1";
document.getElementById("length1").style.borderColor = "#e1e1e1";
document.getElementById("length2").style.borderColor = "#e1e1e1";
document.getElementById("length3").style.borderColor = "#e1e1e1";
document.getElementById("edge1").style.borderColor = "#e1e1e1";
document.getElementById("edge2").style.borderColor = "#e1e1e1";
document.getElementById("edge3").style.borderColor = "#e1e1e1";
}
Complete as many areas as needed
Area 1
m
m
m
Area 2
m
m
m
Area 3
m
m
m
Total Estimate: excl GST
Total Sqm:
Est Per Sqm: excl GST
Item
Quantity
Number Of Boards
Edge Boards
Decking Clips
Decking Screws
Surface Screws
Enter the length and width of each decking area required, including
the full length of all edge boards per area, as shown in the diagram below.
** Please be advised that the price estimate displayed on our website is for informational purposes only.