function value($a) {
  return $a ;                    /* return the value of argument given */
}

function last_day($month,$year) {
  $mo_num=array('jan'=>1,'feb'=>2,'mar'=>3,'apr'=>4,'may'=>5,'jun'=>6,
    'jul'=>7,'aug'=>8,'sep'=>9,'oct'=>10,'nov'=>11,'dec'=>12);
  return(cal_days_in_month(CAL_GREGORIAN,$mo_num[$month],(int)$year));
}

function fBrowser($OS) {
  global $sp;                                   /* separator character */
  switch($OS) {
    case 'Windows':
      $Browser='IE'.$sp.'Firefox'.$sp.'Chrome';
      break;
    case 'Linux':
      $Browser='Firefox'.$sp.'Chrome';
      break;
  }
  if(isset($Browser)) return($Browser);
}

function fUser() {
  global $tc;                                   /* test case number */
  return 'User_'.$tc;
}

function Medicare_report($Age) {                /* Medicare_report equivalence class function */
  if($Age>=65) return('yes');                   /* Medicare_report is expected result */
  if($Age>0) return('no');                      /* Medicare_report is not expected result */
}

function Child_report($Age,$Sex) {              /* Child_report equivalence class function */
  if($Age>0) {
    switch($Sex) {
      case 'female':
        if($Age<20) return('girl');             /* Child_report for girl is expected result */
        else return('no');                      /* Child_report is not expected result */
      case 'male':
        if($Age<20) return('boy');              /* Child_report for boy is expected result */
        else return('no');                      /* Child_report is not expected result */
    }
  }
}

function Adult_report($Age,$Weight,$Height) {   /* Adult_report equivalence class function */
  $bmi_value=BMI($Weight,$Height);              /* Use BMI function to get BMI value */
  if($Age>=20&&$bmi_value>0) {
    if($bmi_value>=30) return('obese');         /* Adult_report for obese is expected result */
    if($bmi_value>=25) return('overweight');    /* Adult_report for overweight is expected result */
    if($bmi_value>=18.5) return('normal');      /* Adult_report for normal is expected result */
    if($bmi_value>0) return('underweight');     /* Adult_report for underweight is expected result */
  }
  if($Age>0&&$bmi_value>0) return('no');        /* Adult_report is not expected result */
}

function BMI($Weight,$Height) {                 /* BMI function for Adult_report */
  if($Weight>0&&$Height>0) {
    $bmi_value=703.06957964*$Weight/$Height/$Height;
    return($bmi_value);                         /* return valid BMI value */
  }
}

function Weight_boundary($Height,$BMI_boundary,$Input_limit) {	/* Weight boundary value function */
  if($Height>0&&$BMI_boundary>0) {
    $w_hi=ceil($Height*$Height*$BMI_boundary/703.06957964); 	/* round up $w_hi so BMI >= $BMI_boundary */
    switch($Input_limit) {
      case 'min':
	return($w_hi);					/* return minimum integer value for higher BMI class */
      case 'max':
	$w_lo=$w_hi-1;
	return $w_lo;					/* return maximum integer value for lower BMI class */
    }
  }
}

function Adult_report_bv($Age,$BMI_boundary,$Input_limit) {	/* Adult_report EC function for BMI boundaries*/
  if($Age>=20&&$BMI_boundary>0) {
    switch($Input_limit) {
      case 'min':
	if($BMI_boundary==30) return('obese');	/* Adult_report for obese is expected result */
	if($BMI_boundary==25) return('overweight');	/* Adult_report for overweight is expected result */
	if($BMI_boundary==18.5) return('normal');	/* Adult_report for normal is expected result */
      case 'max':
	if($BMI_boundary==30) return('overweight');	/* Adult_report for overweight is expected result */
	if($BMI_boundary==25) return('normal');	/* Adult_report for normal is expected result */
	if($BMI_boundary==18.5) return('underweight'); /* Adult_report for underweight is expected result */
    }
  }
  if($Age>0&&$BMI_boundary>0) return('no');		/* Adult_report is not expected result */
}