function cdcalculate()
{

A = document.frmCD.quantity.value
B = document.frmCD.X1quantity.value
C = document.frmCD.X2quantity.value
D = document.frmCD.X3quantity.value
E = document.frmCD.X4quantity.value
F = document.frmCD.X5quantity.value
G = document.frmCD.X6quantity.value
H = document.frmCD.X7quantity.value

K = (A * 1) + (B * 1) + (C * 1) + (D * 1) + (E * 1) + (F * 1) + (G * 1) + (H * 1);

if (K<5) {document.frmCD.price.value = 10.00.toFixed(2)}
if ((K > 4) && (K < 10)) {document.frmCD.price.value = 2.60.toFixed(2)}
if ((K > 9) && (K < 25)) {document.frmCD.price.value = 1.60.toFixed(2)}
if ((K > 24) && (K < 50)) {document.frmCD.price.value = 1.30.toFixed(2)}
if ((K > 49) && (K < 100)) {document.frmCD.price.value = 1.10.toFixed(2)}
if (K>99) {document.frmCD.price.value = 0.85.toFixed(2)}


if (K<5) {document.frmCD.X1price.value = 10.00.toFixed(2)}
if ((K > 4) && (K < 10)) {document.frmCD.X1price.value = 2.60.toFixed(2)}
if ((K > 9) && (K < 25)) {document.frmCD.X1price.value = 1.60.toFixed(2)}
if ((K > 24) && (K < 50)) {document.frmCD.X1price.value = 1.30.toFixed(2)}
if ((K > 49) && (K < 100)) {document.frmCD.X1price.value = 1.10.toFixed(2)}
if (K>99) {document.frmCD.X1price.value = 0.85.toFixed(2)}


if (K<5) {document.frmCD.X2price.value = 10.00.toFixed(2)}
if ((K > 4) && (K < 10)) {document.frmCD.X2price.value = 2.60.toFixed(2)}
if ((K > 9) && (K < 25)) {document.frmCD.X2price.value = 1.60.toFixed(2)}
if ((K > 24) && (K < 50)) {document.frmCD.X2price.value = 1.30.toFixed(2)}
if ((K > 49) && (K < 100)) {document.frmCD.X2price.value = 1.10.toFixed(2)}
if (K>99) {document.frmCD.X2price.value = 0.85.toFixed(2)}


if (K<5) {document.frmCD.X3price.value = 10.00.toFixed(2)}
if ((K > 4) && (K < 10)) {document.frmCD.X3price.value = 2.60.toFixed(2)}
if ((K > 9) && (K < 25)) {document.frmCD.X3price.value = 1.60.toFixed(2)}
if ((K > 24) && (K < 50)) {document.frmCD.X3price.value = 1.30.toFixed(2)}
if ((K > 49) && (K < 100)) {document.frmCD.X3price.value = 1.10.toFixed(2)}
if (K>99) {document.frmCD.X3price.value = 0.85.toFixed(2)}


if (K<5) {document.frmCD.X4price.value = 10.00.toFixed(2)}
if ((K > 4) && (K < 10)) {document.frmCD.X4price.value = 2.60.toFixed(2)}
if ((K > 9) && (K < 25)) {document.frmCD.X4price.value = 1.60.toFixed(2)}
if ((K > 24) && (K < 50)) {document.frmCD.X4price.value = 1.30.toFixed(2)}
if ((K > 49) && (K < 100)) {document.frmCD.X4price.value = 1.10.toFixed(2)}
if (K>99) {document.frmCD.X4price.value = 0.85.toFixed(2)}


if (K<5) {document.frmCD.X5price.value = 10.00.toFixed(2)}
if ((K > 4) && (K < 10)) {document.frmCD.X5price.value = 2.60.toFixed(2)}
if ((K > 9) && (K < 25)) {document.frmCD.X5price.value = 1.60.toFixed(2)}
if ((K > 24) && (K < 50)) {document.frmCD.X5price.value = 1.30.toFixed(2)}
if ((K > 49) && (K < 100)) {document.frmCD.X5price.value = 1.10.toFixed(2)}
if (K>99) {document.frmCD.X5price.value = 0.85.toFixed(2)}


if (K<5) {document.frmCD.X6price.value = 10.00.toFixed(2)}
if ((K > 4) && (K < 10)) {document.frmCD.X6price.value = 2.60.toFixed(2)}
if ((K > 9) && (K < 25)) {document.frmCD.X6price.value = 1.60.toFixed(2)}
if ((K > 24) && (K < 50)) {document.frmCD.X6price.value = 1.30.toFixed(2)}
if ((K > 49) && (K < 100)) {document.frmCD.X6price.value = 1.10.toFixed(2)}
if (K>99) {document.frmCD.X6price.value = 0.85.toFixed(2)}


if (K<5) {document.frmCD.X7price.value = 10.00.toFixed(2)}
if ((K > 4) && (K < 10)) {document.frmCD.X7price.value = 2.60.toFixed(2)}
if ((K > 9) && (K < 25)) {document.frmCD.X7price.value = 1.60.toFixed(2)}
if ((K > 24) && (K < 50)) {document.frmCD.X7price.value = 1.30.toFixed(2)}
if ((K > 49) && (K < 100)) {document.frmCD.X7price.value = 1.10.toFixed(2)}
if (K>99) {document.frmCD.X7price.value = 0.85.toFixed(2)}

}


