/******************************************************************************
function getMSelectValuesS(selectList, separator) receives a reference to a
multiple selection list and returns string of the values selected in the list.
Each value is separated by the character or string passed in the separator
parameter.
In the HTML selection list below, depending on the options selected, this
function would return an empty string (if no items were selected) or the values
"x" and or "y". Note: for this to work the VALUE attribute of the option tag
must be used.
<SELECT NAME="s" MULTIPLE>
  <OPTION VALUE="x">the variable x</OPTION>
  <OPTION VALUE="y">the variable y</OPTION>
</SELECT>
******************************************************************************/
function getMSelectValuesS(selectList, separator){
var i;
var count = 0;
var tempString = "";

for (i = 0; i < selectList.length; i++){
   if (selectList.options[i].selected){
      if (count > 0) tempString += separator;
      tempString += selectList.options[i].value;
      count++;
      }
   }
return tempString;
}

function getMSelectValuesS2(selectList, separator){
var i;
var count = 0;
var tempString = "";

for (i = 0; i < selectList.length; i++){
   if (selectList.options[i].selected){
      if (count > 0) tempString += separator;
      tempString += selectList.options[i].value;
      count++;
      }
   }
return tempString;
}

//-----------------------------------------------------------------------------
//      Functions that use the get text and get value functions above
//-----------------------------------------------------------------------------

