  //var user;
  //user = prompt("Please enter your name to print your voucher","");

  //while(!user)
  //{
  //  user = prompt("Please enter your name to print your voucher");
  //}

  // $('#voucher_id').val(voucher_id);
  // $('#user_name').val(user);
  // $('#bannerVoucher').submit();

// This is variable for storing callback function
var ae_cb = null;
 
// this is a simple function-shortcut
// to avoid using lengthy document.getElementById
function ae$(a) { return document.getElementById(a); }
 
// This is a main ae_prompt function
// it saves function callback 
// and sets up dialog
function ae_prompt(cb, q, a, t) {
	ae_cb = cb;
	ae$('aep_t').innerHTML = t;
	//ae$('aep_prompt').innerHTML = q;
	// ae$('aep_text').value = a;
        ae$('aep_ieovrl').style.display = ae$('aep_ww').style.display = '';
	ae$('aep_ovrl').style.display = ae$('aep_ww').style.display = '';
	// ae$('aep_text').focus();
	// ae$('aep_text').select();
}
 
// This function is called when user presses OK(m=0) or Cancel(m=1) button
// in the dialog. You should not call this function directly.
function ae_clk(m) {
	// hide dialog layers 
        ae$('aep_ieovrl').style.display = ae$('aep_ww').style.display = 'none';
	ae$('aep_ovrl').style.display = ae$('aep_ww').style.display = 'none';
	if (!m) {
		// ae_cb(null);  // user pressed cancel, call callback with null
	} else if (m == 1) {
		// ae_cb(ae$('aep_text').value); // user pressed OK 
        } else {
                window.location.href = '/my-perrys';
        }
}