function ignoreSpaces(string)
{
var temp = "";
string = '' + string;
splitstring = string.split(" ");
for(i = 0; i < splitstring.length; i++)
temp += splitstring[i];
return temp;
}


var r={
  'special':/[\W]/g,
  'quotes':/['\''&'\"']/g,
  'notnumbers':/[^\d]/g
}

function valid(o,w){
  o.value = o.value.replace(r[w],'');
}

function countit(what)
{

//Character count script- by javascriptkit.com
//Visit JavaScript Kit (http://javascriptkit.com) for script
//Credit must stay intact for use

formcontent=what.form.itemname7.value
what.form.quantity.value=formcontent.length

}


function calchipslett()
{
A = formcontent.length
B = document.frmtwo.itemname3.value
C = ((B*B)*0.00004)+0.15
D = C.toFixed(2)
E = A*D
document.frmtwo.price.value = D
document.frmtwo.total.value = E.toFixed(2)
}

function Alert ()  {
alert ("Thanks for ordering movements - PLEASE !!!! order one free set of hands for each movement then double check your order confirmation to make sure you have ordered the correct number of hands!");
}

function Alertthanks ()  {
alert ("Thank-you - This item has been added to your shopping cart");
}


function calcmovements()
{

A = document.frmtwo.quantity.value
B = document.frmtwo.X1quantity.value
C = document.frmtwo.X2quantity.value

D = (A * 1) + (B * 1) + (C * 1);

if (D<5) {document.frmtwo.price.value = 10.00.toFixed(2)}
if ((D > 4) && (D < 10)) {document.frmtwo.price.value = 2.50.toFixed(2)}
if ((D > 9) && (D < 25)) {document.frmtwo.price.value = 1.50.toFixed(2)}
if ((D > 24) && (D < 50)) {document.frmtwo.price.value = 1.20.toFixed(2)}
if ((D > 49) && (D < 100)) {document.frmtwo.price.value = 1.00.toFixed(2)}
if ((D > 99) && (D < 250)) {document.frmtwo.price.value = 0.75.toFixed(2)}
if ((D > 249) && (D < 500)) {document.frmtwo.price.value = 0.70.toFixed(2)}
if (D>499) {document.frmtwo.price.value = 0.65.toFixed(2)}


if (D<5) {document.frmtwo.X1price.value = 10.00.toFixed(2)}
if ((D > 4) && (D < 10)) {document.frmtwo.X1price.value = 2.50.toFixed(2)}
if ((D > 9) && (D < 25)) {document.frmtwo.X1price.value = 1.50.toFixed(2)}
if ((D > 24) && (D < 50)) {document.frmtwo.X1price.value = 1.20.toFixed(2)}
if ((D > 49) && (D < 100)) {document.frmtwo.X1price.value = 1.00.toFixed(2)}
if ((D > 99) && (D < 250)) {document.frmtwo.X1price.value = 0.75.toFixed(2)}
if ((D > 249) && (D < 500)) {document.frmtwo.X1price.value = 0.70.toFixed(2)}
if (D>499) {document.frmtwo.X1price.value = 0.65.toFixed(2)}


if (D<5) {document.frmtwo.X2price.value = 10.00.toFixed(2)}
if ((D > 4) && (D < 10)) {document.frmtwo.X2price.value = 2.50.toFixed(2)}
if ((D > 9) && (D < 25)) {document.frmtwo.X2price.value = 1.50.toFixed(2)}
if ((D > 24) && (D < 50)) {document.frmtwo.X2price.value = 1.20.toFixed(2)}
if ((D > 49) && (D < 100)) {document.frmtwo.X2price.value = 1.00.toFixed(2)}
if ((D > 99) && (D < 250)) {document.frmtwo.X2price.value = 0.75.toFixed(2)}
if ((D > 249) && (D < 500)) {document.frmtwo.X2price.value = 0.70.toFixed(2)}
if (D>499) {document.frmtwo.X2price.value = 0.65.toFixed(2)}


}

