// used on the registration page
 function setSelect(name, value) {
   if (value != '') {
     myForm = document.getElementById('user_register');
     if (myForm) {
       myElem = myForm.elements[name];
       if (myElem) {
         myElem.value = value;
       }
     }
   }
 }

 
 // swaps the divs on the registration page
 function registration_management(value) {
  if (value == 'gift') {
    if (confirm('You\'ve chosen a gift or international subscription. Please wait while we transfer you to that department.')) {
      window.location = 'http://www.subscriptionsdepartment.com/HTL/';
    }
  }
  else if (value == 'freebie') {
    if (element = document.getElementById('registration_address')) {element.style.display='none';}
    if (element = document.getElementById('account_subscription')) {element.style.display='none';}
    if (element = document.getElementById('the_submit_button')) {element.value='Sign me up -->';}
  }
  else if (value == 'personal') {
     if (element = document.getElementById('registration_address')) {element.style.display='block';}
     if (element = document.getElementById('account_subscription')) {element.style.display='none';}
     if (element = document.getElementById('the_submit_button')) {element.value='Continue on to next step -->';}
  }
  else if (value == 'existing') {
     if (element = document.getElementById('registration_address')) {element.style.display='none';}
     if (element = document.getElementById('account_subscription')) {element.style.display='block';}
     if (element = document.getElementById('the_submit_button')) {element.value='Activate my online account';}
  }
 }
 
 // this is a delay function to allow the rest of the page to render
 // before calling the function
 function delay_display(value){
   setTimeout('registration_management(\'existing\')', 500);
  }