JavaScript if var a is empty and var b is empty then make var c blank
Need help with a javascript please.

I am using Adobe Acrobat Pro xi
Form has a Received, Paid and Balance column. All formatted to number. I have a script that calculates.
I am using the following Custom calculation script that works fine:
var a=this.getField("BRow1");
var b=this.getField("RRow2");
var c=this.getField("PRow2");
var d=this.getField("BRow2");
d.value=(a.value+b.value)-c.value;
I need an "if" statement. If var b (received) is empty and if var c (paid) is empty then var d (Balance) is blank.
Any help is greatly appreciated. Thank you.