function calcplasticmovements()
{

A = document.frmtwo.quantity.value
B = document.frmtwo.X1quantity.value
C = document.frmtwo.X2quantity.value

D = (A * 1) + (B * 1) + (C * 1);
if (D<5) {document.frmtwo.price.value = 10.00.toFixed(2)}
if ((D > 4) && (D < 10)) {document.frmtwo.price.value = 2.50.toFixed(2)}
if ((D > 9) && (D < 25)) {document.frmtwo.price.value = 1.50.toFixed(2)}
if ((D > 24) && (D < 50)) {document.frmtwo.price.value = 1.20.toFixed(2)}
if ((D > 49) && (D < 100)) {document.frmtwo.price.value = 1.00.toFixed(2)}
if ((D > 99) && (D < 250)) {document.frmtwo.price.value = 0.75.toFixed(2)}
if ((D > 249) && (D < 500)) {document.frmtwo.price.value = 0.70.toFixed(2)}
if (D>499) {document.frmtwo.price.value = 0.65.toFixed(2)}


if (D<5) {document.frmtwo.X1price.value = 10.00.toFixed(2)}
if ((D > 4) && (D < 10)) {document.frmtwo.X1price.value = 2.50.toFixed(2)}
if ((D > 9) && (D < 25)) {document.frmtwo.X1price.value = 1.50.toFixed(2)}
if ((D > 24) && (D < 50)) {document.frmtwo.X1price.value = 1.20.toFixed(2)}
if ((D > 49) && (D < 100)) {document.frmtwo.X1price.value = 1.00.toFixed(2)}
if ((D > 99) && (D < 250)) {document.frmtwo.X1price.value = 0.75.toFixed(2)}
if ((D > 249) && (D < 500)) {document.frmtwo.X1price.value = 0.70.toFixed(2)}
if (D>499) {document.frmtwo.X1price.value = 0.65.toFixed(2)}

if (D<5) {document.frmtwo.X2price.value = 10.00.toFixed(2)}
if ((D > 4) && (D < 10)) {document.frmtwo.X2price.value = 2.50.toFixed(2)}
if ((D > 9) && (D < 25)) {document.frmtwo.X2price.value = 1.50.toFixed(2)}
if ((D > 24) && (D < 50)) {document.frmtwo.X2price.value = 1.20.toFixed(2)}
if ((D > 49) && (D < 100)) {document.frmtwo.X2price.value = 1.00.toFixed(2)}
if ((D > 99) && (D < 250)) {document.frmtwo.X2price.value = 0.75.toFixed(2)}
if ((D > 249) && (D < 500)) {document.frmtwo.X2price.value = 0.70.toFixed(2)}
if (D>499) {document.frmtwo.X2price.value = 0.65.toFixed(2)}

}



