function chkform(form){
var chkvalue;
var grandtotal;
var discount;

form = document.orderform;
	

chkvalue = 0;
grandtotal = 0;
discount = 0;

if (form.exambox[0].checked==true){
chkvalue=chkvalue +1;
grandtotal = grandtotal + 179;
form.exam1.value = "LAW & Business";
form.exam1code.value="CSLAW";
form.exam1price.value = 179;
}
if (form.exambox[1].checked==true){
chkvalue=chkvalue +1;
grandtotal = grandtotal + 179;
   if (chkvalue==1) 
   {form.exam1.value = "General Engineering";
   form.exam1price.value = 179;
   form.exam1code.value="CSG0A"}
   else {form.exam2.value = "General Engineering";
   form.exam2price.value = 179;
   form.exam2code.value="CSG0A"}
}
if (form.exambox[2].checked==true){
chkvalue=chkvalue +1;
grandtotal = grandtotal + 179;
   if (chkvalue==1) 
   {form.exam1.value = "General Building";
   form.exam1price.value = 179;
      form.exam1code.value="CSG0B";
   }
   else {form.exam2.value = "General Building";
   form.exam2price.value = 179;
   form.exam2code.value="CSG0B";
   }
}
if (form.exambox[3].checked==true){
chkvalue=chkvalue +1;
grandtotal = grandtotal + 179;
   if (chkvalue==1) 
   {form.exam1.value = "C4:Boiler, Hot Water Heating and Steam Fitting";
   form.exam1price.value = 179;
   form.exam1code.value="CSC04";   
   }
   else {form.exam2.value = "C4:Boiler, Hot Water Heating and Steam Fitting";
   form.exam2price.value = 179;
   form.exam2code.value="CSC04"; 
   }
}
if (form.exambox[4].checked==true){
chkvalue=chkvalue +1;
grandtotal = grandtotal + 179;
   if (chkvalue==1) 
   {form.exam1.value = "C21: Building Moving and Demolition";
   form.exam1price.value = 179;
   form.exam1code.value="CSC21"; 
   }
   else {form.exam2.value = "C21: Building Moving and Demolition";
   form.exam2price.value = 179;
   form.exam2code.value="CSC21";
   }
}
if (form.exambox[5].checked==true){
chkvalue=chkvalue +1;
grandtotal = grandtotal + 179;
   if (chkvalue==1) 
   {form.exam1.value = "C6: Cabinet, Millwork and Finish Carpentry";
   form.exam1price.value = 179;
   form.exam1code.value="CSC06";
   }
   else {form.exam2.value = "C6: Cabinet, Millwork and Finish Carpentry";
   form.exam2price.value = 179;
   form.exam2code.value="CSC06";
   }
}
if (form.exambox[6].checked==true){
chkvalue=chkvalue +1;
grandtotal = grandtotal + 179;
   if (chkvalue==1) 
   {form.exam1.value = "C8: Concrete";
   form.exam1price.value = 179;
   form.exam1code.value="CSC08";
   }
   else {form.exam2.value = "C8: Concrete";
   form.exam2price.value = 179;
   form.exam2code.value="CSC08";
   }
}
if (form.exambox[7].checked==true){
chkvalue=chkvalue +1;
grandtotal = grandtotal + 179;
   if (chkvalue==1) 
   {form.exam1.value = "C10: Electrical (General)";
   form.exam1price.value = 179;
   form.exam1code.value="CSC10";
   }
   else {form.exam2.value = "C10: Electrical (General)";
   form.exam2price.value = 179;
   form.exam2code.value="CSC10";
   }
}
if (form.exambox[8].checked==true){
chkvalue=chkvalue +1;
grandtotal = grandtotal + 179;
   if (chkvalue==1) 
   {form.exam1.value = "C45: Electrical Signs";
   form.exam1price.value = 179;
   form.exam1code.value="CSC45";
   }
   else {form.exam2.value = "C45: Electrical Signs";
   form.exam2price.value = 179;
   form.exam2code.value="CSC45";
   }
}
if (form.exambox[9].checked==true){
chkvalue=chkvalue +1;
grandtotal = grandtotal + 179;
   if (chkvalue==1) 
   {form.exam1.value = "C16: Fire Protection";
   form.exam1price.value = 179;
   form.exam1code.value="CSC16";
   }
   else {form.exam2.value = "C16: Fire Protection";
   form.exam2price.value = 179;
   form.exam2code.value="CSC16";
   }
}
if (form.exambox[10].checked==true){
chkvalue=chkvalue +1;
grandtotal = grandtotal + 179;
   if (chkvalue==1) 
   {form.exam1.value = "C15: Flooring and Floor Covering";
   form.exam1price.value = 179;
   form.exam1code.value="CSC15";
   }
   else {form.exam2.value = "C15: Flooring and Floor Covering";
   form.exam2price.value = 179;
   form.exam2code.value="CSC15";
   }
}
if (form.exambox[11].checked==true){
chkvalue=chkvalue +1;
grandtotal = grandtotal + 179;
   if (chkvalue==1) 
   {form.exam1.value = "C17: Glazing";
   form.exam1price.value = 179;
   form.exam1code.value="CSC17";
   }
   else {form.exam2.value = "C17: Glazing";
   form.exam2price.value = 179;
   form.exam2code.value="CSC17";
   }
}
if (form.exambox[12].checked==true){
chkvalue=chkvalue +1;
grandtotal = grandtotal + 179;
   if (chkvalue==1) 
   {form.exam1.value = "C27: Landscaping";
   form.exam1price.value = 179;
   form.exam1code.value="CSC27";
   }
   else {form.exam2.value = "C27: Landscaping";
   form.exam2price.value = 179;
   form.exam2code.value="CSC27";
   }
}
if (form.exambox[13].checked==true){
chkvalue=chkvalue +1;
grandtotal = grandtotal + 179;
   if (chkvalue==1) 
   {form.exam1.value = "C7: Low Voltage Systems";
   form.exam1price.value = 179;
   form.exam1code.value="CSC07";
   }
   else {form.exam2.value = "C7: Low Voltage Systems";
   form.exam2price.value = 179;
   form.exam2code.value="CSC07";
   }
}
if (form.exambox[14].checked==true){
chkvalue=chkvalue +1;
grandtotal = grandtotal + 179;
   if (chkvalue==1) 
   {form.exam1.value = "C29: Masonry";
   form.exam1price.value = 179;
   form.exam1code.value="CSC29";
   }
   else {form.exam2.value = "C29: Masonry";
   form.exam2price.value = 179;
   form.exam2code.value="CSC29";
   }
}
if (form.exambox[15].checked==true){
chkvalue=chkvalue +1;
grandtotal = grandtotal + 179;
   if (chkvalue==1) 
   {form.exam1.value = "C23: Ornamental Metals";
   form.exam1price.value = 179;
   form.exam1code.value="CSC23";
   }
   else {form.exam2.value = "C23: Ornamental Metals";
   form.exam2price.value = 179;
   form.exam2code.value="CSC23";
   }
}
if (form.exambox[16].checked==true){
chkvalue=chkvalue +1;
grandtotal = grandtotal + 179;
   if (chkvalue==1) 
   {form.exam1.value = "C33: Painting and Decorating";
   form.exam1price.value = 179;
   form.exam1code.value="CSC33";
   }
   else {form.exam2.value = "C33: Painting and Decorating";
   form.exam2price.value = 179;
   form.exam2code.value="CSC33";
   }
}
if (form.exambox[17].checked==true){
chkvalue=chkvalue +1;
grandtotal = grandtotal + 179;
   if (chkvalue==1) 
   {form.exam1.value = "C36: Plumbing";
   form.exam1price.value = 179;
   form.exam1code.value="CSC36";
   }
   else {form.exam2.value = "C36: Plumbing";
   form.exam2price.value = 179;
   form.exam2code.value="CSC36";
   }
}
if (form.exambox[18].checked==true){
chkvalue=chkvalue +1;
grandtotal = grandtotal + 179;
   if (chkvalue==1) 
   {form.exam1.value = "C38: Refrigeration";
   form.exam1price.value = 179;
   form.exam1code.value="CSC38";
   }
   else {form.exam2.value = "C38: Refrigeration";
   form.exam2price.value = 179;
   form.exam2code.value="CSC38";
   }
}
if (form.exambox[19].checked==true){
chkvalue=chkvalue +1;
grandtotal = grandtotal + 179;
   if (chkvalue==1) 
   {form.exam1.value = "C39: Roofing";
   form.exam1price.value = 179;
   form.exam1code.value="CSC39";
   }
   else {form.exam2.value = "C39: Roofing";
   form.exam2price.value = 179;
   form.exam2code.value="CSC39";
   }
}
if (form.exambox[20].checked==true){
chkvalue=chkvalue +1;
grandtotal = grandtotal + 179;
   if (chkvalue==1) 
   {form.exam1.value = "C51: Steel, Structural";
   form.exam1price.value = 179;
   form.exam1code.value="CSC51";
   }
   else {form.exam2.value = "C51: Steel, Structural";
   form.exam2price.value = 179;
   form.exam2code.value="CSC51";
   }
}
if (form.exambox[21].checked==true){
chkvalue=chkvalue +1;
grandtotal = grandtotal + 179;
   if (chkvalue==1) 
   {form.exam1.value = "C53: Swimming Pool";
   form.exam1price.value = 179;
   form.exam1code.value="CSC53";
   }
   else {form.exam2.value = "C53: Swimming Pool";
   form.exam2price.value = 179;
   form.exam2code.value="CSC53";
   }
}
if (form.exambox[22].checked==true){
chkvalue=chkvalue +1;
grandtotal = grandtotal + 179;
   if (chkvalue==1) 
   {form.exam1.value = "C54: Tile (Ceramic and Mosaic)";
   form.exam1price.value = 179;
   form.exam1code.value="CSC54";
   }
   else {form.exam2.value = "C54: Tile (Ceramic and Mosaic)";
   form.exam2price.value = 179;
   form.exam2code.value="CSC54";
   }
}
if (form.exambox[23].checked==true){
chkvalue=chkvalue +1;
grandtotal = grandtotal + 179;
   if (chkvalue==1) 
   {form.exam1.value = "C20: Warm-Air HVAC";
   form.exam1price.value = 179;
   form.exam1code.value="CSC20";
   }
   else {form.exam2.value = "C20: Warm-Air HVAC";
   form.exam2price.value = 179;
   form.exam2code.value="CSC20";
   }
}
if (form.exambox[24].checked==true){
chkvalue=chkvalue +1;
grandtotal = grandtotal + 179;
   if (chkvalue==1) 
   {form.exam1.value = "C60: Welding";
   form.exam1price.value = 179;
   form.exam1code.value="CSC60";
   }
   else {form.exam2.value = "C60: Welding";
   form.exam2price.value = 179;
   form.exam2code.value="CSC60";
   }
}
if (form.exambox[25].checked==true){
chkvalue=chkvalue +1;
grandtotal = grandtotal + 179;
   if (chkvalue==1) 
   {form.exam1.value = "ASB: Asbestos";
   form.exam1price.value = 179;
   form.exam1code.value="CSASB";
   }
   else {form.exam2.value = "ASB: Asbestos";
   form.exam2price.value = 179;
   form.exam2code.value="CSASB";
   }
}
if (form.exambox[26].checked==true){
chkvalue=chkvalue +1;
grandtotal = grandtotal + 179;
   if (chkvalue==1) 
   {form.exam1.value = "HSMR: Hazardous Substance Material Removal";
   form.exam1price.value = 179;
   form.exam1code.value="CSHAZ";
   }
   else {form.exam2.value = "HSMR: Hazardous Substance Material Removal";
   form.exam2price.value = 179;
   form.exam2code.value="CSHAZ";
   }
}


if (chkvalue==0){
alert("No exam was selected");
return false;
}
if (chkvalue > 2){
alert("Can not select more than 2 Exams");
return false;
}


if (chkvalue==1){form.numofcart.value=1;}
if (chkvalue==2)
{
form.numofcart.value=2; 
discount = 60;
grandtotal = grandtotal-discount;
}
form.discount.value = discount;
form.grandtotal.value = grandtotal;

document.orderform.submit();
}

