function calculateAll() {

A = document.calc.takehomepay.value
B = document.calc.partnerstakehome.value
C = document.calc.benefits.value
D = document.calc.taxcredit.value
E = document.calc.otheramount.value
F = document.calc.otherincometwo.value
G = document.calc.otherincomefour.value
K = document.calc.rentmortgage.value
L = document.calc.securedloans.value
M = document.calc.counciltax.value
N = document.calc.houseins.value
O = document.calc.water.value
P = document.calc.gas.value
Q = document.calc.electric.value
R = document.calc.tel.value
FF = document.calc.cable.value
S = document.calc.tv.value
T = document.calc.lifeins.value
U = document.calc.cartax.value
GG = document.calc.carfinance.value
V = document.calc.petrol.value
W = document.calc.carservice.value
X = document.calc.othertravel.value
Y = document.calc.hp.value
AA = document.calc.food.value
BB = document.calc.maintenance.value
CC = document.calc.childcareschool.value
DD = document.calc.other.value
II = document.calc.totalpyts.value 

JJ = document.calc.other2.value
KK = document.calc.other3.value
LL = document.calc.other4.value
MM = document.calc.other5.value
NN = document.calc.other6.value



if((Number(A)||A==0)&&(Number(B)||B==0)&&(Number(C)||C==0)&&(Number(D)||D==0)&&(Number(E)||E==0)&&(Number(F)||F==0)&&(Number(G)||G==0)){

A = Number(A)
B = Number(B)
C = Number(C)
D = Number(D)
E = Number(E)
F = Number(F)
G = Number(G)

Z = (A+B+C+D+E+F+G);
document.calc.income.value=Z;



if ((Number(K)||K==0)&&(Number(L)||L==0)&&(Number(M)||M==0)&&(Number(N)||N==0)&&(Number(O)||O==0)&&(Number(P)||P==0)&&(Number(Q)||Q==0)&&(Number(R)||R==0)&&(Number(S)||S==0)&&(Number(T)||T==0)&&(Number(U)||U==0)&&(Number(V)||V==0)&&(Number(W)||W==0)&&(Number(X)||X==0)&&(Number(Y)||Y==0)&&(Number(AA)||AA==0)&&(Number(BB)||BB==0)&&(Number(CC)||CC==0)&&(Number(DD)||DD==0)&&(Number(FF)||FF==0)&&(Number(GG)||GG==0)&&(Number(II)||II==0)&&(Number(JJ)||JJ==0)&&(Number(KK)||KK==0)&&(Number(LL)||LL==0)&&(Number(MM)||MM==0)&&(Number(NN)||NN==0)) {

K = Number(K)
L = Number(L)
M = Number(M)
N = Number(N)
O = Number(O)
P = Number(P)
Q = Number(Q)
R = Number(R)
S = Number(S)
T = Number(T)
U = Number(U)
V = Number(V)
W = Number(W)
X = Number(X)
Y = Number(Y)
AA = Number(AA)
BB = Number(BB)
CC = Number(CC)
DD = Number(DD)
FF = Number(FF)
GG = Number(GG)
II = Number(II)
JJ = Number(JJ)
KK = Number(KK)
LL = Number(LL)
MM = Number(MM)
NN = Number(NN)

EE = (K+L+M+N+O+P+Q+R+S+T+U+V+W+X+Y+AA+BB+CC+DD+FF+GG+II+JJ+KK+LL+MM+NN);

document.calc.totalliving.value=EE;
RR = (Z-EE);
document.calc.totaldisp.value=RR;

if (RR > 0) {
	alert ("From the information you have entered, it appears that you have adequate income to meet your essential expenses and by sticking to a budget you should be able to meet your bills in full.\n\nIf you feel that you will still struggle to meet your debt repayments in full please CALL 0800 048 3651 for a FREE Financial review.")
//  var Output  = "From the information you have entered, it appears that you have adequate income to meet your essential expenses and by sticking to a budget you should be able to meet your bills in full.If you feel that you will still struggle to meet your debt repayments in full please CALL 0800 048 3651 for a FREE Financial review.";
//  document.getElementById("advicetext").innerHTML = Output;
}
else {
	alert ("From the information you have entered, it appears that you do not have adequate income to meet your essential living expenses and bills. Based on the information you have given we can help you reduce your monthly outgoings.  \n\nSo that we can advice on the BEST solution and perform a full FREE review, please CALL 0800 048 3651.  \n\nOr please enter your name and phone number on the Free Advice form, and we will call you at our earliest opportunity.")
//  var Output  = "From the information you have entered, it appears that you do not have adequate income to meet your essential living expenses and bills. Based on the information you have given we can help you reduce your monthly outgoings.  So that we can advice on the BEST solution and perform a full FREE review, please CALL 0800 048 3651.  Or please enter your name and phone number on the Free Advice form, and we will call you at our earliest opportunity.";
//  document.getElementById("advicetext").innerHTML = Output;
}

}


else {
	alert("Please enter numbers only")
	}
}
else {
	alert("Please enter numbers only")
	}
}

function ClearForm(form)
{
form.takehomepay.value = "";
form.partnerstakehome.value = "";
form.benefits.value="";
form.taxcredit.value="";
form.otherdescription.value="";
form.otheramount.value="";
form.otherincome.value="";
form.otherincometwo.value="";
form.otherincomethree.value="";
form.otherincomefour.value="";
form.nopeople.value="";
form.amountowed.value="";
form.totalpyts.value="";
form.rentmortgage.value="";
form.securedloans.value="";
form.counciltax.value="";
form.houseins.value="";
form.water.value="";
form.gas.value="";
form.electric.value="";
form.tel.value="";
form.cable.value="";
form.tv.value="";
form.lifeins.value="";
form.cartax.value="";
form.carfinance.value="";
form.petrol.value="";
form.carservice.value="";
form.othertravel.value="";
form.hp.value="";
form.food.value="";
form.maintenance.value="";
form.childcareschool.value="";
form.other.value="";
form.other2.value="";
form.other3.value="";
form.other4.value="";
form.other5.value="";
form.other6.value="";
form.income.value="";
form.totalliving.value="";
form.totaldisp.value = "";
}


