function doEnterKey(sElement){
  if ((event.which ? event.which : event.keyCode) == 13) {
  //if ((event.which && event.which == 13) || (event.keyCode && event.keyCode == 13))
    event.keyCode=0;
    event.returnValue = false;
    event.cancel = true;             // these two lines stops the event activated by the enter

    document.getElementById(sElement).click();
    return false;
    }
  }

function kH(e) {
	//var pK = e ? e.which : window.event.keyCode;
	//return pK != 13;
  if ((event.which ? event.which : event.keyCode) == 13) {
		//if ((event.which && event.which == 13) || (event.keyCode && event.keyCode == 13))
		//alert(document.getElementById('_ctl0:ContentPlaceHolderBody:Checkout:ShippingInformation:TextboxAddress').id);
		if (document.getElementById('_ctl0:ContentPlaceHolderBody:Checkout:ShippingInformation:TextboxAddress') == null && document.getElementById('_ctl0:ContentPlaceHolderBody:Checkout:BillingInformation:TextboxAddress') == null) {
			event.keyCode=0;
			event.returnValue = false;
			event.cancel = true;             // these two lines stops the event activated by the enter

			alert('Please click on a Button to Continue.');
			return false;
			}
		else
			return true;
    }
}
document.onkeypress = kH;
if (document.layers) document.captureEvents(Event.KEYPRESS);