function showSelectedValuesS(formRef){

var select_1 = document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value;
var price_1 = 0;

if (select_1 == 2646){
price_1 = 0.00;
select_1 = "None";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 100 ){
price_1 = 0.00;
select_1 = "Craftsman Decides";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 101 ){
price_1 = 56.99;
select_1 = "Rubber Heels + Full Soles";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 102 ){
price_1 = 46.99;
select_1 = "Rubber Heels + Half Soles";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 103 ){
price_1 = 64.99;
select_1 = "Rubber Heels + Combination Soles";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 104 ){
price_1 = 59.99;
select_1 = "Leather Heel + Full Sole";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 105 ){
price_1 = 49.99;
select_1 = "Leather Heel + Half Sole";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 106 ){
price_1 = 64.99;
select_1 = "Leather Heel + Combination Sole";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 107 ){
price_1 = 61.99;
select_1 = "Combination Heel + Full Sole";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 108 ){
price_1 = 51.99;
select_1 = "Combination Heel + Half Sole";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 109 ){
price_1 = 64.99;
select_1 = "Combination Heel + Combination Sole";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 110 ){
price_1 = 34.99;
select_1 = "Rubber Heels";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 111 ){
price_1 = 36.99;
select_1 = "Leather Heels";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 112 ){
price_1 = 36.99;
select_1 = "Combination Heels";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 212 ){
price_1 = 29.99;
select_1 = "Tips";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 213 ){
price_1 = 34.99;
select_1 = "Heels + Tips";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 214 ){
price_1 = 44.99;
select_1 = "Heels + Sole";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 215 ){
price_1 = 34.99;
select_1 = "Replace Broken Heel Stem";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 216 ){
price_1 = 29.99;
select_1 = "Lower Heels";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 217 ){
price_1 = 34.99;
select_1 = "Recover Heel Stem";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 218 ){
price_1 = 39.99;
select_1 = "Recover Heel Stem + Heels";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 219 ){
price_1 = 44.99;
select_1 = "Recover Heel Stem + Tips";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 220 ){
price_1 = 49.99;
select_1 = "Recover Heel Stem + Tips + Heels";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 221 ){
price_1 = 19.99;
select_1 = "Heels";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 318 ){
price_1 = 44.99;
select_1 = "Birkenstock Full Sole Repair";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 419 ){
price_1 = 69.99;
select_1 = "Voyageur Sole";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 420 ){
price_1 = 69.99;
select_1 = "Logger Sole";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 421 ){
price_1 = 69.99;
select_1 = "Montagna Sole";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 422 ){
price_1 = 69.99;
select_1 = "Technical Lug Sole";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 423 ){
price_1 = 69.99;
select_1 = "Kletterlift Sole";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 524 ){
price_1 = 39.99;
select_1 = "Orthopedic Lifts";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
} 
if (select_1 == 625 ){
price_1 = 69.99;
select_1 = "Technical Lug Sole";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 626 ){
price_1 = 69.99;
select_1 = "Kletterlift Sole";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 627 ){
price_1 = 69.99;
select_1 = "Sierra Sole";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 728 ){
price_1 = 69.99;
select_1 = "Logger Sole";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 729 ){
price_1 = 69.99;
select_1 = "Montagna Sole";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 730 ){
price_1 = 69.99;
select_1 = "Technical Lug Sole";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 731 ){
price_1 = 69.99;
select_1 = "Sierra Sole";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 832 ){
price_1 = 74.99;
select_1 = "Horse Riding and Western Boots";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}
if (select_1 == 833 ){
price_1 = 74.99;
select_1 = "Horse Riding and Western Boots";
document.order1.ADDITIONALINFO[document.order1.ADDITIONALINFO.selectedIndex].value= select_1;
}

var rValues = getMSelectValuesS2(formRef.ADDITIONALINFO2,":");
if (rValues == ""){
   alert("No Additional Work was selected.");
}else{
//   alert("Values of items selected: \n\n" + rValues);
document.order1.ADDITIONALINFO2[document.order1.ADDITIONALINFO2.selectedIndex].value = null;
}
var service_array=rValues.split(":");
var item_array=rValues.split(":");
var part_num=0;
var xtra_cost=0;
while (part_num < service_array.length)
 {
if(service_array[part_num]==2669){
item_array[part_num]="None ";
document.order1.ADDITIONALINFO2[document.order1.ADDITIONALINFO2.selectedIndex].value = null;
xtra_cost+=0.00;
}
if(service_array[part_num]==2670){
item_array[part_num]="Fix Tassels; ";
document.order1.ADDITIONALINFO2[document.order1.ADDITIONALINFO2.selectedIndex].value += item_array[part_num];
xtra_cost+=11.99;
}
if(service_array[part_num]==2671){
item_array[part_num]="New Laces; ";
document.order1.ADDITIONALINFO2[document.order1.ADDITIONALINFO2.selectedIndex].value += item_array[part_num];
xtra_cost+=1.99;
}
if(service_array[part_num]==2672){
item_array[part_num]="New Insoles; ";
document.order1.ADDITIONALINFO2[document.order1.ADDITIONALINFO2.selectedIndex].value += item_array[part_num];
xtra_cost+=14.99;
}
if(service_array[part_num]==2673){
item_array[part_num]="Stretch; ";
document.order1.ADDITIONALINFO2[document.order1.ADDITIONALINFO2.selectedIndex].value += item_array[part_num];
xtra_cost+=4.99;
}
if(service_array[part_num]==2674){
item_array[part_num]="Heel Plates; ";
document.order1.ADDITIONALINFO2[document.order1.ADDITIONALINFO2.selectedIndex].value += item_array[part_num];
xtra_cost+=1.99;
}
if(service_array[part_num]==2675){
item_array[part_num]="Toe Plates; ";
document.order1.ADDITIONALINFO2[document.order1.ADDITIONALINFO2.selectedIndex].value += item_array[part_num];
xtra_cost+=1.99;
}
if(service_array[part_num]==2676){
item_array[part_num]="Dye Any Color; ";
document.order1.ADDITIONALINFO2[document.order1.ADDITIONALINFO2.selectedIndex].value += item_array[part_num];
xtra_cost+=21.99;
}
if(service_array[part_num]==2677){
item_array[part_num]="Orthopedic Lifts; ";
document.order1.ADDITIONALINFO2[document.order1.ADDITIONALINFO2.selectedIndex].value += item_array[part_num];
xtra_cost+=39.99;
}
if(service_array[part_num]==2678){
item_array[part_num]="Zipper Replacement; ";
document.order1.ADDITIONALINFO2[document.order1.ADDITIONALINFO2.selectedIndex].value += item_array[part_num];
xtra_cost+=79.99;
}
//  alert(service_array[part_num]);
  part_num+=1;
  }
//  alert(xtra_cost);
//  alert(document.order1.USERENTRY.value);
//  alert(document.order1.USERENTRY2.value);
//  alert(document.order1.USERENTRY3.value);
document.order1.PRICE.value = (price_1 + xtra_cost);
}
////////////////////////////////////////////////////////////////////
function showSelectedValuesS2(formRef){

var select_2 = document.order2.ADDITIONALINFO[document.order2.ADDITIONALINFO.selectedIndex].value;
var price_2 = 0;





if (select_2 == 2678){
select_2 = "None";
document.order2.ADDITIONALINFO[document.order2.ADDITIONALINFO.selectedIndex].value= select_2;
price_2 = 0.00;
}
if (select_2 == 2679){
select_2 = "Heels + Tips";
document.order2.ADDITIONALINFO[document.order2.ADDITIONALINFO.selectedIndex].value= select_2;
price_2 = 21.99;
}
if (select_2 == 2680){
select_2 = "Heels + Soles";
document.order2.ADDITIONALINFO[document.order2.ADDITIONALINFO.selectedIndex].value= select_2;
price_2 = 29.99;
}
if (select_2 == 2681){
select_2 = "Tips";
document.order2.ADDITIONALINFO[document.order2.ADDITIONALINFO.selectedIndex].value= select_2;
price_2 = 12.99;
}
if (select_2 == 2682){
select_2 = "Heels";
document.order2.ADDITIONALINFO[document.order2.ADDITIONALINFO.selectedIndex].value= select_2;
price_2 = 10.99;
}
if (select_2 == 2683){
select_2 = "Military Boot Heels + Full Soles";
document.order2.ADDITIONALINFO[document.order2.ADDITIONALINFO.selectedIndex].value= select_2;
price_2 = 55.00;
}
if (select_2 == 2684){
select_2 = "Riding Boot Heels + Full Soles";
document.order2.ADDITIONALINFO[document.order2.ADDITIONALINFO.selectedIndex].value= select_2;
price_2 = 85.00;
}
if (select_2 == 2685){
select_2 = "Western Boot Heels + Soles";
document.order2.ADDITIONALINFO[document.order2.ADDITIONALINFO.selectedIndex].value= select_2;
price_2 = 34.99;
}
if (select_2 == 2686){
select_2 = "Birkenstock Full Soles";
document.order2.ADDITIONALINFO[document.order2.ADDITIONALINFO.selectedIndex].value= select_2;
price_2 = 29.99;
}
if (select_2 == 2687){
select_2 = "Heels + Protective Soles";
document.order2.ADDITIONALINFO[document.order2.ADDITIONALINFO.selectedIndex].value= select_2;
price_2 = 23.99;
}
if (select_2 == 2688){
select_2 = "Protective Soles";
document.order2.ADDITIONALINFO[document.order2.ADDITIONALINFO.selectedIndex].value= select_2;
price_2 = 14.99;
}

var rValues = getMSelectValuesS2(formRef.ADDITIONALINFO2,":");
if (rValues == ""){
   alert("No Additional Work was selected.");
}else{
//   alert("Values of items selected: \n\n" + rValues);
document.order2.ADDITIONALINFO2[document.order2.ADDITIONALINFO2.selectedIndex].value = null;
}
var service_array=rValues.split(":");
var item_array=rValues.split(":");
var part_num=0;
var xtra_cost=0;
while (part_num < service_array.length)
 {
if(service_array[part_num]==2689){
item_array[part_num]="None ";
document.order2.ADDITIONALINFO2[document.order2.ADDITIONALINFO2.selectedIndex].value = null;
xtra_cost+=0.00;
}
if(service_array[part_num]==2690){
item_array[part_num]="Recover Heels; ";
document.order2.ADDITIONALINFO2[document.order2.ADDITIONALINFO2.selectedIndex].value += item_array[part_num];
xtra_cost+=24.99;
}
if(service_array[part_num]==2691){
item_array[part_num]="Stretch; ";
document.order2.ADDITIONALINFO2[document.order2.ADDITIONALINFO2.selectedIndex].value += item_array[part_num];
xtra_cost+=4.99;
}
if(service_array[part_num]==2692){
item_array[part_num]="Fix Broken Strap; ";
document.order2.ADDITIONALINFO2[document.order2.ADDITIONALINFO2.selectedIndex].value += item_array[part_num];
xtra_cost+=7.99;
}
if(service_array[part_num]==2693){
item_array[part_num]="Lower/Raise Heel; ";
document.order2.ADDITIONALINFO2[document.order2.ADDITIONALINFO2.selectedIndex].value += item_array[part_num];
xtra_cost+=10.99;
}
if(service_array[part_num]==2694){
item_array[part_num]="New Insole; ";
document.order2.ADDITIONALINFO2[document.order2.ADDITIONALINFO2.selectedIndex].value += item_array[part_num];
xtra_cost+=11.99;
}
if(service_array[part_num]==2695){
item_array[part_num]="Dye Any Color; ";
document.order2.ADDITIONALINFO2[document.order2.ADDITIONALINFO2.selectedIndex].value += item_array[part_num];
xtra_cost+=21.99;
}
if(service_array[part_num]==2696){
item_array[part_num]="Orthopedic Lifts; ";
document.order2.ADDITIONALINFO2[document.order2.ADDITIONALINFO2.selectedIndex].value += item_array[part_num];
xtra_cost+=39.99;
}
//  alert(service_array[part_num]);
  part_num+=1;
  }
//  alert(xtra_cost);
//  alert(document.order2.USERENTRY.value);
//  alert(document.order2.USERENTRY2.value);
//  alert(document.order2.USERENTRY3.value);
document.order2.PRICE.value = (price_2 + xtra_cost);
}