function receptionCheck()

  {

  if(document.regist.noReceptions.checked == true)

    {

    document.regist.openingReception.checked = false;

    document.regist.closingReception.checked = false;

    }

  }



function receptionCheck2(chk)

  {

  if (chk == true)

   {

   document.regist.noReceptions.checked = false;

   }    

  }



function getElementValues(k)

  {

  var element, strValue

  var srchStr = "?"

  for (var i=0; i < document.forms[k].elements.length; i++)

    {

    element = document.forms[k].elements[i];

    if (element.type == "text" || element.type == "textarea")

      {

      strValue = escape(element.name) + "=" + escape(element.value);

      }

    else if (element.type.indexOf("select") != -1)

      {

      strValue = escape(element.name) + "=" + escape(element.options[element.selectedIndex].value);

      }

    else if (element.type == "checkbox" || element.type == "radio")

      {

      if (element.checked)

        {

        strValue = escape(element.name) + "=" + escape(element.value);

        }

      else continue

      }

    else continue

    srchStr += strValue + "&";

    }

  document.regist.action='http://arky.ucalgary.ca/chacmool2008/confirm_elect_reg'+srchStr;

  return true;

  }



function _CF_onError(form_object, input_object, object_value, error_message)

  {

  alert(error_message);

  return false;

  }



function _CF_hasValue(obj, obj_type)

  {

  if (obj_type == "TEXT" || obj_type == "PASSWORD")

    {

    if (obj.value.length == 0)

      {

      return false;

      }

    else

      {

      return true;

      }

    }

  else if (obj_type == "SELECT")

    {

    for (i=0; i < obj.length; i++)

      {

      if (obj.options[i].selected)

        {

        return true;

        }

      }

    return false;

    }

  else if (obj_type == "SINGLE_VALUE_RADIO" || obj_type == "SINGLE_VALUE_CHECKBOX")

    {

    if (obj.checked)

      {

      return true;

      }

    else

      {

      return false;

      }

    }

  else if (obj_type == "RADIO" || obj_type == "CHECKBOX")

    {

    for (i=0; i < obj.length; i++)

      {

      if (obj[i].checked)

        {

        return true;

        }

      }

    return false;

    }

  }



function  _CF_checkCFForm_1(_CF_this)

  {

  if (!_CF_hasValue(_CF_this.firstname, "TEXT" )) 

    {

    if (!_CF_onError(_CF_this, _CF_this.firstname, _CF_this.firstname.value, "You must enter your first name in the First Name field"))

      {

      return false; 

      }

    }

  if  (!_CF_hasValue(_CF_this.lastname, "TEXT" )) 

    {

    if  (!_CF_onError(_CF_this, _CF_this.lastname, _CF_this.lastname.value, "You must enter your last name in the Last Name field"))

      {

      return false; 

      }

    }

  if  (!_CF_hasValue(_CF_this.affiliation, "TEXT" )) 

    {

    if  (!_CF_onError(_CF_this, _CF_this.affiliation, _CF_this.affiliation.value, "You must enter an affiliation in the Affiliation field"))

      {

      return false; 

      }

    }

  if  (!_CF_hasValue(_CF_this.address1, "TEXT" )) 

    {

    if  (!_CF_onError(_CF_this, _CF_this.address1, _CF_this.address1.value, "You must enter a your address in the Address Line 1 field"))

      {

      return false; 

      }

    }

  if  (!_CF_hasValue(_CF_this.city, "TEXT" )) 

    {

    if  (!_CF_onError(_CF_this, _CF_this.city, _CF_this.city.value, "You must enter your city in the City field"))

      {

      return false; 

      }

    }

  if  (!_CF_hasValue(_CF_this.state, "TEXT" )) 

    {

    if  (!_CF_onError(_CF_this, _CF_this.state, _CF_this.state.value, "You must enter a province or state in the Province/State field"))

      {

      return false; 

      }

    }

  if  (!_CF_hasValue(_CF_this.zip, "TEXT" )) 

    {

    if  (!_CF_onError(_CF_this, _CF_this.zip, _CF_this.zip.value, "You must enter your postal or zip code in the Postal/Zip Code field"))

      {

      return false; 

      }

    }

  if  (!_CF_hasValue(_CF_this.country, "TEXT" )) 

    {

    if  (!_CF_onError(_CF_this, _CF_this.country, _CF_this.country.value, "You must enter a country in the Country field"))

      {

      return false; 

      }

    }

  if  (!_CF_hasValue(_CF_this.homephone, "TEXT" ) && !_CF_hasValue(_CF_this.workphone, "TEXT" )) 

    {

    if  (!_CF_onError(_CF_this, _CF_this.homephone, _CF_this.homephone.value, "You must enter a phone number in the Homephone or the Workphone field"))

      {

      return false; 

      }

    } 

  if  (!_CF_hasValue(_CF_this.from, "TEXT" )) 

    {

    if  (!_CF_onError(_CF_this, _CF_this.from, _CF_this.from.value, "You must enter a your email in the Email field"))

      {

      return false; 

      }

    }

  if  (!_CF_hasValue(_CF_this.ConfFee, "RADIO" )) 

    {

    if  (!_CF_onError(_CF_this, _CF_this.ConfFee, _CF_this.ConfFee.value, "You must select the appropriate Conference Fee"))

      {

      return false; 

      }

    }

  if  (document.regist.noReceptions.checked == false && document.regist.openingReception.checked == false && document.regist.closingReception.checked == false) 

    {

    alert("Please indicate whether you will be attending the Opening and/or Closing reception");

    return false; 

    }

  return getElementValues(0);

  }

