<br />
<b>Warning</b>:  include_once(../..//LEMS_config.php) [<a href='function.include-once'>function.include-once</a>]: failed to open stream: No such file or directory in <b>/usr/www/users/novacodo/MNLindy/MWLF_Archive/LEMS/regJS_process.js.php</b> on line <b>4</b><br />
<br />
<b>Warning</b>:  include_once() [<a href='function.include'>function.include</a>]: Failed opening '../..//LEMS_config.php' for inclusion (include_path='.:/usr/local/lib/php') in <b>/usr/www/users/novacodo/MNLindy/MWLF_Archive/LEMS/regJS_process.js.php</b> on line <b>4</b><br />
  var contests = new Array("Freedom", "Revolution", "Liberation", "Jack and Jill", "Solo Charleston and Jazz", "Solo Jazz and Blues", "Team Performance", "Couples Performance", "Jack and Jill", "Slow/Med Tempo Strictly Lindy", "Amateur Lindy Hop Showdown", "Jack and Jill", "Strictly", "Team Cutting", "Ultimate Lindy Hop Showdown", "Choreography Showcase", "Slow Swing and Blues", "Solo Blues", "Solo Jazz", "Jack and Jill", "Endurance", "Dancer Baseball Team", "Jack and Jill", "MWLF Strictly ", "Jack and Jill", "Strictly Blues", "Team Cutting", "Jack and Jill", "MWLF Strictly", "Jack and Jill", "Strictly Blues", "Team Cuttin' ");
  var contestsCost = new Array(60, 60, 60, 15, 15, 15, 200, 60, 10, 20, 30, 5, 10, 30, 50, 0, 50, 20, 20, 20, 0, 0, 10, 20, 5, 10, 30, 10, 25, 7, 10, 25);
  var classes = new Array("", "", "");
  var classesCost = new Array(50, 45, 75);

<br />
<b>Warning</b>:  in_array() expects parameter 2 to be array, null given in <b>/usr/www/users/novacodo/MNLindy/MWLF_Archive/LEMS/regJS_process.js.php</b> on line <b>88</b><br />
<br />
<b>Warning</b>:  in_array() expects parameter 2 to be array, null given in <b>/usr/www/users/novacodo/MNLindy/MWLF_Archive/LEMS/regJS_process.js.php</b> on line <b>90</b><br />
<br />
<b>Warning</b>:  in_array() expects parameter 2 to be array, null given in <b>/usr/www/users/novacodo/MNLindy/MWLF_Archive/LEMS/regJS_process.js.php</b> on line <b>92</b><br />
<br />
<b>Warning</b>:  in_array() expects parameter 2 to be array, null given in <b>/usr/www/users/novacodo/MNLindy/MWLF_Archive/LEMS/regJS_process.js.php</b> on line <b>94</b><br />
  var showClasses = false;
  var showContests = false;
  var showHousing = false;
  var showMerchandise = false;


  var showEvent    = true;

  var price_id     = -1;
  var discount_id  = -1;  
 
function validate() {
  errorstring = '';
  var elements = document.forms[0].elements;
  var required = new Array("fname", "lname", "email", "address1", "city", "state", "country");
  var reqNames = new Array("First Name", "Last Name", "Email", "Address", "City", "State", "Country"); 
	
  for (i=0;i<required.length;i++) {
    if (!elements[required[i]].value) 
      errorstring += "* " + reqNames[i] + " is a required field!<br/>\n";
  }


  //  Contest Validation
if (showContests && (contests.length > 0)) {
  for (i = 0; i < contests.length; i++) {
    var tName = contests[i]+"Partner";
    if (elements[contests[i]].checked & (elements[tName] != null) ) {
        //& (tName in elements) ) {
      if (elements[tName].value == "")
       errorstring += "* " + contests[i] + " requires a partner!<br/>\n"; 
    }
  }
}

  // Class Validation
  var classSelected = false;
if (showClasses && (classes.length > 0)) {
  for (i = 0; i < classes.length; i++) {
    if (elements[classes[i]].checked)
	classSelected = true;
  }
  if (! classSelected) 
    errorstring += "\n* You must select a class!<br/>";
}

  if (!(elements["gender"][0].checked || elements["gender"][1].checked)) {
	errorstring += "\n* You must select a gender!<br/>";
  } 

  return errorstring;
}

function updatePayment() {
  var elements = document.forms[0].elements;

// HIDE GENDER RELATED THINGS HERE, like JNJ  

// HIDE Residency for Follow, 8/3/2008
  if (elements["gender"][1].checked) {
//        elements["Residency Classes"].disabled = true;
//        elements["Residency Classes"].checked  = false;
  } else if (elements["gender"][0].checked) {
//        elements["Residency Classes"].disabled = false;
  }



// DETERMINE COSTS
  var cost = 0;
  var costEvent = 0.00; 
  var discount = 0;

function lookupCost(cost) {
if (cost == 1) {  price_id = cost; cost = 25; } 
else if (cost == 8) {  price_id = cost; cost = 100; } 
else if (cost == 6) {  price_id = cost; cost = 125; } 
else if (cost == 7) {  price_id = cost; cost = 145; } 
else if (cost == 9) {  price_id = cost; cost = 75; } 
else if (cost == 10) {  price_id = cost; cost = 85; } 
else if (cost == 16) {  price_id = cost; cost = 145; } 
else if (cost == 12) {  price_id = cost; cost = 60; } 
else if (cost == 13) {  price_id = cost; cost = 75; } 
else if (cost == 14) {  price_id = cost; cost = 75; } 
else if (cost == 17) {  price_id = cost; cost = 160; } 
else if (cost == 18) {  price_id = cost; cost = 115; } 
else if (cost == 19) {  price_id = cost; cost = 125; } 
else if (cost == 20) {  price_id = cost; cost = 40; } 
else if (cost == 21) {  price_id = cost; cost = 175; } 
else if (cost == 22) {  price_id = cost; cost = 180; } 
else if (cost == 23) {  price_id = cost; cost = 145; } 
else if (cost == 24) {  price_id = cost; cost = 135; } 
else if (cost == 25) {  price_id = cost; cost = 45; } 
else if (cost == 26) {  price_id = cost; cost = 50; } 
else if (cost == 27) {  price_id = cost; cost = 55; } 
else if (cost == 28) {  price_id = cost; cost = 85; } 
else if (cost == 29) {  price_id = cost; cost = 99; } 
else if (cost == 32) {  price_id = cost; cost = 35; } 
else if (cost == 31) {  price_id = cost; cost = 105; } 
else if (cost == 33) {  price_id = cost; cost = 40; } 
else if (cost == 34) {  price_id = cost; cost = 35; } 
else if (cost == 35) {  price_id = cost; cost = 40; } 
else if (cost == 36) {  price_id = cost; cost = 15; } 
else if (cost == 37) {  price_id = cost; cost = 50; } 
else if (cost == 38) {  price_id = cost; cost = 15; } 
else if (cost == 39) {  price_id = cost; cost = 40; } 
else if (cost == 40) {  price_id = cost; cost = 60; } 
else if (cost == 41) {  price_id = cost; cost = 99; } 
else if (cost == 42) {  price_id = cost; cost = 109; } 
else if (cost == 43) {  price_id = cost; cost = 119; } 
else if (cost == 44) {  price_id = cost; cost = 129; } 
else if (cost == 45) {  price_id = cost; cost = 139; } 
else if (cost == 46) {  price_id = cost; cost = 10; } 
else if (cost == 47) {  price_id = cost; cost = 15; } 
else if (cost == 48) {  price_id = cost; cost = 15; } 
else if (cost == 49) {  price_id = cost; cost = 15; } 
else if (cost == 50) {  price_id = cost; cost = 15; } 
else if (cost == 51) {  price_id = cost; cost = 15; } 
else if (cost == 52) {  price_id = cost; cost = 15; } 
else if (cost == 53) {  price_id = cost; cost = 15; } 
else if (cost == 54) {  price_id = cost; cost = 15; } 
else if (cost == 55) {  price_id = cost; cost = 15; } 
else if (cost == 56) {  price_id = cost; cost = 15; } 
else if (cost == 57) {  price_id = cost; cost = 45; } 
else if (cost == 58) {  price_id = cost; cost = 50; } 
else if (cost == 59) {  price_id = cost; cost = 60; } 
else if (cost == 60) {  price_id = cost; cost = 65; } 
else if (cost == 61) {  price_id = cost; cost = 10; } 
else if (cost == 62) {  price_id = cost; cost = 15; } 
else if (cost == 63) {  price_id = cost; cost = 15; } 
else if (cost == 64) {  price_id = cost; cost = 15; } 
else if (cost == 65) {  price_id = cost; cost = 15; } 
else if (cost == 66) {  price_id = cost; cost = 15; } 
else if (cost == 67) {  price_id = cost; cost = 15; } 
else if (cost == 68) {  price_id = cost; cost = 15; } 
else if (cost == 69) {  price_id = cost; cost = 15; } 
else if (cost == 70) {  price_id = cost; cost = 119; } 
else if (cost == 71) {  price_id = cost; cost = 129; } 
else if (cost == 72) {  price_id = cost; cost = 139; } 
else if (cost == 73) {  price_id = cost; cost = 149; } 
else if (cost == 74) {  price_id = cost; cost = 159; } 
else if (cost == 75) {  price_id = cost; cost = 169; } 
else if (cost == 0) {  price_id = cost; cost = 0; } 
else if (cost == 77) {  price_id = cost; cost = 55; } 
else if (cost == 78) {  price_id = cost; cost = 60; } 
else if (cost == 79) {  price_id = cost; cost = 65; } 
else if (cost == 80) {  price_id = cost; cost = 70; } 
else if (cost == 81) {  price_id = cost; cost = 75; } 
else if (cost == 82) {  price_id = cost; cost = 20; } 
else if (cost == 83) {  price_id = cost; cost = 15; } 
else if (cost == 84) {  price_id = cost; cost = 99; } 
else if (cost == 85) {  price_id = cost; cost = 109; } 
else if (cost == 86) {  price_id = cost; cost = 119; } 
else if (cost == 87) {  price_id = cost; cost = 20; } 
if (isNaN(cost)) cost = 0;
return cost; 
}

// Determine costs for group "baseline"

var v_baseline = elements["cost_baseline"];
if (v_baseline) { 
  cost_baseline = parseInt(elements["cost_baseline"].value);
} else {
  cost_baseline = 0;
}
if (isNaN(cost_baseline) && (v_baseline)) {
    for (i=0; i<elements["cost_baseline"].length; i++) {
      if (elements["cost_baseline"][i].checked) {
        cost_baseline = parseInt(elements["cost_baseline"][i].value);
      }
    }
  } else if (v_baseline) {
    if (elements["cost_baseline"].checked == false)  
      cost_baseline = 0;
  } else {
    cost_baseline = 0;
  }
price_id_baseline = cost_baseline;
cost_baseline = lookupCost(cost_baseline);


// Determine costs for group "Event"

var v_Event = elements["cost_Event"];
if (v_Event) { 
  cost_Event = parseInt(elements["cost_Event"].value);
} else {
  cost_Event = 0;
}
if (isNaN(cost_Event) && (v_Event)) {
    for (i=0; i<elements["cost_Event"].length; i++) {
      if (elements["cost_Event"][i].checked) {
        cost_Event = parseInt(elements["cost_Event"][i].value);
      }
    }
  } else if (v_Event) {
    if (elements["cost_Event"].checked == false)  
      cost_Event = 0;
  } else {
    cost_Event = 0;
  }
price_id_Event = cost_Event;
cost_Event = lookupCost(cost_Event);


// Determine costs for group "Workshops"

var v_Workshops = elements["cost_Workshops"];
if (v_Workshops) { 
  cost_Workshops = parseInt(elements["cost_Workshops"].value);
} else {
  cost_Workshops = 0;
}
if (isNaN(cost_Workshops) && (v_Workshops)) {
    for (i=0; i<elements["cost_Workshops"].length; i++) {
      if (elements["cost_Workshops"][i].checked) {
        cost_Workshops = parseInt(elements["cost_Workshops"][i].value);
      }
    }
  } else if (v_Workshops) {
    if (elements["cost_Workshops"].checked == false)  
      cost_Workshops = 0;
  } else {
    cost_Workshops = 0;
  }
price_id_Workshops = cost_Workshops;
cost_Workshops = lookupCost(cost_Workshops);


// Determine costs for group "Dances"

var v_Dances = elements["cost_Dances"];
if (v_Dances) { 
  cost_Dances = parseInt(elements["cost_Dances"].value);
} else {
  cost_Dances = 0;
}
if (isNaN(cost_Dances) && (v_Dances)) {
    for (i=0; i<elements["cost_Dances"].length; i++) {
      if (elements["cost_Dances"][i].checked) {
        cost_Dances = parseInt(elements["cost_Dances"][i].value);
      }
    }
  } else if (v_Dances) {
    if (elements["cost_Dances"].checked == false)  
      cost_Dances = 0;
  } else {
    cost_Dances = 0;
  }
price_id_Dances = cost_Dances;
cost_Dances = lookupCost(cost_Dances);


// Determine costs for group "Thursday_Night"

var v_Thursday_Night = elements["cost_Thursday_Night"];
if (v_Thursday_Night) { 
  cost_Thursday_Night = parseInt(elements["cost_Thursday_Night"].value);
} else {
  cost_Thursday_Night = 0;
}
if (isNaN(cost_Thursday_Night) && (v_Thursday_Night)) {
    for (i=0; i<elements["cost_Thursday_Night"].length; i++) {
      if (elements["cost_Thursday_Night"][i].checked) {
        cost_Thursday_Night = parseInt(elements["cost_Thursday_Night"][i].value);
      }
    }
  } else if (v_Thursday_Night) {
    if (elements["cost_Thursday_Night"].checked == false)  
      cost_Thursday_Night = 0;
  } else {
    cost_Thursday_Night = 0;
  }
price_id_Thursday_Night = cost_Thursday_Night;
cost_Thursday_Night = lookupCost(cost_Thursday_Night);


// Determine costs for group "Friday_Night"

var v_Friday_Night = elements["cost_Friday_Night"];
if (v_Friday_Night) { 
  cost_Friday_Night = parseInt(elements["cost_Friday_Night"].value);
} else {
  cost_Friday_Night = 0;
}
if (isNaN(cost_Friday_Night) && (v_Friday_Night)) {
    for (i=0; i<elements["cost_Friday_Night"].length; i++) {
      if (elements["cost_Friday_Night"][i].checked) {
        cost_Friday_Night = parseInt(elements["cost_Friday_Night"][i].value);
      }
    }
  } else if (v_Friday_Night) {
    if (elements["cost_Friday_Night"].checked == false)  
      cost_Friday_Night = 0;
  } else {
    cost_Friday_Night = 0;
  }
price_id_Friday_Night = cost_Friday_Night;
cost_Friday_Night = lookupCost(cost_Friday_Night);


// Determine costs for group "Friday_AfterHours"

var v_Friday_AfterHours = elements["cost_Friday_AfterHours"];
if (v_Friday_AfterHours) { 
  cost_Friday_AfterHours = parseInt(elements["cost_Friday_AfterHours"].value);
} else {
  cost_Friday_AfterHours = 0;
}
if (isNaN(cost_Friday_AfterHours) && (v_Friday_AfterHours)) {
    for (i=0; i<elements["cost_Friday_AfterHours"].length; i++) {
      if (elements["cost_Friday_AfterHours"][i].checked) {
        cost_Friday_AfterHours = parseInt(elements["cost_Friday_AfterHours"][i].value);
      }
    }
  } else if (v_Friday_AfterHours) {
    if (elements["cost_Friday_AfterHours"].checked == false)  
      cost_Friday_AfterHours = 0;
  } else {
    cost_Friday_AfterHours = 0;
  }
price_id_Friday_AfterHours = cost_Friday_AfterHours;
cost_Friday_AfterHours = lookupCost(cost_Friday_AfterHours);


// Determine costs for group "Saturday_Night"

var v_Saturday_Night = elements["cost_Saturday_Night"];
if (v_Saturday_Night) { 
  cost_Saturday_Night = parseInt(elements["cost_Saturday_Night"].value);
} else {
  cost_Saturday_Night = 0;
}
if (isNaN(cost_Saturday_Night) && (v_Saturday_Night)) {
    for (i=0; i<elements["cost_Saturday_Night"].length; i++) {
      if (elements["cost_Saturday_Night"][i].checked) {
        cost_Saturday_Night = parseInt(elements["cost_Saturday_Night"][i].value);
      }
    }
  } else if (v_Saturday_Night) {
    if (elements["cost_Saturday_Night"].checked == false)  
      cost_Saturday_Night = 0;
  } else {
    cost_Saturday_Night = 0;
  }
price_id_Saturday_Night = cost_Saturday_Night;
cost_Saturday_Night = lookupCost(cost_Saturday_Night);


// Determine costs for group "Saturday_AfterHours"

var v_Saturday_AfterHours = elements["cost_Saturday_AfterHours"];
if (v_Saturday_AfterHours) { 
  cost_Saturday_AfterHours = parseInt(elements["cost_Saturday_AfterHours"].value);
} else {
  cost_Saturday_AfterHours = 0;
}
if (isNaN(cost_Saturday_AfterHours) && (v_Saturday_AfterHours)) {
    for (i=0; i<elements["cost_Saturday_AfterHours"].length; i++) {
      if (elements["cost_Saturday_AfterHours"][i].checked) {
        cost_Saturday_AfterHours = parseInt(elements["cost_Saturday_AfterHours"][i].value);
      }
    }
  } else if (v_Saturday_AfterHours) {
    if (elements["cost_Saturday_AfterHours"].checked == false)  
      cost_Saturday_AfterHours = 0;
  } else {
    cost_Saturday_AfterHours = 0;
  }
price_id_Saturday_AfterHours = cost_Saturday_AfterHours;
cost_Saturday_AfterHours = lookupCost(cost_Saturday_AfterHours);


// Determine costs for group "Sunday_Night"

var v_Sunday_Night = elements["cost_Sunday_Night"];
if (v_Sunday_Night) { 
  cost_Sunday_Night = parseInt(elements["cost_Sunday_Night"].value);
} else {
  cost_Sunday_Night = 0;
}
if (isNaN(cost_Sunday_Night) && (v_Sunday_Night)) {
    for (i=0; i<elements["cost_Sunday_Night"].length; i++) {
      if (elements["cost_Sunday_Night"][i].checked) {
        cost_Sunday_Night = parseInt(elements["cost_Sunday_Night"][i].value);
      }
    }
  } else if (v_Sunday_Night) {
    if (elements["cost_Sunday_Night"].checked == false)  
      cost_Sunday_Night = 0;
  } else {
    cost_Sunday_Night = 0;
  }
price_id_Sunday_Night = cost_Sunday_Night;
cost_Sunday_Night = lookupCost(cost_Sunday_Night);


// Determine costs for group "Weekend_Package"

var v_Weekend_Package = elements["cost_Weekend_Package"];
if (v_Weekend_Package) { 
  cost_Weekend_Package = parseInt(elements["cost_Weekend_Package"].value);
} else {
  cost_Weekend_Package = 0;
}
if (isNaN(cost_Weekend_Package) && (v_Weekend_Package)) {
    for (i=0; i<elements["cost_Weekend_Package"].length; i++) {
      if (elements["cost_Weekend_Package"][i].checked) {
        cost_Weekend_Package = parseInt(elements["cost_Weekend_Package"][i].value);
      }
    }
  } else if (v_Weekend_Package) {
    if (elements["cost_Weekend_Package"].checked == false)  
      cost_Weekend_Package = 0;
  } else {
    cost_Weekend_Package = 0;
  }
price_id_Weekend_Package = cost_Weekend_Package;
cost_Weekend_Package = lookupCost(cost_Weekend_Package);


// Determine costs for group "the_Midwest_Lindyfest_Show"

var v_the_Midwest_Lindyfest_Show = elements["cost_the_Midwest_Lindyfest_Show"];
if (v_the_Midwest_Lindyfest_Show) { 
  cost_the_Midwest_Lindyfest_Show = parseInt(elements["cost_the_Midwest_Lindyfest_Show"].value);
} else {
  cost_the_Midwest_Lindyfest_Show = 0;
}
if (isNaN(cost_the_Midwest_Lindyfest_Show) && (v_the_Midwest_Lindyfest_Show)) {
    for (i=0; i<elements["cost_the_Midwest_Lindyfest_Show"].length; i++) {
      if (elements["cost_the_Midwest_Lindyfest_Show"][i].checked) {
        cost_the_Midwest_Lindyfest_Show = parseInt(elements["cost_the_Midwest_Lindyfest_Show"][i].value);
      }
    }
  } else if (v_the_Midwest_Lindyfest_Show) {
    if (elements["cost_the_Midwest_Lindyfest_Show"].checked == false)  
      cost_the_Midwest_Lindyfest_Show = 0;
  } else {
    cost_the_Midwest_Lindyfest_Show = 0;
  }
price_id_the_Midwest_Lindyfest_Show = cost_the_Midwest_Lindyfest_Show;
cost_the_Midwest_Lindyfest_Show = lookupCost(cost_the_Midwest_Lindyfest_Show);


// Determine costs for group "MWLF_TShirts"

var v_MWLF_TShirts = elements["cost_MWLF_TShirts"];
if (v_MWLF_TShirts) { 
  cost_MWLF_TShirts = parseInt(elements["cost_MWLF_TShirts"].value);
} else {
  cost_MWLF_TShirts = 0;
}
if (isNaN(cost_MWLF_TShirts) && (v_MWLF_TShirts)) {
    for (i=0; i<elements["cost_MWLF_TShirts"].length; i++) {
      if (elements["cost_MWLF_TShirts"][i].checked) {
        cost_MWLF_TShirts = parseInt(elements["cost_MWLF_TShirts"][i].value);
      }
    }
  } else if (v_MWLF_TShirts) {
    if (elements["cost_MWLF_TShirts"].checked == false)  
      cost_MWLF_TShirts = 0;
  } else {
    cost_MWLF_TShirts = 0;
  }
price_id_MWLF_TShirts = cost_MWLF_TShirts;
cost_MWLF_TShirts = lookupCost(cost_MWLF_TShirts);


// Determine costs for group "Weekend_Registration"

var v_Weekend_Registration = elements["cost_Weekend_Registration"];
if (v_Weekend_Registration) { 
  cost_Weekend_Registration = parseInt(elements["cost_Weekend_Registration"].value);
} else {
  cost_Weekend_Registration = 0;
}
if (isNaN(cost_Weekend_Registration) && (v_Weekend_Registration)) {
    for (i=0; i<elements["cost_Weekend_Registration"].length; i++) {
      if (elements["cost_Weekend_Registration"][i].checked) {
        cost_Weekend_Registration = parseInt(elements["cost_Weekend_Registration"][i].value);
      }
    }
  } else if (v_Weekend_Registration) {
    if (elements["cost_Weekend_Registration"].checked == false)  
      cost_Weekend_Registration = 0;
  } else {
    cost_Weekend_Registration = 0;
  }
price_id_Weekend_Registration = cost_Weekend_Registration;
cost_Weekend_Registration = lookupCost(cost_Weekend_Registration);


// Determine costs for group "MWLF_Show"

var v_MWLF_Show = elements["cost_MWLF_Show"];
if (v_MWLF_Show) { 
  cost_MWLF_Show = parseInt(elements["cost_MWLF_Show"].value);
} else {
  cost_MWLF_Show = 0;
}
if (isNaN(cost_MWLF_Show) && (v_MWLF_Show)) {
    for (i=0; i<elements["cost_MWLF_Show"].length; i++) {
      if (elements["cost_MWLF_Show"][i].checked) {
        cost_MWLF_Show = parseInt(elements["cost_MWLF_Show"][i].value);
      }
    }
  } else if (v_MWLF_Show) {
    if (elements["cost_MWLF_Show"].checked == false)  
      cost_MWLF_Show = 0;
  } else {
    cost_MWLF_Show = 0;
  }
price_id_MWLF_Show = cost_MWLF_Show;
cost_MWLF_Show = lookupCost(cost_MWLF_Show);


// Determine costs for group "MWLF_TShirt"

var v_MWLF_TShirt = elements["cost_MWLF_TShirt"];
if (v_MWLF_TShirt) { 
  cost_MWLF_TShirt = parseInt(elements["cost_MWLF_TShirt"].value);
} else {
  cost_MWLF_TShirt = 0;
}
if (isNaN(cost_MWLF_TShirt) && (v_MWLF_TShirt)) {
    for (i=0; i<elements["cost_MWLF_TShirt"].length; i++) {
      if (elements["cost_MWLF_TShirt"][i].checked) {
        cost_MWLF_TShirt = parseInt(elements["cost_MWLF_TShirt"][i].value);
      }
    }
  } else if (v_MWLF_TShirt) {
    if (elements["cost_MWLF_TShirt"].checked == false)  
      cost_MWLF_TShirt = 0;
  } else {
    cost_MWLF_TShirt = 0;
  }
price_id_MWLF_TShirt = cost_MWLF_TShirt;
cost_MWLF_TShirt = lookupCost(cost_MWLF_TShirt);


// Determine costs for group "Weekend_Pass"

var v_Weekend_Pass = elements["cost_Weekend_Pass"];
if (v_Weekend_Pass) { 
  cost_Weekend_Pass = parseInt(elements["cost_Weekend_Pass"].value);
} else {
  cost_Weekend_Pass = 0;
}
if (isNaN(cost_Weekend_Pass) && (v_Weekend_Pass)) {
    for (i=0; i<elements["cost_Weekend_Pass"].length; i++) {
      if (elements["cost_Weekend_Pass"][i].checked) {
        cost_Weekend_Pass = parseInt(elements["cost_Weekend_Pass"][i].value);
      }
    }
  } else if (v_Weekend_Pass) {
    if (elements["cost_Weekend_Pass"].checked == false)  
      cost_Weekend_Pass = 0;
  } else {
    cost_Weekend_Pass = 0;
  }
price_id_Weekend_Pass = cost_Weekend_Pass;
cost_Weekend_Pass = lookupCost(cost_Weekend_Pass);


// Determine costs for group "Riverboat"

var v_Riverboat = elements["cost_Riverboat"];
if (v_Riverboat) { 
  cost_Riverboat = parseInt(elements["cost_Riverboat"].value);
} else {
  cost_Riverboat = 0;
}
if (isNaN(cost_Riverboat) && (v_Riverboat)) {
    for (i=0; i<elements["cost_Riverboat"].length; i++) {
      if (elements["cost_Riverboat"][i].checked) {
        cost_Riverboat = parseInt(elements["cost_Riverboat"][i].value);
      }
    }
  } else if (v_Riverboat) {
    if (elements["cost_Riverboat"].checked == false)  
      cost_Riverboat = 0;
  } else {
    cost_Riverboat = 0;
  }
price_id_Riverboat = cost_Riverboat;
cost_Riverboat = lookupCost(cost_Riverboat);


// Determine costs for group "the_Show"

var v_the_Show = elements["cost_the_Show"];
if (v_the_Show) { 
  cost_the_Show = parseInt(elements["cost_the_Show"].value);
} else {
  cost_the_Show = 0;
}
if (isNaN(cost_the_Show) && (v_the_Show)) {
    for (i=0; i<elements["cost_the_Show"].length; i++) {
      if (elements["cost_the_Show"][i].checked) {
        cost_the_Show = parseInt(elements["cost_the_Show"][i].value);
      }
    }
  } else if (v_the_Show) {
    if (elements["cost_the_Show"].checked == false)  
      cost_the_Show = 0;
  } else {
    cost_the_Show = 0;
  }
price_id_the_Show = cost_the_Show;
cost_the_Show = lookupCost(cost_the_Show);


// Determine costs for group "Workshops_and_Dances"

var v_Workshops_and_Dances = elements["cost_Workshops_and_Dances"];
if (v_Workshops_and_Dances) { 
  cost_Workshops_and_Dances = parseInt(elements["cost_Workshops_and_Dances"].value);
} else {
  cost_Workshops_and_Dances = 0;
}
if (isNaN(cost_Workshops_and_Dances) && (v_Workshops_and_Dances)) {
    for (i=0; i<elements["cost_Workshops_and_Dances"].length; i++) {
      if (elements["cost_Workshops_and_Dances"][i].checked) {
        cost_Workshops_and_Dances = parseInt(elements["cost_Workshops_and_Dances"][i].value);
      }
    }
  } else if (v_Workshops_and_Dances) {
    if (elements["cost_Workshops_and_Dances"].checked == false)  
      cost_Workshops_and_Dances = 0;
  } else {
    cost_Workshops_and_Dances = 0;
  }
price_id_Workshops_and_Dances = cost_Workshops_and_Dances;
cost_Workshops_and_Dances = lookupCost(cost_Workshops_and_Dances);

 

 
  var today = new Date();

discount_id_costEvent = -1;


costEvent = cost_baseline + cost_Event + cost_Workshops + cost_Dances + cost_Thursday_Night + cost_Friday_Night + cost_Friday_AfterHours + cost_Saturday_Night + cost_Saturday_AfterHours + cost_Sunday_Night + cost_Weekend_Package + cost_the_Midwest_Lindyfest_Show + cost_MWLF_TShirts + cost_Weekend_Registration + cost_MWLF_Show + cost_MWLF_TShirt + cost_Weekend_Pass + cost_Riverboat + cost_the_Show + cost_Workshops_and_Dances;


// costEvent Discounts
if ((elements["discount"].value == "bsnsb2009") &&  true  && true ) {
  cost_costEvent = 60; discount_id_costEvent = 5;

} if ((elements["discount"].value == "cbZero") &&  true  && true ) {
  cost_costEvent = 0; discount_id_costEvent = 7;

} if ((elements["discount"].value == "cbZero") &&  true  && true ) {
  cost_costEvent = 0; discount_id_costEvent = 8;

} if ((elements["discount"].value == "None") &&  true  && true ) {
  cost_costEvent = cost_costEvent * (1 - (0 / 1)); discount_id = -1;
} if ((elements["discount"].value == "EtB4NSB2010") &&  true  && true ) {
  cost_costEvent = 0; discount_id_costEvent = 34;

}   
  var contestCost = 0;
  var classCost   = 0;

// HOUSING REQUEST CHECK
  var housingReq;

  if (elements["Housing"].checked) 
    housingReq = "Requested";
  else 
    housingReq = "Not&nbsp;Requested";

// Contest Costs
//  var contestsCost = new Array(10, 20, 30);
  for (i = 0; i < contests.length; i++) {
    if (elements[contests[i]].checked) 
      contestCost += contestsCost[i];
  }

// Class Costs
/*
  var classes = new Array("Workshop - Full Price", "Workshop - Student Price", "Residency Classes");
  var classesCost = new Array(50, 45, 75);
*/
  for (i = 0; i < classes.length; i++) {
    if (elements[classes[i]].checked)
      classCost += classesCost[i];
  }


  var totalCost = classCost + contestCost + costEvent;
 
// SET ACTION OR ERROR STRING

  var errorString = validate();
  var actionString = "process";
 
  if (errorString == '') {
    actionString = "<center>";
    actionString += "<input type=\"hidden\" name=\"LEMS_totalCost\" value=\"" + (new Number(totalCost).toFixed(2)) + "\"/>";
    actionString += "<input type=\"hidden\" name=\"LEMS_costEvent\" value=\"" + (new Number(costEvent).toFixed(2)) + "\"/>";
    actionString += "<input type=\"hidden\" name=\"LEMS_classCost\" value=\"" + (new Number(classCost).toFixed(2)) + "\"/>";
    actionString += "<input type=\"hidden\" name=\"LEMS_contestCost\" value=\"" + (new Number(contestCost).toFixed(2)) + "\"/>";
    // SML: 2011-12-02 - No longer necessary actionString += "<input type=\"hidden\" name=\"LEMS_price_id\" value=\"" + price_id + "\"/>";
    actionString += "<input type=\"hidden\" name=\"LEMS_price_ids[]\" value=\"" + price_id_baseline + "\"/>";
    actionString += "<input type=\"hidden\" name=\"LEMS_price_ids[]\" value=\"" + price_id_Event + "\"/>";
    actionString += "<input type=\"hidden\" name=\"LEMS_price_ids[]\" value=\"" + price_id_Workshops + "\"/>";
    actionString += "<input type=\"hidden\" name=\"LEMS_price_ids[]\" value=\"" + price_id_Dances + "\"/>";
    actionString += "<input type=\"hidden\" name=\"LEMS_price_ids[]\" value=\"" + price_id_Thursday_Night + "\"/>";
    actionString += "<input type=\"hidden\" name=\"LEMS_price_ids[]\" value=\"" + price_id_Friday_Night + "\"/>";
    actionString += "<input type=\"hidden\" name=\"LEMS_price_ids[]\" value=\"" + price_id_Friday_AfterHours + "\"/>";
    actionString += "<input type=\"hidden\" name=\"LEMS_price_ids[]\" value=\"" + price_id_Saturday_Night + "\"/>";
    actionString += "<input type=\"hidden\" name=\"LEMS_price_ids[]\" value=\"" + price_id_Saturday_AfterHours + "\"/>";
    actionString += "<input type=\"hidden\" name=\"LEMS_price_ids[]\" value=\"" + price_id_Sunday_Night + "\"/>";
    actionString += "<input type=\"hidden\" name=\"LEMS_price_ids[]\" value=\"" + price_id_Weekend_Package + "\"/>";
    actionString += "<input type=\"hidden\" name=\"LEMS_price_ids[]\" value=\"" + price_id_the_Midwest_Lindyfest_Show + "\"/>";
    actionString += "<input type=\"hidden\" name=\"LEMS_price_ids[]\" value=\"" + price_id_MWLF_TShirts + "\"/>";
    actionString += "<input type=\"hidden\" name=\"LEMS_price_ids[]\" value=\"" + price_id_Weekend_Registration + "\"/>";
    actionString += "<input type=\"hidden\" name=\"LEMS_price_ids[]\" value=\"" + price_id_MWLF_Show + "\"/>";
    actionString += "<input type=\"hidden\" name=\"LEMS_price_ids[]\" value=\"" + price_id_MWLF_TShirt + "\"/>";
    actionString += "<input type=\"hidden\" name=\"LEMS_price_ids[]\" value=\"" + price_id_Weekend_Pass + "\"/>";
    actionString += "<input type=\"hidden\" name=\"LEMS_price_ids[]\" value=\"" + price_id_Riverboat + "\"/>";
    actionString += "<input type=\"hidden\" name=\"LEMS_price_ids[]\" value=\"" + price_id_the_Show + "\"/>";
    actionString += "<input type=\"hidden\" name=\"LEMS_price_ids[]\" value=\"" + price_id_Workshops_and_Dances + "\"/>";
    actionString += "<input type=\"hidden\" name=\"LEMS_discount_groups[]\" value=\"costEvent\"/>";
    actionString += "<input type=\"hidden\" name=\"LEMS_discount_ids[]\" value=\"" + discount_id_costEvent + "\"/>";
    actionString += "<input type=\"hidden\" name=\"LEMS_discount_id\" value=\"" + discount_id + "\"/>";

    actionString += "<input type=\"submit\" name=\"submit\" value=\"Submit and goto payment.\" class=\"LEMS_submit\" />";
    actionString += "</center>";
  } else {
    actionString = errorString;
  }

// Create Payment HTML
 
  var innerHTML = "<table width=\"100%\" cellspacing=\"3\" cellpadding=\"0\" border=\"0\">";
  innerHTML += "<tr><th width=\"40%\">Item</th><th width=\"20%\">Cost</th><td width=\"1%\">&nbsp;</td><th width=\"39%\">Action</th></tr>";
 
  innerHTML += "<tr><td>Admission</td><td align=\"right\">" + (new Number(costEvent).toFixed(2)) + "$ US</td>"; 
  innerHTML += "<td rowspan=\"99\" >&nbsp;</td>";
  innerHTML += "<td rowspan=\"99\" valign=\"top\"><div style=\"margin-left: 2px;\">" + actionString + "</div></td></tr>";

  if (showContests) {
  innerHTML += "<tr><td>&nbsp;</td><td>&nbsp;</td></tr>";
  innerHTML += "<tr><td>Contests</td><td align=\"right\">" + (new Number(contestCost).toFixed(2)) + "$ US</td></tr>";
  }

  if (showClasses) {
  innerHTML += "<tr><td>&nbsp;</td><td>&nbsp;</td></tr>";
  innerHTML += "<tr><td>Classes</td><td align=\"right\">" + classCost + "$ US</td></tr>";
  }

  if (showHousing) {
  innerHTML += "<tr><td>&nbsp;</td><td>&nbsp;</td></tr>";
  innerHTML += "<tr><td>Housing</td><td align=\"right\">" + housingReq + "</td></tr>";
  }

  innerHTML += "<tr><td colspan=\"2\"><hr /></td></tr>";
  innerHTML += "<tr><td>Total</td><td align=\"right\">";
  innerHTML += new Number(totalCost).toFixed(2); 
  innerHTML += "$ US</td></tr>";
  innerHTML += "<tr><td colspan=\"2\">&nbsp;</td></tr>";
  innerHTML += "<tr><td colspan=\"2\">** Not looking right? Go back and edit!<br/><i>(Reported issues with Safari have been remedied.)</i></td></tr>";
  innerHTML += "</table>";
   
  document.getElementById('LEMS_regPaymentContent').innerHTML = innerHTML;

  document.getElementById('LEMS_priceContainer').innerHTML = "$" + (new Number(totalCost).toFixed(2)) + " USD";

  return true;
}
 

