On pint click text boxes goes blank

I have a page in which i use this code

<script type="text/javascript">
        function PrintDiv() {
           var printarea = document.getElementById('estimat_print');
           //var popupWin = window.open('', '_blank', 'width=870,height=2200');
		   var popupWin = window.open('', '_blank', 'width=720');
           popupWin.document.write('<html><body onload="window.print()">' + printarea.innerHTML + '</html>');

to print a particular <DIV>
but when i clicking print button.
my these two text box’s value goes blank…

<input id="advance" name="advance" type="text"  size="5" /></p>
<input id="bal" name="bal" type="text" style="text-align:right" size="5" />

This the function bywhich values coming on these two text boxes.

var gt=$("#gt").val();
var ad=$("#advance").val();
var bal= parseFloat(gt)-parseFloat(ad);


and if i will use browser print command (ctrl +p) then everything going fine.
Can anyone suggest, how to solve this bug?