function get_value(formName,fieldName){
	value = eval('document.'+formName+'.'+fieldName+'.value');
	return value;
}

function get_pull_val(formName,pullName){

	var this_val='';
	which_form = eval('document.'+formName+'.'+pullName);
	for(i=0;i<which_form.length;++i){
		if(which_form.options[i].selected==true){
 		 	 this_val = which_form.options[i].value;
		}
	}
	return this_val;
}

function checkEmail(email){
  var filter=/^.+@.+\..{2,4}$/

  if (filter.test(email))
  {
    return true;
  }
  else
  {
    return false;
  }
}

function checkForm(formname)
{
  var ErrorMessage  = '';
  var count = 0;
  
  switch (formname)
   {
    case 'group':
      ErrorMessage = 'You have not selected a group brochure. Please make a selection and then click the Request button.';
     break;
    case 'hotel':
      ErrorMessage = 'You have not selected a hotel brochure. Please make a selection and then click the Request button.';
     break;
   }
   
	for (i=0; i < aCheckBoxes.length; i++)
   {
	  if (document.getElementById(aCheckBoxes[i]).checked == false)     
     {
      count++;       
     }
   }
     
  if (aCheckBoxes.length == count)
	 {
    alert(ErrorMessage);
	  return false;
	 }
	else
	 {
	  document.getElementById('Register').submit();
	  return true;   
   }
}
