// Design Fresh Fixed Price Quote Form

// Functions for Quote Form
function fixedPriceValues() {
var total = 0;
if(document.quote.imageSwapper.checked == true) { total += parseFloat(document.quote.imageSwapper.value); }
if(document.quote.googleSubmission.checked == true) { total += parseFloat(document.quote.googleSubmission.value); }
if(document.quote.stats.checked == true) { total += parseFloat(document.quote.stats.value); }
if(document.quote.lightboxGallery.checked == true) { total += parseFloat(document.quote.lightboxGallery.value); }
if(document.quote.flashGallery.checked == true) { total += parseFloat(document.quote.flashGallery.value); }
if(document.quote.logoDesign.checked == true) { total += parseFloat(document.quote.logoDesign.value); }
if(document.quote.googleMap.checked == true) { total += parseFloat(document.quote.googleMap.value); }
if(document.quote.secureLogin.checked == true) { total += parseFloat(document.quote.secureLogin.value); }
if(document.quote.customForm.checked == true) { total += parseFloat(document.quote.customForm.value); }
if(document.quote.rssFeed.checked == true) { total += parseFloat(document.quote.rssFeed.value); }
if(document.quote.twitterFeed.checked == true) { total += parseFloat(document.quote.twitterFeed.value); }
if(document.quote.twitterAccount.checked == true) { total += parseFloat(document.quote.twitterAccount.value); }
if(document.quote.siteSearch.checked == true) { total += parseFloat(document.quote.siteSearch.value); }
if(document.quote.latestNews.checked == true) { total += parseFloat(document.quote.latestNews.value); }
if(document.quote.faqs.checked == true) { total += parseFloat(document.quote.faqs.value); }
var ts = new String(total);
if(ts.indexOf('.') < 0) { ts += '.00'; }
if(ts.indexOf('.') == (ts.length - 2)) { ts += '0'; }
document.quote.total.value = ts;

// Running total of extras
V = document.quote.standardCost.value
W = document.quote.total.value
X = document.quote.noPages.value
Y = document.quote.noImages.value
V = Number(V)
W = Number(W)
X = Number(X)
Y = Number(Y)
Z = (V + W + X + Y)
document.quote.totalExcl.value = Z

// VAT calculations
S = document.quote.totalExcl.value
T = document.quote.VAT.value
S = Number(S)
T = Number(T)
U = (S * T)
document.quote.vatTotal.value = U

// Grand total calculations
F = document.quote.totalExcl.value
G = document.quote.vatTotal.value
F = Number(F)
G = Number(G)
H = (F + G)
document.quote.grandTotal.value = H

// Rounding off totals to 2 decimal places
num=document.quote.totalExcl.value; document.quote.totalExcl.value=(parseFloat(num)).toFixed(2);
num=document.quote.vatTotal.value; document.quote.vatTotal.value=(parseFloat(num)).toFixed(2);
num=document.quote.grandTotal.value; document.quote.grandTotal.value=(parseFloat(num)).toFixed(2);
}