function calcsweepmovements()
{

A = document.frmtwo.quantity.value
B = document.frmtwo.X1quantity.value
C = document.frmtwo.X2quantity.value

D = (A * 1) + (B * 1) + (C * 1);

if (D<5) {document.frmtwo.price.value = 10.00.toFixed(2)}
if ((D > 4) && (D < 10)) {document.frmtwo.price.value = 2.50.toFixed(2)}
if ((D > 9) && (D < 25)) {document.frmtwo.price.value = 1.50.toFixed(2)}
if ((D > 24) && (D < 50)) {document.frmtwo.price.value = 1.20.toFixed(2)}
if ((D > 49) && (D < 100)) {document.frmtwo.price.value = 1.00.toFixed(2)}
if ((D > 99) && (D < 250)) {document.frmtwo.price.value = 0.75.toFixed(2)}
if ((D > 249) && (D < 500)) {document.frmtwo.price.value = 0.70.toFixed(2)}
if (D>499) {document.frmtwo.price.value = 0.65.toFixed(2)}


if (D<5) {document.frmtwo.X1price.value = 10.00.toFixed(2)}
if ((D > 4) && (D < 10)) {document.frmtwo.X1price.value = 2.50.toFixed(2)}
if ((D > 9) && (D < 25)) {document.frmtwo.X1price.value = 1.50.toFixed(2)}
if ((D > 24) && (D < 50)) {document.frmtwo.X1price.value = 1.20.toFixed(2)}
if ((D > 49) && (D < 100)) {document.frmtwo.X1price.value = 1.00.toFixed(2)}
if ((D > 99) && (D < 250)) {document.frmtwo.X1price.value = 0.75.toFixed(2)}
if ((D > 249) && (D < 500)) {document.frmtwo.X1price.value = 0.70.toFixed(2)}
if (D>499) {document.frmtwo.X1price.value = 0.65.toFixed(2)}


if (D<5) {document.frmtwo.X2price.value = 10.00.toFixed(2)}
if ((D > 4) && (D < 10)) {document.frmtwo.X2price.value = 2.50.toFixed(2)}
if ((D > 9) && (D < 25)) {document.frmtwo.X2price.value = 1.50.toFixed(2)}
if ((D > 24) && (D < 50)) {document.frmtwo.X2price.value = 1.20.toFixed(2)}
if ((D > 49) && (D < 100)) {document.frmtwo.X2price.value = 1.00.toFixed(2)}
if ((D > 99) && (D < 250)) {document.frmtwo.X2price.value = 0.75.toFixed(2)}
if ((D > 249) && (D < 500)) {document.frmtwo.X2price.value = 0.70.toFixed(2)}
if (D>499) {document.frmtwo.X2price.value = 0.65.toFixed(2)}


}


function calcacrylic()
{
A = document.frmtwo.itemname2.value
B = document.frmtwo.itemname3.value
C = 1+((A * B)*0.00004)
document.frmtwo.price.value = C.toFixed(2)
}


function calcacrshape()
{
A = document.frmtwo.itemname2.value
B = document.frmtwo.itemname3.value
C = 1+((A * B)*0.00015)
document.frmtwo.price.value = C.toFixed(2)
}


function verify() {
var themessage = "Please enter the";
if (document.frmtwo.itemname2.value=="") {
themessage = themessage + " length";
}
if (document.frmtwo.itemname3.value=="") {
themessage = themessage + " width";
}
//alert if fields are empty and cancel form submit
if (themessage == "Please enter the") {
document.frmtwo.submit();
}
else {
alert(themessage);
return false;
   }
}

function calcsign()
{
A = document.frmtwo.itemname2.value
B = document.frmtwo.itemname3.value
C = 9+((A * B)*0.00005)
document.frmtwo.price.value = C.toFixed(2)
}

function calcpvclett()
{
A = formcontent.length
B = document.frmtwo.itemname3.value
C = ((B*B)*0.0000233221)+0.15
D = C.toFixed(2)
E = A*D
document.frmtwo.price.value = D
document.frmtwo.total.value = E.toFixed(2)
}

function calchipsshape()
{
A = document.frmtwo.itemname2.value
B = document.frmtwo.itemname3.value
C = 1+((A * B)*0.00003)
document.frmtwo.price.value = C.toFixed(2)
}

function calcpvcsignsheet()
{
A = document.frmtwo.itemname2.value
B = document.frmtwo.itemname3.value
C = 7+((A * B)*0.00003)
document.frmtwo.price.value = C.toFixed(2)
}
