
<!-- begin cloaking from non-JavaScript browsers.

tempsty=0;
temgsty=0;
subtaxed=0;
pstotal=0;
gstotal=0;
function selectItem(param,pst,gst,quantity) {

oldpst=eval(document.getElementById("pstax").value);
oldgst=eval(document.getElementById("gstax").value);
oldtot=eval(document.getElementById('total').value);
oldgr=eval(document.getElementById('grandtotal').value);
	//	var arrNames = document.getElementById("grocery").Summary.name;
		if (document.getElementById([param]).value < 1)
	 
		 {document.getElementById("Summary").value = document.getElementById("Summary").value;
oldpst=eval(document.getElementById("pstax").value);
oldgst=eval(document.getElementById("gstax").value);
oldtot=eval(document.getElementById('total').value);
oldgr=eval(document.getElementById('grandtotal').value);}
	else	 {
document.getElementById("Summary").value = document.getElementById("Summary").value + "\n" +
document.getElementById([param]).value +' x '+ document.getElementById([param]).name;
    }

var cost = param
priced = cost.indexOf(".")+3;
var price = cost.substring(0,priced);
price = (price-0);
taxable = price * quantity;

if (pst=='n'){
oldpst=oldpst
}

if (gst=='n'){
oldgst=oldgst
}

if (pst=='y'){
tempsty=taxable*(1/12.50)
//oldpst+=tempsty

}

if (gst=='y'){
temgsty=taxable*(1/14.28571429)
//oldgst+=temgsty;

}

grtotal=taxable;
grtotal+=oldgr;
grtotal+=temgsty;
grtotal+=tempsty;
oldtot+=taxable;
oldpst+=tempsty;
oldgst+=temgsty;

document.getElementById('pstax').value=formatCurrency(oldpst);
document.getElementById('gstax').value=formatCurrency(oldgst);
document.getElementById('grandtotal').value=formatCurrency(grtotal);
document.getElementById('total').value=formatCurrency(oldtot);

tempsty=0;
temgsty=0;
taxable=0;
	}

//  End -->



<!--

function show(divID) {

if (document.layers && document.layers[divID] != null)

document.layers[divID].visibility = 'visible';

else if (document.all)

document.all[divID].style.visibility = 'visible';

else if (document.getElementByID)

document.getElementById(''+divID+'').innerHTML=html

document.getElementById(''+divID+'').style.visibility = 'visible';

}

// -->



<!--

function hide(divID) {

if (document.layers && document.layers[divID] != null)

document.layers[divID].visibility = 'hidden';

else if (document.all)

document.all[divID].style.visibility = 'hidden';

else if (document.getElementById)

document.getElementById(''+divID+'').style.visibility = 'hidden';

}

// -->



<!--

function formatCurrency(amount) {

// returns the amount in the .99 format

    amount -= 0;

    amount = (Math.round(amount*100))/100;

    return (amount == Math.floor(amount)) ? amount + '.00' : (  (amount*10 == Math.floor(amount*10)) ? amount + '0' : amount);

}

// -->



<!-- Begin

function checkBoxValidate(cb) {

for (j = 0; j < 2; j++) {

if (eval("document.grocery.ckbox[" + j + "].checked") == true) {

document.grocery.ckbox[j].checked = false;

if (j == cb) {

document.grocery.ckbox[j].checked = true;

         }

      }

   }

}

//  End -->
