function checkNoAccountAcceptAgreement(){
  var collection=eval(document.forms.licence.acceptedLicenceAgreement);
  document.licence.actionField.value='checkOut';
  if(collection[0].checked==true){
    document.licence.submit();
  }else{
    alert("You must accept the licence agreement to continue");
  }
}
function checkAcceptAgreement(){
  var collection=eval(document.forms.accountLicenceDetails.acceptedLicenceAgreement);
  document.accountLicenceDetails.actionField.value='accountLicenceConfirm';
  if(collection[0].checked==true){
    document.accountLicenceDetails.submit();
  }else{
    alert("You must accept the licence agreement to continue");
  }
}
function initiateCreditPayment(){
  var win1=window.open("../content/creditPayment", "","status,height=600,width=600,resizable=yes,scrollbars=yes");
  win1.focus();
}
function purchaseItemsNoAccount(){
  var win1=window.open("../content/creditcardpayment", "","status,height=600,width=600,resizable=yes,scrollbars=yes");
  win1.focus();
}
function refreshMainPage(targetURL) {
  opener.location.href=targetURL;
  opener.focus();
  window.close();
}
function addToMyFolder(orderNumber) {
  document.location.href = '../content/myFolder?actionField=retrievePurchasedItems&orderNo='+orderNumber;
  opener.focus();
  window.close();
}
function showUserDetails(userID) {
  document.manageUsersForm.action = 'showUserDetails';
  document.manageUsersForm.userID.value = userID;
  document.manageUsersForm.submit();
}
function removeUser(userID, userName) {
  document.manageUsersForm.userID.value = userID;
  var agree=confirm('Are you sure you want to remove the user '+userName+'?');
  if (agree) {
    document.manageUsersForm.actionField.value='confirmedRemove';
    document.manageUsersForm.submit();
  }
}
