var arrMultiArray = new Array();
var arrMultiArray2 = new Array();
var arrMultiArray3 = new Array();
var arrMultiArray4 = new Array();
var arrPortfolio = new Array();
var arrIntSales = new Array();
var arrProdType = new Array();
var arrGM = new Array();
//var poundValue = decodeURIComponent('%C2%A3');


  function setMultiArray(strParentValue, strValue, strText)
  {
      this.parentValue = strParentValue; 
      this.value    = strValue;
      this.text     = strText;
  }
 
  function AddSelOption(elLst, strValue, strText)
  {
      var opt  = document.createElement('OPTION');
      opt.value = strValue;
      opt.text = strText;
      elLst.options.add(opt, elLst.options.length);
  }
 
  function DelSelOption(elLst, intIndex)
  {
      elLst.options.remove(intIndex);
  }
 
  function DelAllSelOption(elLst)
  {
   for(i=(elLst.options.length-1); i>=0; i--)
    DelSelOption(elLst, i);
   
  }

function setProductOptions6(elLst, sContractType, sEquipment)
  {
   var strHTML;
   strHTML = '';
   var sContractTypeVal = eval('document.frmForm.Attr_' + sContractType + '_Rdo[1].checked');

   if (sContractTypeVal == true) {
          for (i = 0; i < arrMultiArray4.length; i++) {
              if (arrMultiArray4[i].parentValue == elLst.value) {
                  strHTML += '<input type="checkbox" name="Attr_'+ sEquipment +'_chk" id="chk'+ sEquipment + arrMultiArray4[i].value + '" value="' + arrMultiArray4[i].value + '" /><label for="chk'+ sEquipment + arrMultiArray4[i].value + '">' + arrMultiArray4[i].text + '</label><br />';
              }
          }
      }
      else {
          for (i = 0; i < arrMultiArray3.length; i++) {
              if (arrMultiArray3[i].parentValue == elLst.value) {

                  strHTML += '<input type="checkbox" name="Attr_' + sEquipment + '_chk" id="chk' + sEquipment + arrMultiArray3[i].value + '" value="' + arrMultiArray3[i].value + '" /><label for="chk'+ sEquipment + arrMultiArray3[i].value + '">' + arrMultiArray3[i].text + '</label><br />';
              }
          }
      }

      var tdInner = eval("tdInner_" + sEquipment);
      tdInner.innerHTML = strHTML;

	//hiding some fields for BT Anywhere if selected
   var_MobileCallPlan = "1580";

   if (elLst.value == var_MobileCallPlan) {
       document.getElementById("CBMobileCallPlan").style.display = "block";
       document.getElementById("CBMobileCallPlan2").style.display = "block";
       document.getElementById("CBMobileCallPlan3").style.display = "block";
   } else {
       document.getElementById("CBMobileCallPlan").style.display = "none";
       document.getElementById("CBMobileCallPlan2").style.display = "none";
       document.getElementById("CBMobileCallPlan3").style.display = "none";
   }
  }


function setProductOptions5(elLst)
  {
   var strHTML;
	
   //Checkbox values
   strHTML = '';
   for(i=0; i<arrMultiArray3.length; i++)
   {
    if(arrMultiArray3[i].parentValue == elLst.options(elLst.selectedIndex).value)
    {
	
     strHTML += '<input type="checkbox" name="Attr_2051_chk" id="chk2051' + arrMultiArray3[i].value + '" value="' + arrMultiArray3[i].value + '" /><label for="chk2051' + arrMultiArray3[i].value + '">' + arrMultiArray3[i].text + '</label><br />';
    }
   }
   
   tdInner_2051.innerHTML = strHTML;
  }
  
     function setProductOptions4(elLst)
  {
   var strHTML;
	
   /*
   //Select box values
   DelAllSelOption(document.frmForm.Attr_186);
    
   for(i=0; i<arrMultiArray.length; i++)
   {
    if(arrMultiArray[i].parentValue == elLst.options(elLst.selectedIndex).value)
     AddSelOption(document.frmForm.Attr_186, arrMultiArray[i].value, arrMultiArray[i].text);
   }
   */
   //Checkbox values
   strHTML = '';
   for(i=0; i<arrMultiArray.length; i++)
   {
    if(arrMultiArray[i].parentValue == elLst.options(elLst.selectedIndex).value)
    {
	
     strHTML += '<input type="checkbox" name="Attr_457_chk" id="chk457' + arrMultiArray[i].value + '" value="' + arrMultiArray[i].value + '" /><label for="chk457' + arrMultiArray[i].value + '">' + arrMultiArray[i].text + '</label><br />';
    }
   }
   
   tdInner_457.innerHTML = strHTML;
  }
  

 function setProductOptions3(elLst)
  {
   var strHTML;
      strHTML = '';

      if (document.frmForm.Attr_1268_Rdo[1].checked == true) {
          for (i = 0; i < arrMultiArray4.length; i++) {
              if (arrMultiArray4[i].parentValue == elLst.options(elLst.selectedIndex).value) {

                  strHTML += '<input type="checkbox" name="Attr_511_chk" id="chk511' + arrMultiArray4[i].value + '" value="' + arrMultiArray4[i].value + '" /><label for="chk511' + arrMultiArray4[i].value + '">' + arrMultiArray4[i].text + '</label><br />';
              }
          }
      }
      else {
          for (i = 0; i < arrMultiArray3.length; i++) {
              if (arrMultiArray3[i].parentValue == elLst.options(elLst.selectedIndex).value) {

                  strHTML += '<input type="checkbox" name="Attr_511_chk" id="chk511' + arrMultiArray3[i].value + '" value="' + arrMultiArray3[i].value + '" /><label for="chk511' + arrMultiArray3[i].value + '">' + arrMultiArray3[i].text + '</label><br />';
              }
          }
      }
   
   
   tdInner_511.innerHTML = strHTML;

	//hiding some fields for BT Anywhere if selected
   var_MobileCallPlan = "1580";

   if (elLst.value == var_MobileCallPlan) {
       document.getElementById("CBMobileCallPlan").style.display = "block";
       document.getElementById("CBMobileCallPlan2").style.display = "block";
       document.getElementById("CBMobileCallPlan3").style.display = "block";
   } else {
       document.getElementById("CBMobileCallPlan").style.display = "none";
       document.getElementById("CBMobileCallPlan2").style.display = "none";
       document.getElementById("CBMobileCallPlan3").style.display = "none";
   }
  }
    
  function setProductOptions2(elLst)
  {
   var strHTML;
   
   /*
   //Select box values
   DelAllSelOption(document.frmForm.Attr_305);
    
   for(i=0; i<arrMultiArray2.length; i++)
   {
    if(arrMultiArray2[i].parentValue == elLst.options(elLst.selectedIndex).value)
     AddSelOption(document.frmForm.Attr_305, arrMultiArray2[i].value, arrMultiArray2[i].text);
   }
   */
   //Checkbox values
   strHTML = '';
   for(i=0; i<arrMultiArray2.length; i++)
   {
    if(arrMultiArray2[i].parentValue == elLst.options(elLst.selectedIndex).value)
    {
     strHTML += '<input type="checkbox" name="Attr_305_chk" id="chk305' + arrMultiArray2[i].value + '" value="' + arrMultiArray2[i].value + '" /><label for="chk305' + arrMultiArray2[i].value + '">' + arrMultiArray2[i].text + '</label><br />';
    }
   }
   
   tdInner_305.innerHTML = strHTML;
  }
  
//Business Broadband Product selection options.
   function setProductOptions1(elLst)
  {
   var strHTML;
	
   /*
   //Select box values
   DelAllSelOption(document.frmForm.Attr_186);
    
   for(i=0; i<arrMultiArray.length; i++)
   {
    if(arrMultiArray[i].parentValue == elLst.options(elLst.selectedIndex).value)
     AddSelOption(document.frmForm.Attr_186, arrMultiArray[i].value, arrMultiArray[i].text);
   }
   */
   //Checkbox values
   strHTML = '';
   for(i=0; i<arrMultiArray.length; i++)
   {
    if(arrMultiArray[i].parentValue == elLst.options(elLst.selectedIndex).value)
    {
	
     strHTML += '<input type="checkbox" name="Attr_186_chk" id="chk186' + arrMultiArray[i].value + '" value="' + arrMultiArray[i].value + '" /><label for="chk186' + arrMultiArray[i].value + '">' + arrMultiArray[i].text + '</label><br />';
    }
   }
   
   tdInner_186.innerHTML = strHTML;

	//fibre products - hide/unhide check fields
   if (elLst.value == "2062" || elLst.value == "2063" || elLst.value == "2277") {
        document.getElementById("BBFibreChecksHead").style.display = "block";
        document.getElementById("BBFibreChecks").style.display = "block";
    } 
    else if (elLst.value == "2192" || elLst.value == "2193") {
        document.getElementById("BBDDMandate").style.display = "block";
    }
    else {
        document.getElementById("BBFibreChecksHead").style.display = "none";
        document.getElementById("BBFibreChecks").style.display = "none";
	    document.getElementById("BBDDMandate").style.display = "none";
    }
  }

function setProductOptionsConsumerChoice(elLst) {
    var strHTML;
    strHTML = '';

    if (document.frmForm.Attr_3138_Rdo[1].checked == true) {
        for (i = 0; i < arrMultiArray4.length; i++) {
            if (arrMultiArray4[i].parentValue == elLst.value) {

                strHTML += '<input type="checkbox" name="Attr_3140_chk" id="chk3140' + arrMultiArray4[i].value + '" value="' + arrMultiArray4[i].value + '" /><label for="chk3140' + arrMultiArray4[i].value + '">' + arrMultiArray4[i].text + '</label><br />';
            }
        }
    }
    else {
        for (i = 0; i < arrMultiArray3.length; i++) {
            if (arrMultiArray3[i].parentValue == elLst.value) {

                strHTML += '<input type="checkbox" name="Attr_3140_chk" id="chk3140' + arrMultiArray3[i].value + '" value="' + arrMultiArray3[i].value + '" /><label for="chk3140' + arrMultiArray3[i].value + '">' + arrMultiArray3[i].text + '</label><br />';
            }
        }
    }


    tdInner_3140.innerHTML = strHTML;

    //hiding some fields for BT Anywhere if selected
    var_MobileCallPlan = "1580";

    if (elLst.value == var_MobileCallPlan) {
        document.getElementById("CBMobileCallPlan").style.display = "block";
        document.getElementById("CBMobileCallPlan2").style.display = "block";
        document.getElementById("CBMobileCallPlan3").style.display = "block";
    } else {
        document.getElementById("CBMobileCallPlan").style.display = "none";
        document.getElementById("CBMobileCallPlan2").style.display = "none";
        document.getElementById("CBMobileCallPlan3").style.display = "none";
    }
}
  
 
//OPTIONS AVAILABLE ARRAY
  
  var arrOptions = new Array(59,1);
 
  arrOptions[0] = '343'									//local=343 ; live=343
  arrOptions[1] = 'No Internet Business Pack'
  arrOptions[2] = '345'									//local=345 ; live=345
  arrOptions[3] = 'Dynamic IP'
  arrOptions[4] = '346'									//local=346 ; live=346
  arrOptions[5] = '1 static IP address'
  arrOptions[6] = '347'									//local=347 ; live=347
  arrOptions[7] = 'Up to 5 static IP addresses'
  arrOptions[8] = '348'									//local=348 ; live=348
  arrOptions[9] = 'Up to 13 static IP addresses'
  arrOptions[10] = '344'								//local=344 ; live=344
  arrOptions[11] = 'Internet Business Pack'
  arrOptions[12] = '349'								//local=349 ; live=349
  arrOptions[13] = 'Internet Security Pack'
  arrOptions[14] = '350'								//local=350 ; live=350
  arrOptions[15] = 'Internet Trader Pack Shop'
  arrOptions[16] = '377'								//local=369 ; live=377
  arrOptions[17] = 'Internet Trader Pack On-Line payment'
  arrOptions[18] = '382'								
  arrOptions[19] = 'Routers'

//Adding new options for new BB products
  arrOptions[20] = '503'								
  arrOptions[21] = 'Plug & Go – Modem option'
  arrOptions[22] = '504'								
  arrOptions[23] = 'Plug & Go – Router option'
  arrOptions[24] = '505'								
  arrOptions[25] = 'Connection only'
  arrOptions[26] = '506'
  arrOptions[27] = 'Engineer install' // 'Engineer install (additional &pound;260)'
  arrOptions[28] = '507'
  arrOptions[29] = 'Router option' //Router option (additional &pound;400)
  arrOptions[30] = '508'								
  arrOptions[31] = 'Activation only'
//end new options

//Adding more new options for BB
  arrOptions[32] = '656'
  arrOptions[33] = 'Plug and Go 2700 Wireless Router (free)' //Plug and Go 2700 Wireless Router - Free
  arrOptions[34] = '657'								
  arrOptions[35] = 'Wires Only'
  arrOptions[36] = '658'								
  arrOptions[37] = 'Engineer install'
  arrOptions[38] = '659'								
  arrOptions[39] = 'Router Option'
	arrOptions[40] = '660'								
  arrOptions[41] = '1 static IP address'
  arrOptions[42] = '661'								
  arrOptions[43] = 'Up to 5 static IP addresses'
  arrOptions[44] = '662'								
  arrOptions[45] = 'Up to 13 static IP addresses'
	arrOptions[46] = '726'								
  arrOptions[47] = 'Single Network'
  arrOptions[48] = '727'
  arrOptions[49] = 'BT Web Hosting (IBP)' //BT Web Hosting (IBP) &pound;5
  arrOptions[50] = '837'
  arrOptions[51] = 'Plug and Go V220 Router (one off charge)' //Plug and Go V220 Router - &pound;49
  arrOptions[52] = '838'
  arrOptions[53] = 'Plug and Go 2700 Wireless Router (one off charge)' //Plug and Go 2700 Wireless Router (&pound;79 one off charge)
  arrOptions[54] = '1134'
  arrOptions[55] = 'BT Advanced Web Hosting' //BT Advanced Web Hosting &pound;15
  arrOptions[56] = '1976'
  arrOptions[57] = 'Advanced Hosting with 4 PC Security Bundle'
  arrOptions[58] = '1977'
  arrOptions[59] = 'Hosting with 3 PC Security Bundle'
  arrOptions[60] = '1978'
  arrOptions[61] = 'Online Starter Kit (OSK)'
  arrOptions[62] = '2196'
  arrOptions[63] = 'BT Business Hub (free)'
  arrOptions[64] = '2197'
  arrOptions[65] = 'BT Business Hub (one off charge)'



    
//end of more new options

//END OPTIONS ARRAY 
 
//Single 500
//  arrMultiArray[0] = new setMultiArray('330', arrOptions[4],arrOptions[5]);
//  arrMultiArray[1] = new setMultiArray('330', arrOptions[10],arrOptions[11]);
//  arrMultiArray[2] = new setMultiArray('330', arrOptions[12],arrOptions[13]);
//  arrMultiArray[3] = new setMultiArray('330', arrOptions[14],arrOptions[15]);
//  arrMultiArray[4] = new setMultiArray('330', arrOptions[8,0],arrOptions[8,1]);

 
  arrMultiArray[0] = new setMultiArray('330', arrOptions[4],arrOptions[5]);
  arrMultiArray[1] = new setMultiArray('330', arrOptions[10],arrOptions[11]);
  arrMultiArray[2] = new setMultiArray('330', arrOptions[12],arrOptions[13]);
  arrMultiArray[3] = new setMultiArray('330', arrOptions[14],arrOptions[15]);
  arrMultiArray[4] = new setMultiArray('330', arrOptions[8,0],arrOptions[8,1]);
  arrMultiArray[5] = new setMultiArray('330', arrOptions[54],arrOptions[55])

  arrMultiArray[6] = new setMultiArray('331', arrOptions[4],arrOptions[5]);
  arrMultiArray[7] = new setMultiArray('331', arrOptions[10],arrOptions[11]);
  arrMultiArray[8] = new setMultiArray('331', arrOptions[12],arrOptions[13]);
  arrMultiArray[9] = new setMultiArray('331', arrOptions[14],arrOptions[15]);
  arrMultiArray[10] = new setMultiArray('331', arrOptions[8,0],arrOptions[8,1]);
  arrMultiArray[11] = new setMultiArray('331', arrOptions[54],arrOptions[55]);

//Share 500
  arrMultiArray[12] = new setMultiArray('332', arrOptions[4],arrOptions[5]);
  arrMultiArray[13] = new setMultiArray('332', arrOptions[10],arrOptions[11]);
  arrMultiArray[14] = new setMultiArray('332', arrOptions[12],arrOptions[13]);
  arrMultiArray[15] = new setMultiArray('332', arrOptions[14],arrOptions[15]);
  arrMultiArray[16] = new setMultiArray('332', arrOptions[8,0],arrOptions[8,1]);
  arrMultiArray[17] = new setMultiArray('332', arrOptions[54],arrOptions[55]);
  
  arrMultiArray[18] = new setMultiArray('333', arrOptions[4],arrOptions[5]);
  arrMultiArray[19] = new setMultiArray('333', arrOptions[10],arrOptions[11]);
  arrMultiArray[20] = new setMultiArray('333', arrOptions[12],arrOptions[13]);
  arrMultiArray[21] = new setMultiArray('333', arrOptions[14],arrOptions[15]);
  arrMultiArray[22] = new setMultiArray('333', arrOptions[8,0],arrOptions[8,1]);
  arrMultiArray[23] = new setMultiArray('333', arrOptions[54],arrOptions[55]);

//Single 1000
  arrMultiArray[24] = new setMultiArray('334', arrOptions[4],arrOptions[5]);
  arrMultiArray[25] = new setMultiArray('334', arrOptions[10],arrOptions[11]);
  arrMultiArray[26] = new setMultiArray('334', arrOptions[12],arrOptions[13]);
  arrMultiArray[27] = new setMultiArray('334', arrOptions[14],arrOptions[15]);
  arrMultiArray[28] = new setMultiArray('334', arrOptions[8,0],arrOptions[8,1]);
  arrMultiArray[29] = new setMultiArray('334', arrOptions[54],arrOptions[55]);
  
  arrMultiArray[30] = new setMultiArray('335', arrOptions[4],arrOptions[5]);
  arrMultiArray[31] = new setMultiArray('335', arrOptions[10],arrOptions[11]);
  arrMultiArray[32] = new setMultiArray('335', arrOptions[12],arrOptions[13]);
  arrMultiArray[33] = new setMultiArray('335', arrOptions[14],arrOptions[15]);
  arrMultiArray[34] = new setMultiArray('335', arrOptions[8,0],arrOptions[8,1]);
  arrMultiArray[35] = new setMultiArray('335', arrOptions[54],arrOptions[55]);

//Network 500
  arrMultiArray[36] = new setMultiArray('336', arrOptions[6],arrOptions[7]);
  arrMultiArray[37] = new setMultiArray('336', arrOptions[8],arrOptions[9]);
  arrMultiArray[38] = new setMultiArray('336', arrOptions[10],arrOptions[11]);
  arrMultiArray[39] = new setMultiArray('336', arrOptions[12],arrOptions[13]);
  arrMultiArray[40] = new setMultiArray('336', arrOptions[14],arrOptions[15]);
  arrMultiArray[41] = new setMultiArray('336', arrOptions[8,0],arrOptions[8,1]);
  arrMultiArray[42] = new setMultiArray('336', arrOptions[54],arrOptions[55]);
  
  arrMultiArray[43] = new setMultiArray('339', arrOptions[6],arrOptions[7]);
  arrMultiArray[44] = new setMultiArray('339', arrOptions[8],arrOptions[9]);
  arrMultiArray[45] = new setMultiArray('339', arrOptions[10],arrOptions[11]);
  arrMultiArray[46] = new setMultiArray('339', arrOptions[12],arrOptions[13]);
  arrMultiArray[47] = new setMultiArray('339', arrOptions[14],arrOptions[15]);
  arrMultiArray[48] = new setMultiArray('339', arrOptions[8,0],arrOptions[8,1]);
  arrMultiArray[49] = new setMultiArray('339', arrOptions[54],arrOptions[55]);
  
  arrMultiArray[50] = new setMultiArray('342', arrOptions[6],arrOptions[7]);
  arrMultiArray[51] = new setMultiArray('342', arrOptions[8],arrOptions[9]);
  arrMultiArray[52] = new setMultiArray('342', arrOptions[10],arrOptions[11]);
  arrMultiArray[53] = new setMultiArray('342', arrOptions[12],arrOptions[13]);
  arrMultiArray[54] = new setMultiArray('342', arrOptions[14],arrOptions[15]);
  arrMultiArray[55] = new setMultiArray('342', arrOptions[8,0],arrOptions[8,1]);
  arrMultiArray[56] = new setMultiArray('342', arrOptions[54],arrOptions[55]);

//Network 1000
  arrMultiArray[57] = new setMultiArray('337', arrOptions[6],arrOptions[7]);
  arrMultiArray[58] = new setMultiArray('337', arrOptions[8],arrOptions[9]);
  arrMultiArray[59] = new setMultiArray('337', arrOptions[10],arrOptions[11]);
  arrMultiArray[60] = new setMultiArray('337', arrOptions[12],arrOptions[13]);
  arrMultiArray[61] = new setMultiArray('337', arrOptions[14],arrOptions[15]);
  arrMultiArray[62] = new setMultiArray('337', arrOptions[8,0],arrOptions[8,1]);
  arrMultiArray[63] = new setMultiArray('337', arrOptions[54],arrOptions[55]);
  
  arrMultiArray[64] = new setMultiArray('340', arrOptions[6],arrOptions[7]);
  arrMultiArray[65] = new setMultiArray('340', arrOptions[8],arrOptions[9]);
  arrMultiArray[66] = new setMultiArray('340', arrOptions[10],arrOptions[11]);
  arrMultiArray[67] = new setMultiArray('340', arrOptions[12],arrOptions[13]);
  arrMultiArray[68] = new setMultiArray('340', arrOptions[14],arrOptions[15]);
  arrMultiArray[69] = new setMultiArray('340', arrOptions[8,0],arrOptions[8,1]);
  arrMultiArray[70] = new setMultiArray('340', arrOptions[54],arrOptions[55]);
  
  arrMultiArray[71] = new setMultiArray('360', arrOptions[6],arrOptions[7]);
  arrMultiArray[72] = new setMultiArray('360', arrOptions[8],arrOptions[9]);
  arrMultiArray[73] = new setMultiArray('360', arrOptions[10],arrOptions[11]);
  arrMultiArray[74] = new setMultiArray('360', arrOptions[12],arrOptions[13]);
  arrMultiArray[75] = new setMultiArray('360', arrOptions[14],arrOptions[15]);
  arrMultiArray[76] = new setMultiArray('360', arrOptions[8,0],arrOptions[8,1]);
  arrMultiArray[77] = new setMultiArray('360', arrOptions[54],arrOptions[55]);


//Network 2000
  arrMultiArray[78] = new setMultiArray('338', arrOptions[6],arrOptions[7]);
  arrMultiArray[79] = new setMultiArray('338', arrOptions[8],arrOptions[9]);
  arrMultiArray[80] = new setMultiArray('338', arrOptions[10],arrOptions[11]);
  arrMultiArray[81] = new setMultiArray('338', arrOptions[12],arrOptions[13]);
  arrMultiArray[82] = new setMultiArray('338', arrOptions[14],arrOptions[15]);
  arrMultiArray[83] = new setMultiArray('338', arrOptions[8,0],arrOptions[8,1]);
  arrMultiArray[84] = new setMultiArray('338', arrOptions[54],arrOptions[55]);

  arrMultiArray[85] = new setMultiArray('341', arrOptions[6],arrOptions[7]);
  arrMultiArray[86] = new setMultiArray('341', arrOptions[8],arrOptions[9]);
  arrMultiArray[87] = new setMultiArray('341', arrOptions[10],arrOptions[11]);
  arrMultiArray[88] = new setMultiArray('341', arrOptions[12],arrOptions[13]);
  arrMultiArray[89] = new setMultiArray('341', arrOptions[14],arrOptions[15]);
  arrMultiArray[90] = new setMultiArray('341', arrOptions[8,0],arrOptions[8,1]);
  arrMultiArray[91] = new setMultiArray('341', arrOptions[54],arrOptions[55]);

  arrMultiArray[92] = new setMultiArray('371', arrOptions[6],arrOptions[7]);
  arrMultiArray[93] = new setMultiArray('371', arrOptions[8],arrOptions[9]);
  arrMultiArray[94] = new setMultiArray('371', arrOptions[10],arrOptions[11]);
  arrMultiArray[95] = new setMultiArray('371', arrOptions[12],arrOptions[13]);
  arrMultiArray[96] = new setMultiArray('371', arrOptions[14],arrOptions[15]);
  arrMultiArray[97] = new setMultiArray('371', arrOptions[8,0],arrOptions[8,1]);
  arrMultiArray[98] = new setMultiArray('371', arrOptions[54],arrOptions[55]);
   
  
//All Advanced Products   
  arrMultiArray[99] = new setMultiArray('342', arrOptions[18],arrOptions[19]);
  arrMultiArray[100] = new setMultiArray('360', arrOptions[18],arrOptions[19]);
  arrMultiArray[101] = new setMultiArray('371', arrOptions[18],arrOptions[19]);
 
//'385	BT Business Symmetric Broadband
  arrMultiArray[102] = new setMultiArray('385', arrOptions[6],arrOptions[7]);
  arrMultiArray[103] = new setMultiArray('385', arrOptions[54],arrOptions[55]);

//adding new Busines Broadband products  

//Business Broadband Single 2Mb - 496
	arrMultiArray[104] = new setMultiArray('496', arrOptions[20],arrOptions[21]);
	arrMultiArray[105] = new setMultiArray('496', arrOptions[30],arrOptions[31]);
	
	arrMultiArray[106] = new setMultiArray('496', arrOptions[4],arrOptions[5]);
	arrMultiArray[107] = new setMultiArray('496', arrOptions[10],arrOptions[11]);
	arrMultiArray[108] = new setMultiArray('496', arrOptions[12],arrOptions[13]);
	arrMultiArray[109] = new setMultiArray('496', arrOptions[54],arrOptions[55]);
	
	
//Business Broadband Share 2Mb - 497
	arrMultiArray[110] = new setMultiArray('497', arrOptions[22],arrOptions[23]);
	arrMultiArray[111] = new setMultiArray('497', arrOptions[30],arrOptions[31]);
	
	arrMultiArray[112] = new setMultiArray('497', arrOptions[4],arrOptions[5]);
	arrMultiArray[113] = new setMultiArray('497', arrOptions[10],arrOptions[11]);
	arrMultiArray[114] = new setMultiArray('497', arrOptions[12],arrOptions[13]);
	arrMultiArray[115] = new setMultiArray('497', arrOptions[54],arrOptions[55]);
	
//Business Broadband Network 1Mb - 498
	arrMultiArray[116] = new setMultiArray('498', arrOptions[22],arrOptions[23]);
	arrMultiArray[117] = new setMultiArray('498', arrOptions[30],arrOptions[31]);
	arrMultiArray[118] = new setMultiArray('498', arrOptions[26],arrOptions[27]);
	
	arrMultiArray[119] = new setMultiArray('498', arrOptions[6],arrOptions[7]);
	arrMultiArray[120] = new setMultiArray('498', arrOptions[8],arrOptions[9]);
	arrMultiArray[121] = new setMultiArray('498', arrOptions[10],arrOptions[11]);
	arrMultiArray[122] = new setMultiArray('498', arrOptions[12],arrOptions[13]);
	arrMultiArray[123] = new setMultiArray('498', arrOptions[54],arrOptions[55]);
	
	
//Business Broadband Network 2Mb - 499
	arrMultiArray[124] = new setMultiArray('499', arrOptions[22],arrOptions[23]);
	arrMultiArray[125] = new setMultiArray('499', arrOptions[30],arrOptions[31]);
	arrMultiArray[126] = new setMultiArray('499', arrOptions[26],arrOptions[27]);

	arrMultiArray[127] = new setMultiArray('499', arrOptions[6],arrOptions[7]);
	arrMultiArray[128] = new setMultiArray('499', arrOptions[8],arrOptions[9]);
	arrMultiArray[129] = new setMultiArray('499', arrOptions[10],arrOptions[11]);
	arrMultiArray[130] = new setMultiArray('499', arrOptions[12],arrOptions[13]);
	arrMultiArray[131] = new setMultiArray('499', arrOptions[54],arrOptions[55]);
	
//Business Broadband Advanced 512k - 500
	arrMultiArray[132] = new setMultiArray('500', arrOptions[30],arrOptions[31]);
	arrMultiArray[133] = new setMultiArray('500', arrOptions[28],arrOptions[29]);
	
	arrMultiArray[134] = new setMultiArray('500', arrOptions[6],arrOptions[7]);
	arrMultiArray[135] = new setMultiArray('500', arrOptions[8],arrOptions[9]);
	arrMultiArray[136] = new setMultiArray('500', arrOptions[54],arrOptions[55]);
	
//Business Broadband Advanced 1Mb - 501
	arrMultiArray[137] = new setMultiArray('501', arrOptions[24],arrOptions[25]);
	arrMultiArray[138] = new setMultiArray('501', arrOptions[28],arrOptions[29]);
	
	arrMultiArray[139] = new setMultiArray('501', arrOptions[6],arrOptions[7]);
	arrMultiArray[140] = new setMultiArray('501', arrOptions[8],arrOptions[9]);
	arrMultiArray[141] = new setMultiArray('501', arrOptions[54],arrOptions[55]);
	
//Business Broadband Advanced 2Mb - 502
	arrMultiArray[142] = new setMultiArray('502', arrOptions[24],arrOptions[25]);
	arrMultiArray[143] = new setMultiArray('502', arrOptions[28],arrOptions[29]);
	
	arrMultiArray[144] = new setMultiArray('502', arrOptions[6],arrOptions[7]);
	arrMultiArray[145] = new setMultiArray('502', arrOptions[8],arrOptions[9]);
	arrMultiArray[146] = new setMultiArray('502', arrOptions[54],arrOptions[55]);
	
//Business Broadband Lite - 529
	arrMultiArray[147] = new setMultiArray('529', arrOptions[20],arrOptions[21]);
	arrMultiArray[148] = new setMultiArray('529', arrOptions[30],arrOptions[31]);
	
	arrMultiArray[149] = new setMultiArray('529', arrOptions[4],arrOptions[5]);
	arrMultiArray[150] = new setMultiArray('529', arrOptions[10],arrOptions[11]);
	arrMultiArray[151] = new setMultiArray('529', arrOptions[12],arrOptions[13]);

  
////end of more new options

	var arrMultiArrayIndex = 151; //get last one - then just increment each time its added..


//Business Broadband Lite		-	648
//////////	arrMultiArray[152] = new setMultiArray('648', arrOptions[50],arrOptions[51]);
//////////	arrMultiArray[153] = new setMultiArray('648', arrOptions[52],arrOptions[53]);
//////////	arrMultiArray[154] = new setMultiArray('648', arrOptions[34],arrOptions[35]);
//////////	arrMultiArray[155] = new setMultiArray('648', arrOptions[40],arrOptions[41]);
////////////arrMultiArray[132] = new setMultiArray('648', arrOptions[46],arrOptions[47]);
//////////	arrMultiArray[156] = new setMultiArray('648', arrOptions[12],arrOptions[13]);
//////////	arrMultiArray[157] = new setMultiArray('648', arrOptions[48],arrOptions[49]);
//////////	
////////////Business Broadband Single		-	649
//////////	arrMultiArray[158] = new setMultiArray('649', arrOptions[32],arrOptions[33]);
//////////	arrMultiArray[159] = new setMultiArray('649', arrOptions[34],arrOptions[35]);
//////////	arrMultiArray[160] = new setMultiArray('649', arrOptions[36],arrOptions[37]);
//////////	arrMultiArray[161] = new setMultiArray('649', arrOptions[40],arrOptions[41]);
////////////arrMultiArray[139] = new setMultiArray('649', arrOptions[46],arrOptions[47]);
//////////	arrMultiArray[162] = new setMultiArray('649', arrOptions[12],arrOptions[13]);
//////////	arrMultiArray[163] = new setMultiArray('649', arrOptions[48],arrOptions[49]);
	
//Business Broadband Share		-	650
////////	arrMultiArray[164] = new setMultiArray('650', arrOptions[32],arrOptions[33]);
////////	arrMultiArray[165] = new setMultiArray('650', arrOptions[34],arrOptions[35]);
////////	arrMultiArray[166] = new setMultiArray('650', arrOptions[36],arrOptions[37]);
////////	arrMultiArray[167] = new setMultiArray('650', arrOptions[40],arrOptions[41]);
//////////arrMultiArray[145] = new setMultiArray('650', arrOptions[46],arrOptions[47]);
////////	arrMultiArray[168] = new setMultiArray('650', arrOptions[12],arrOptions[13]);
////////	arrMultiArray[169] = new setMultiArray('650', arrOptions[48],arrOptions[49]);
////////	arrMultiArray[170] = new setMultiArray('650', arrOptions[54],arrOptions[55]);
	
//Business Broadband Network		-	651
    arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('651', arrOptions[32], arrOptions[33]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('651', arrOptions[34], arrOptions[35]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('651', arrOptions[36], arrOptions[37]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('651', arrOptions[40], arrOptions[41]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('651', arrOptions[42], arrOptions[43]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('651', arrOptions[44], arrOptions[45]);	
	
//	arrMultiArray[171] = new setMultiArray('651', arrOptions[32],arrOptions[33]);
//	arrMultiArray[172] = new setMultiArray('651', arrOptions[34],arrOptions[35]);
//	arrMultiArray[173] = new setMultiArray('651', arrOptions[36],arrOptions[37]);
//	arrMultiArray[174] = new setMultiArray('651', arrOptions[42],arrOptions[43]);
//	arrMultiArray[175] = new setMultiArray('651', arrOptions[44],arrOptions[45]);
//    //arrMultiArray[154] = new setMultiArray('651', arrOptions[46],arrOptions[47]);
//	arrMultiArray[176] = new setMultiArray('651', arrOptions[12],arrOptions[13]);
//	arrMultiArray[177] = new setMultiArray('651', arrOptions[48],arrOptions[49]);
//	arrMultiArray[178] = new setMultiArray('651', arrOptions[54],arrOptions[55]);
	
//Business Broadband Network Premium		-	652
    arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('652', arrOptions[32], arrOptions[33]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('652', arrOptions[34], arrOptions[35]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('652', arrOptions[36], arrOptions[37]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('652', arrOptions[40], arrOptions[41]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('652', arrOptions[42], arrOptions[43]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('652', arrOptions[44], arrOptions[45]);	
	
//	arrMultiArray[179] = new setMultiArray('652', arrOptions[32],arrOptions[33]);
//	arrMultiArray[180] = new setMultiArray('652', arrOptions[34],arrOptions[35]);
//	arrMultiArray[181] = new setMultiArray('652', arrOptions[36],arrOptions[37]);
//	arrMultiArray[182] = new setMultiArray('652', arrOptions[42],arrOptions[43]);
//	arrMultiArray[183] = new setMultiArray('652', arrOptions[44],arrOptions[45]);
////arrMultiArray[162] = new setMultiArray('652', arrOptions[46],arrOptions[47]);
//	arrMultiArray[184] = new setMultiArray('652', arrOptions[12],arrOptions[13]);
//	arrMultiArray[185] = new setMultiArray('652', arrOptions[48],arrOptions[49]);
//	arrMultiArray[186] = new setMultiArray('652', arrOptions[54],arrOptions[55]);
	
//Business Broadband Advance 512K		-	653
//////	arrMultiArray[187] = new setMultiArray('653', arrOptions[38],arrOptions[39]);
//////    	arrMultiArray[188] = new setMultiArray('653', arrOptions[40],arrOptions[41]);
//////	arrMultiArray[189] = new setMultiArray('653', arrOptions[42],arrOptions[43]);
//////	arrMultiArray[190] = new setMultiArray('653', arrOptions[44],arrOptions[45]);
//////	arrMultiArray[191] = new setMultiArray('653', arrOptions[48],arrOptions[49]);
//////	arrMultiArray[192] = new setMultiArray('653', arrOptions[12],arrOptions[13]);
//////	arrMultiArray[193] = new setMultiArray('653', arrOptions[54],arrOptions[55]);
	
//Business Broadband Advance 1MB		-	654
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('654', arrOptions[38],arrOptions[39]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('654', arrOptions[34], arrOptions[35]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('654', arrOptions[36], arrOptions[37]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('654', arrOptions[40], arrOptions[41]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('654', arrOptions[42], arrOptions[43]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('654', arrOptions[44], arrOptions[45]);
//	
//    	arrMultiArray[195] = new setMultiArray('654', arrOptions[40],arrOptions[41]);
//	arrMultiArray[196] = new setMultiArray('654', arrOptions[42],arrOptions[43]);
//	arrMultiArray[197] = new setMultiArray('654', arrOptions[44],arrOptions[45]);
//	arrMultiArray[198] = new setMultiArray('654', arrOptions[48],arrOptions[49]);
//	arrMultiArray[199] = new setMultiArray('654', arrOptions[12],arrOptions[13]);
//	arrMultiArray[200] = new setMultiArray('654', arrOptions[54],arrOptions[55]);
//	
//Business Broadband Advance 2MB		-	655
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('655', arrOptions[38],arrOptions[39]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('655', arrOptions[34], arrOptions[35]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('655', arrOptions[36], arrOptions[37]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('655', arrOptions[40], arrOptions[41]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('655', arrOptions[42], arrOptions[43]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('655', arrOptions[44], arrOptions[45]);
//	
//    	arrMultiArray[202] = new setMultiArray('655', arrOptions[40],arrOptions[41]);
//	arrMultiArray[203] = new setMultiArray('655', arrOptions[42],arrOptions[43]);
//	arrMultiArray[204] = new setMultiArray('655', arrOptions[44],arrOptions[45]);
//	arrMultiArray[205] = new setMultiArray('655', arrOptions[48],arrOptions[49]);
//	arrMultiArray[206] = new setMultiArray('655', arrOptions[12],arrOptions[13]);
//	arrMultiArray[207] = new setMultiArray('655', arrOptions[54],arrOptions[55]);

//Business Broadband Option 1           	-   	1033
    arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('1033', arrOptions[50],arrOptions[51]);
    arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('1033', arrOptions[34], arrOptions[35]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('1033', arrOptions[36], arrOptions[37]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('1033', arrOptions[40], arrOptions[41]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('1033', arrOptions[42], arrOptions[43]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('1033', arrOptions[44], arrOptions[45]);
	
//	arrMultiArray[209] = new setMultiArray('1033', arrOptions[52],arrOptions[53]);
//	arrMultiArray[210] = new setMultiArray('1033', arrOptions[34],arrOptions[35]);
//	arrMultiArray[211] = new setMultiArray('1033', arrOptions[40],arrOptions[41]);
//	arrMultiArray[212] = new setMultiArray('1033', arrOptions[12],arrOptions[13]);
//	arrMultiArray[213] = new setMultiArray('1033', arrOptions[48],arrOptions[49]);
//	arrMultiArray[214] = new setMultiArray('1033', arrOptions[56],arrOptions[57]);
//	arrMultiArray[215] = new setMultiArray('1033', arrOptions[58],arrOptions[59]);
//	arrMultiArray[216] = new setMultiArray('1033', arrOptions[60],arrOptions[61]);
//	arrMultiArray[217] = new setMultiArray('1033', arrOptions[54],arrOptions[55]);
	
//Business Broadband Option 2          		 -   	1034
    arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('1034', arrOptions[32], arrOptions[33]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('1034', arrOptions[34], arrOptions[35]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('1034', arrOptions[36], arrOptions[37]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('1034', arrOptions[40], arrOptions[41]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('1034', arrOptions[42], arrOptions[43]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('1034', arrOptions[44], arrOptions[45]);	
	
//    	arrMultiArray[218] = new setMultiArray('1034', arrOptions[32],arrOptions[33]);
//	arrMultiArray[219] = new setMultiArray('1034', arrOptions[34],arrOptions[35]);
//	arrMultiArray[220] = new setMultiArray('1034', arrOptions[36],arrOptions[37]);
//	arrMultiArray[221] = new setMultiArray('1034', arrOptions[40],arrOptions[41]);
//	arrMultiArray[222] = new setMultiArray('1034', arrOptions[12],arrOptions[13]);
//	arrMultiArray[223] = new setMultiArray('1034', arrOptions[48],arrOptions[49]);
//	arrMultiArray[224] = new setMultiArray('1034', arrOptions[56], arrOptions[57]);
//	arrMultiArray[225] = new setMultiArray('1034', arrOptions[58], arrOptions[59]);
//	arrMultiArray[226] = new setMultiArray('1034', arrOptions[60], arrOptions[61]);
//	arrMultiArray[227] = new setMultiArray('1034', arrOptions[54],arrOptions[55]);
//	arrMultiArray[228] = new setMultiArray('1034', arrOptions[42], arrOptions[43]);
	
//Business Broadband Option 3           	-   	1035
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('1035', arrOptions[32], arrOptions[33]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('1035', arrOptions[34], arrOptions[35]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('1035', arrOptions[36], arrOptions[37]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('1035', arrOptions[40], arrOptions[41]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('1035', arrOptions[42], arrOptions[43]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('1035', arrOptions[44], arrOptions[45]);	
    	
//	arrMultiArray[230] = new setMultiArray('1035', arrOptions[34],arrOptions[35]);
//	arrMultiArray[231] = new setMultiArray('1035', arrOptions[36],arrOptions[37]);
//	arrMultiArray[232] = new setMultiArray('1035', arrOptions[40],arrOptions[41]);
//	arrMultiArray[233] = new setMultiArray('1035', arrOptions[12],arrOptions[13]);
//	arrMultiArray[234] = new setMultiArray('1035', arrOptions[48],arrOptions[49]);
//	arrMultiArray[235] = new setMultiArray('1035', arrOptions[56], arrOptions[57]);
//	arrMultiArray[236] = new setMultiArray('1035', arrOptions[58], arrOptions[59]);
//	arrMultiArray[237] = new setMultiArray('1035', arrOptions[60], arrOptions[61]);
//	arrMultiArray[238] = new setMultiArray('1035', arrOptions[54],arrOptions[55]);
//	arrMultiArray[239] = new setMultiArray('1035', arrOptions[42], arrOptions[43]);

//Business Broadband Fibre           	-   	2062
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2062', arrOptions[32], arrOptions[33]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2062', arrOptions[34], arrOptions[35]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2062', arrOptions[36], arrOptions[37]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2062', arrOptions[40], arrOptions[41]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2062', arrOptions[42], arrOptions[43]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2062', arrOptions[44], arrOptions[45]);
//	
//	arrMultiArray[241] = new setMultiArray('2062', arrOptions[34], arrOptions[35]);
//	arrMultiArray[242] = new setMultiArray('2062', arrOptions[36], arrOptions[37]);
//	arrMultiArray[243] = new setMultiArray('2062', arrOptions[40], arrOptions[41]);
//	arrMultiArray[244] = new setMultiArray('2062', arrOptions[12], arrOptions[13]);
//	arrMultiArray[245] = new setMultiArray('2062', arrOptions[48], arrOptions[49]);
//	arrMultiArray[246] = new setMultiArray('2062', arrOptions[56], arrOptions[57]);
//	arrMultiArray[247] = new setMultiArray('2062', arrOptions[58], arrOptions[59]);
//	arrMultiArray[248] = new setMultiArray('2062', arrOptions[60], arrOptions[61]);
//	arrMultiArray[249] = new setMultiArray('2062', arrOptions[54], arrOptions[55]);
//	arrMultiArray[250] = new setMultiArray('2062', arrOptions[42], arrOptions[43]);

//Business Broadband Fibre           	-   	2063
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2063', arrOptions[32], arrOptions[33]);

	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2063', arrOptions[34], arrOptions[35]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2063', arrOptions[36], arrOptions[37]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2063', arrOptions[40], arrOptions[41]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2063', arrOptions[42], arrOptions[43]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2063', arrOptions[44], arrOptions[45]);
	
//	arrMultiArray[252] = new setMultiArray('2063', arrOptions[34], arrOptions[35]);
//	arrMultiArray[253] = new setMultiArray('2063', arrOptions[36], arrOptions[37]);
//	arrMultiArray[254] = new setMultiArray('2063', arrOptions[40], arrOptions[41]);
//	arrMultiArray[255] = new setMultiArray('2063', arrOptions[12], arrOptions[13]);
//	arrMultiArray[256] = new setMultiArray('2063', arrOptions[48], arrOptions[49]);
//	arrMultiArray[257] = new setMultiArray('2063', arrOptions[56], arrOptions[57]);
//	arrMultiArray[258] = new setMultiArray('2063', arrOptions[58], arrOptions[59]);
//	arrMultiArray[259] = new setMultiArray('2063', arrOptions[60], arrOptions[61]);
//	arrMultiArray[260] = new setMultiArray('2063', arrOptions[54], arrOptions[55]);
//	arrMultiArray[261] = new setMultiArray('2063', arrOptions[42], arrOptions[43]);

	//BT Business Total Broadband - Office == 2192
	// 2196[62,63] (Hub free) || 2197[64,65] (Hub charge),
	// common 657[34,35], 658[36,37], 660[40,41], 661[42,43], 662[44,45]
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2192', arrOptions[64], arrOptions[65]);	
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2192', arrOptions[34], arrOptions[35]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2192', arrOptions[36], arrOptions[37]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2192', arrOptions[40], arrOptions[41]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2192', arrOptions[42], arrOptions[43]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2192', arrOptions[44], arrOptions[45]);

	//BT Business Total Broadband - Office Unlimited == 2193
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2193', arrOptions[64], arrOptions[65]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2193', arrOptions[34], arrOptions[35]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2193', arrOptions[36], arrOptions[37]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2193', arrOptions[40], arrOptions[41]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2193', arrOptions[42], arrOptions[43]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2193', arrOptions[44], arrOptions[45]);

	//BT Business Total Broadband - Advance == 2194
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2194', arrOptions[62], arrOptions[63]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2194', arrOptions[34], arrOptions[35]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2194', arrOptions[36], arrOptions[37]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2194', arrOptions[40], arrOptions[41]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2194', arrOptions[42], arrOptions[43]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2194', arrOptions[44], arrOptions[45]);


	//BT Business Total Broadband - Advance Support ==  2195
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2195', arrOptions[62], arrOptions[63]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2195', arrOptions[34], arrOptions[35]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2195', arrOptions[36], arrOptions[37]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2195', arrOptions[40], arrOptions[41]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2195', arrOptions[42], arrOptions[43]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2195', arrOptions[44], arrOptions[45]);

	//Business Total Broadband - Advance Support (Fibre) ==  2277
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2277', arrOptions[62], arrOptions[63]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2277', arrOptions[34], arrOptions[35]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2277', arrOptions[36], arrOptions[37]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2277', arrOptions[40], arrOptions[41]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2277', arrOptions[42], arrOptions[43]);
	arrMultiArray[arrMultiArrayIndex++] = new setMultiArray('2277', arrOptions[44], arrOptions[45]);
	
	
	
//Single 1000 for Liverpool products only 
  arrMultiArray2[0] = new setMultiArray('386', arrOptions[4],arrOptions[5]);
  

//Yahoo Broadband Productgs and Options
  var arrOptions2 = new Array();
 /*
  arrOptions2[0] = '517'									//local=343 ; live=343
  arrOptions2[1] = 'Activation only'
  arrOptions2[2] = '518'									//local=345 ; live=345
  arrOptions2[3] = 'Plug & Go'
  arrOptions2[4] = '519'									//local=346 ; live=346
  arrOptions2[5] = 'Wireless Hub Router (additional &pound;80)'

//669	No equipment
//670	Router
//671	Wireless router
//672	Wireless router additional &pound;25
//	arrOptions2[6] = '669'
//  arrOptions2[7] = 'No equipment'
  arrOptions2[6] = '670'
  arrOptions2[7] = 'White Wireless BT Home Hub 1.5 (free)'
  arrOptions2[8] = '671'
  arrOptions2[9] = 'Hub Wireless Router (Free)'
  arrOptions2[10] = '672'
  arrOptions2[11] = 'Wireless router additional &pound;30'
  arrOptions2[12] = '851'
  arrOptions2[13] = 'Hub Phone (Free)'
  arrOptions2[14] = '852'
  arrOptions2[15] = 'BT Hub Phone 2.1 (&pound;39.99)'
  //arrOptions2[16] = '669'
  //arrOptions2[17] = 'No equipment'
  arrOptions2[16] = '896'
  arrOptions2[17] = 'Wireless Router (&pound;25)'
  arrOptions2[18] = '897'
  arrOptions2[19] = 'Black Wireless BT Home Hub 2.0 Black (&pound;25.00)'
 */

      arrOptions2[0] = '1581'
      arrOptions2[1] = 'BT Home Hub (Free)'
      arrOptions2[2] = '1582'
      arrOptions2[3] = 'BT Hub Phone (&pound;39.99)'
      arrOptions2[4] = '1583'
      arrOptions2[5] = 'BT Hub Phone (Free)'
      arrOptions2[6] = '1584'
      arrOptions2[7] = 'BT ToGo Smart mobile phone (Free)'
      arrOptions2[8] = '1688'
      arrOptions2[9] = 'BT Broadband Dongle - &pound;9.99<br>Allowance = 1Gb per month for duration of 18 month contract.'
      arrOptions2[10] = '1689'
      arrOptions2[11] = 'BT Broadband Dongle - &pound;49.99<br>Allowance = 1Gb per month for duration of 18 month contract.'
      arrOptions2[12] = '2086'
      arrOptions2[13] = 'BT Home Hub (&pound;39.99)'
      arrOptions2[14] = '2187'
      arrOptions2[15] = 'BT Infinity Home Hub'
      arrOptions2[16] = '2232'
      arrOptions2[17] = 'BT Vision Box (Free)'
      arrOptions2[18] = '2321'
      arrOptions2[19] = 'TV Unlimited'
      arrOptions2[20] = '2322'
      arrOptions2[21] = 'TV Essentials'
/*
  
//513	BT Broadband Basic 1Mb
  arrMultiArray3[0] = new setMultiArray('513', arrOptions2[2],arrOptions2[3]);

//514	BT Broadband 2Mb 
  arrMultiArray3[1] = new setMultiArray('514', arrOptions2[2],arrOptions2[3]);
  arrMultiArray3[2] = new setMultiArray('514', arrOptions2[0],arrOptions2[1]);
  
//515	BT Yahoo Broadband 2Mb (15gb)
  arrMultiArray3[3] = new setMultiArray('515', arrOptions2[2],arrOptions2[3]);
  arrMultiArray3[4] = new setMultiArray('515', arrOptions2[0],arrOptions2[1]);
  arrMultiArray3[5] = new setMultiArray('515', arrOptions2[4],arrOptions2[5]);
  
//516	BT Yahoo Broadband 2Mb (30gb)
 arrMultiArray3[6] = new setMultiArray('516', arrOptions2[2],arrOptions2[3]);
 arrMultiArray3[7] = new setMultiArray('516', arrOptions2[0],arrOptions2[1]);
 arrMultiArray3[8] = new setMultiArray('516', arrOptions2[4],arrOptions2[5]);

*/
 
//665	Option 1 - No equipment, Router, Wireless router additional &pound;25 
//666	Option 2 - No equipment, Router, Wireless router additional &pound;25
//667	Option 3 - No equipment, Wireless router
//668	Option 4 - No equipment, Wireless router

	arrMultiArray3[0] = new setMultiArray('665', arrOptions2[0], arrOptions2[1]);
  	arrMultiArray3[1] = new setMultiArray('665', arrOptions2[2],arrOptions2[3]);
	arrMultiArray3[2] = new setMultiArray('665', arrOptions2[18], arrOptions2[19]);
	arrMultiArray3[3] = new setMultiArray('665', arrOptions2[20], arrOptions2[21]);

	arrMultiArray3[4] = new setMultiArray('666', arrOptions2[0],arrOptions2[1]);
	arrMultiArray3[5] = new setMultiArray('666', arrOptions2[2],arrOptions2[3]);
	arrMultiArray3[6] = new setMultiArray('666', arrOptions2[18], arrOptions2[19]);
	arrMultiArray3[7] = new setMultiArray('666', arrOptions2[20], arrOptions2[21]);
	
	arrMultiArray3[8] = new setMultiArray('667', arrOptions2[0],arrOptions2[1]);
	arrMultiArray3[9] = new setMultiArray('667', arrOptions2[4], arrOptions2[5]);
	arrMultiArray3[10] = new setMultiArray('667', arrOptions2[18], arrOptions2[19]);
	arrMultiArray3[11] = new setMultiArray('667', arrOptions2[20], arrOptions2[21]);

	arrMultiArray3[12] = new setMultiArray('1580', arrOptions2[0], arrOptions2[1]);
	arrMultiArray3[13] = new setMultiArray('1580', arrOptions2[4], arrOptions2[5]);
	arrMultiArray3[14] = new setMultiArray('1580', arrOptions2[6], arrOptions2[7]);

	arrMultiArray3[15] = new setMultiArray('2077', arrOptions2[2], arrOptions2[3]);
	arrMultiArray3[16] = new setMultiArray('2077', arrOptions2[0], arrOptions2[1]);
	arrMultiArray3[17] = new setMultiArray('2077', arrOptions2[18], arrOptions2[19]);
	arrMultiArray3[18] = new setMultiArray('2077', arrOptions2[20], arrOptions2[21]);

	//'BT Infinity Option 1'
	arrMultiArray3[19] = new setMultiArray('2185', arrOptions2[14], arrOptions2[15]);
	//'BT Infinity Option 2'
	arrMultiArray3[20] = new setMultiArray('2186', arrOptions2[14], arrOptions2[15]);
	//'BT Infinity and Calls 
	arrMultiArray3[21] = new setMultiArray('2222', arrOptions2[14], arrOptions2[15]);
	//'Unlimited BT Infinity and Anytime Calls
	arrMultiArray3[22] = new setMultiArray('2223', arrOptions2[14], arrOptions2[15]);

	//More BB and Calls Infinity
	arrMultiArray3[23] = new setMultiArray('2255', arrOptions2[2], arrOptions2[3]);
	arrMultiArray3[24] = new setMultiArray('2255', arrOptions2[10], arrOptions2[11]);
	arrMultiArray3[25] = new setMultiArray('2255', arrOptions2[14], arrOptions2[15]);
	arrMultiArray3[26] = new setMultiArray('2255', arrOptions2[18], arrOptions2[19]);
	arrMultiArray3[27] = new setMultiArray('2255', arrOptions2[20], arrOptions2[21]);
	
	//Unlimited BB and Calls Infinity
	arrMultiArray3[28] = new setMultiArray('2256', arrOptions2[4], arrOptions2[5]);
	arrMultiArray3[29] = new setMultiArray('2256', arrOptions2[8], arrOptions2[9]);
	arrMultiArray3[30] = new setMultiArray('2256', arrOptions2[14], arrOptions2[15]);
	arrMultiArray3[31] = new setMultiArray('2256', arrOptions2[18], arrOptions2[19]);
	arrMultiArray3[32] = new setMultiArray('2256', arrOptions2[20], arrOptions2[21]);

	//Infinity BB Only
	arrMultiArray3[33] = new setMultiArray('2257', arrOptions2[14], arrOptions2[15]);
	arrMultiArray3[34] = new setMultiArray('2257', arrOptions2[18], arrOptions2[19]);
	arrMultiArray3[35] = new setMultiArray('2257', arrOptions2[20], arrOptions2[21]);

	//TV, BB and Calls Infinity
	arrMultiArray3[36] = new setMultiArray('2258', arrOptions2[14], arrOptions2[15]);

	//More TV, BB and Calls Infinity
	arrMultiArray3[37] = new setMultiArray('2259', arrOptions2[2], arrOptions2[3]);
	arrMultiArray3[38] = new setMultiArray('2259', arrOptions2[14], arrOptions2[15]);

	//Unlimited TV, BB and Calls Infinity
	arrMultiArray3[39] = new setMultiArray('2260', arrOptions2[14], arrOptions2[15]);
	

	arrMultiArray4[0] = new setMultiArray('665', arrOptions2[0], arrOptions2[1]);
	arrMultiArray4[1] = new setMultiArray('665', arrOptions2[2], arrOptions2[3]);
	arrMultiArray4[2] = new setMultiArray('665', arrOptions2[10], arrOptions2[11]);
	arrMultiArray4[3] = new setMultiArray('665', arrOptions2[18], arrOptions2[19]);
	arrMultiArray4[4] = new setMultiArray('665', arrOptions2[20], arrOptions2[21]);

	arrMultiArray4[5] = new setMultiArray('666', arrOptions2[0], arrOptions2[1]);
	arrMultiArray4[6] = new setMultiArray('666', arrOptions2[2], arrOptions2[3]);
	arrMultiArray4[7] = new setMultiArray('666', arrOptions2[10], arrOptions2[11]);
	arrMultiArray4[8] = new setMultiArray('666', arrOptions2[18], arrOptions2[19]);
	arrMultiArray4[9] = new setMultiArray('666', arrOptions2[20], arrOptions2[21]);

	arrMultiArray4[10] = new setMultiArray('667', arrOptions2[0], arrOptions2[1]);
	arrMultiArray4[11] = new setMultiArray('667', arrOptions2[4], arrOptions2[5]);
	arrMultiArray4[12] = new setMultiArray('667', arrOptions2[8], arrOptions2[9]);
	arrMultiArray4[13] = new setMultiArray('667', arrOptions2[18], arrOptions2[19]);
	arrMultiArray4[14] = new setMultiArray('667', arrOptions2[20], arrOptions2[21]);

	arrMultiArray4[15] = new setMultiArray('1580', arrOptions2[0], arrOptions2[1]);
	arrMultiArray4[16] = new setMultiArray('1580', arrOptions2[4], arrOptions2[5]);
	arrMultiArray4[17] = new setMultiArray('1580', arrOptions2[6], arrOptions2[7]);

	arrMultiArray4[18] = new setMultiArray('2077', arrOptions2[2], arrOptions2[3]);
	arrMultiArray4[19] = new setMultiArray('2077', arrOptions2[8], arrOptions2[9]);
	arrMultiArray4[20] = new setMultiArray('2077', arrOptions2[0], arrOptions2[1]);
	arrMultiArray4[21] = new setMultiArray('2077', arrOptions2[18], arrOptions2[19]);
	arrMultiArray4[22] = new setMultiArray('2077', arrOptions2[20], arrOptions2[21]);
	
	//'BT Infinity Option 1'
	arrMultiArray4[23] = new setMultiArray('2185', arrOptions2[14], arrOptions2[15]);
	//'BT Infinity Option 2'
	arrMultiArray4[24] = new setMultiArray('2186', arrOptions2[14], arrOptions2[15]);
	//'BT Infinity and Calls
	arrMultiArray4[25] = new setMultiArray('2222', arrOptions2[14], arrOptions2[15]);
	//'Unlimited BT Infinity and Anytime Calls
	arrMultiArray4[26] = new setMultiArray('2223', arrOptions2[14], arrOptions2[15]);

	//'TV Entertainment Broadband and Calls'
	arrMultiArray4[27] = new setMultiArray('2231', arrOptions2[0], arrOptions2[1]);
	arrMultiArray4[28] = new setMultiArray('2231', arrOptions2[16], arrOptions2[17]);

	//More BB and Calls Infinity
	arrMultiArray4[29] = new setMultiArray('2255', arrOptions2[2], arrOptions2[3]);
	arrMultiArray4[30] = new setMultiArray('2255', arrOptions2[10], arrOptions2[11]);
	arrMultiArray4[31] = new setMultiArray('2255', arrOptions2[14], arrOptions2[15]);
	arrMultiArray4[32] = new setMultiArray('2255', arrOptions2[18], arrOptions2[19]);
	arrMultiArray4[33] = new setMultiArray('2255', arrOptions2[20], arrOptions2[21]);

	//Unlimited BB and Calls Infinity
	arrMultiArray4[34] = new setMultiArray('2256', arrOptions2[4], arrOptions2[5]);
	arrMultiArray4[35] = new setMultiArray('2256', arrOptions2[8], arrOptions2[9]);
	arrMultiArray4[36] = new setMultiArray('2256', arrOptions2[14], arrOptions2[15]);
	arrMultiArray4[37] = new setMultiArray('2256', arrOptions2[18], arrOptions2[19]);
	arrMultiArray4[38] = new setMultiArray('2256', arrOptions2[20], arrOptions2[21]);

	//Infinity BB Only
	arrMultiArray4[39] = new setMultiArray('2257', arrOptions2[14], arrOptions2[15]);
	arrMultiArray4[40] = new setMultiArray('2257', arrOptions2[18], arrOptions2[19]);
	arrMultiArray4[41] = new setMultiArray('2257', arrOptions2[20], arrOptions2[21]);

	//TV, BB and Calls Infinity
	arrMultiArray4[42] = new setMultiArray('2258', arrOptions2[14], arrOptions2[15]);

	//More TV, BB and Calls Infinity
	arrMultiArray4[43] = new setMultiArray('2259', arrOptions2[2], arrOptions2[3]);
	arrMultiArray4[44] = new setMultiArray('2259', arrOptions2[14], arrOptions2[15]);

	//Unlimited TV, BB and Calls Infinity
	arrMultiArray4[45] = new setMultiArray('2260', arrOptions2[14], arrOptions2[15]);
 
 /*
 325	Home 500 Plug and Go
326	Home 500 Wires Only
327	Home 500 Router
328	Home 1000




 
 '343','No Internet Business Pack'
	'344','Internet Business Pack with dynamic IP'
	'345','Internet Business Pack with 1 static IP address'
	'346','Internet Business Pack with up to 5 static IP addresses'
	'347','Internet Business Pack with up to 13 static IP addresses'
	'348','Internet Security Pack'
	'349','Internet Trader Pack Shop'
	'350','Internet Trader Pack On-Line payment'

	
	LIVERPOOL Options
	
	37	Service - LVSLCS - SUPPORTED LIVING AND COMMUNITY
	36	Service - LVRESC - RESOURCES
	35	Service - LVREGN - REGENERATION
	34	Service - LVESLS - EDUCATION SPORT AND LIBRARY SER
	33	Service - LVCENT - CENTRAL SERVICES
	32	Service -   LIVERPOOL DIRECT
	31	Portfolio
	
*/
//LVLDIR - LIVERPOOL DIRECT	
arrPortfolio[0] = new setMultiArray('408', '414', 'Service Delivery');
arrPortfolio[1] = new setMultiArray('408', '415', 'Information and Communications Technology Service');
arrPortfolio[2] = new setMultiArray('408', '416', 'Liverpool Direct call centre');
arrPortfolio[3] = new setMultiArray('408', '417', 'Revenues and Benefits Service');
arrPortfolio[4] = new setMultiArray('408', '418', 'Human Resource and Payroll Services');

//LVCENT - CENTRAL SERVICES	
arrPortfolio[5] = new setMultiArray('409', '419', 'Chief Executive’s Office');
arrPortfolio[6] = new setMultiArray('409', '420', 'Equal Opportunities & Positive Action Team');
arrPortfolio[7] = new setMultiArray('409', '421', 'Internal Communications');
arrPortfolio[8] = new setMultiArray('409', '422', 'Marketing Services');
arrPortfolio[9] = new setMultiArray('409', '423', 'News Centre');
arrPortfolio[10] = new setMultiArray('409', '424', 'One Stop Shops');
arrPortfolio[11] = new setMultiArray('409', '425', 'Premises Management Unit');
arrPortfolio[12] = new setMultiArray('409', '426', 'Team Liverpool');
arrPortfolio[13] = new setMultiArray('409', '427', 'Occupational Health');

//LVESLS - EDUCATION SPORT AND LIBRARY SERVICES
arrPortfolio[14] = new setMultiArray('410', '428', 'Adult Learning');
arrPortfolio[15] = new setMultiArray('410', '429', 'Arts, Tourism & Heritage');
arrPortfolio[16] = new setMultiArray('410', '430', 'Early Years');
arrPortfolio[17] = new setMultiArray('410', '431', 'Excellence in Liverpool');
arrPortfolio[18] = new setMultiArray('410', '432', 'Financial Management');
arrPortfolio[19] = new setMultiArray('410', '433', 'Information Services');
arrPortfolio[20] = new setMultiArray('410', '434', 'Intervention Strategy');
arrPortfolio[21] = new setMultiArray('410', '435', 'Libraries');
arrPortfolio[22] = new setMultiArray('410', '436', 'Management Services');
arrPortfolio[23] = new setMultiArray('410', '437', 'Planning & Regeneration Primary');
arrPortfolio[24] = new setMultiArray('410', '438', 'Secondary');
arrPortfolio[25] = new setMultiArray('410', '439', 'Social Inclusion');
arrPortfolio[26] = new setMultiArray('410', '440', 'Special Needs');
arrPortfolio[27] = new setMultiArray('410', '441', 'Sports Development');
arrPortfolio[28] = new setMultiArray('410', '442', 'Strategic Development & Access');
arrPortfolio[29] = new setMultiArray('410', '443', 'Support Youth & Community');
arrPortfolio[30] = new setMultiArray('410', '444', 'Primary');
arrPortfolio[31] = new setMultiArray('410', '445', 'Support');

//LVREGN - REGENERATION	
arrPortfolio[32] = new setMultiArray('411', '446', 'Business Management');
arrPortfolio[33] = new setMultiArray('411', '447', 'City Centre');
arrPortfolio[34] = new setMultiArray('411', '448', 'Design Consultancy');
arrPortfolio[35] = new setMultiArray('411', '449', 'Environmental Health and Trading Standards');
arrPortfolio[36] = new setMultiArray('411', '450', 'Highways and Environment');
arrPortfolio[37] = new setMultiArray('411', '451', 'Highways Management');
arrPortfolio[38] = new setMultiArray('411', '452', 'Housing');
arrPortfolio[39] = new setMultiArray('411', '453', 'Initiatives');
arrPortfolio[40] = new setMultiArray('411', '454', 'Land and Development');
arrPortfolio[41] = new setMultiArray('411', '455', 'Liverpool Business Centre');
arrPortfolio[42] = new setMultiArray('411', '456', 'Liverpool Partnership Group');
arrPortfolio[43] = new setMultiArray('411', '457', 'Partnerships and Neighbourhoods');
arrPortfolio[44] = new setMultiArray('411', '458', 'Performance and Evaluation');
arrPortfolio[45] = new setMultiArray('411', '459', 'Planning and Building Control');
arrPortfolio[46] = new setMultiArray('411', '460', 'Policy and Strategy');
arrPortfolio[47] = new setMultiArray('411', '461', 'Programmes');
arrPortfolio[48] = new setMultiArray('411', '462', 'Strategic Resource Procurement');
arrPortfolio[49] = new setMultiArray('411', '463', 'Housing Market Renewal Initiatives');

//LVRESC - RESOURCES	
arrPortfolio[50] = new setMultiArray('412', '464', 'Financial Management');
arrPortfolio[51] = new setMultiArray('412', '465', 'Treasury and Risk Management');
arrPortfolio[52] = new setMultiArray('412', '466', 'Internal Audit');
arrPortfolio[53] = new setMultiArray('412', '467', 'Legal and Committee');
arrPortfolio[54] = new setMultiArray('412', '468', 'Scrutiny and Best Value');
arrPortfolio[55] = new setMultiArray('412', '469', 'Lord Mayors Office');
arrPortfolio[56] = new setMultiArray('412', '470', 'Executive Director');
arrPortfolio[57] = new setMultiArray('412', '471', 'Special Events');

//LVSLCS - SUPPORTED LIVING AND COMMUNITY SAFETY	
arrPortfolio[58] = new setMultiArray('413', '472', 'Adult Services');
arrPortfolio[59] = new setMultiArray('413', '473', 'Children\'s Services');
arrPortfolio[60] = new setMultiArray('413', '474', 'Community Safety');
arrPortfolio[61] = new setMultiArray('413', '475', 'Performance Management');
arrPortfolio[62] = new setMultiArray('413', '476', 'Youth Offending');
arrPortfolio[63] = new setMultiArray('413', '477', 'Housing & Neighbourhood');

//LVCS - Children Services
arrPortfolio[64] = new setMultiArray('643', '644', 'Education Support');

//'0		-	Please Select
//'573	- Broadband Reseller Manager

//All				=	0
//B1 Mark		=	564
//B2 Marc		=	565
//B3 Jevon	=	566
//B4 Irish	=	567
//B5				=	568
//B6				=	577
//B7 Marketing	=	578
//B8 New Account	=579
//B9 Dead		=	569
//Blank-Picks up Logged on user	= -1

//'574	-	ICT Manager
//ICT1	=	585

//'575	-	Calls and Lines

//CL1 Direct				=	570
//CL2 Resellers			=	571
//CL3 Key Reseller	=	572

//'576	-	Key Accounts
//KA1 Corporate
//KA2 BT Commercial & Brands
//KA3 BT Regions
//KA4 Key Account
//KA5 Special





arrIntSales[0] = new setMultiArray('0','0',' -- Please Select Accounts Manager -- ')
/*
arrIntSales[1] = new setMultiArray('576','0','All')
arrIntSales[2] = new setMultiArray('576','583','B1 Mark')
arrIntSales[3] = new setMultiArray('576','584','B2 Marc')
arrIntSales[4] = new setMultiArray('576','585','B3 Jevon')
arrIntSales[5] = new setMultiArray('576','586','B4 Irish')
arrIntSales[6] = new setMultiArray('576','587','B5')
arrIntSales[7] = new setMultiArray('576','588','B6')
arrIntSales[8] = new setMultiArray('576','589','B7 Marketing')
arrIntSales[9] = new setMultiArray('576','590','B8 New Account')
arrIntSales[10] = new setMultiArray('576','591','B9 Dead')
arrIntSales[11] = new setMultiArray('576','597','Current User')

arrIntSales[12] = new setMultiArray('578','0','All')
arrIntSales[13] = new setMultiArray('578','580','CL1 Direct')
arrIntSales[14] = new setMultiArray('578','581','CL2 Resellers')
arrIntSales[15] = new setMultiArray('578','582','CL3 Key Reseller')
arrIntSales[16] = new setMultiArray('578','598','Current User')

arrIntSales[17] = new setMultiArray('579','0','All')
arrIntSales[18] = new setMultiArray('579','592','KA1 Corporate')
arrIntSales[19] = new setMultiArray('579','593','KA2 BT Commercial & Brands')
arrIntSales[20] = new setMultiArray('579','594','KA3 BT Regions')
arrIntSales[21] = new setMultiArray('579','595','KA4 Key Account')
arrIntSales[22] = new setMultiArray('579','596','KA5 Special')
arrIntSales[23] = new setMultiArray('579','597','Current User')
*/

arrIntSales[1] = new setMultiArray('576','0','All')
arrIntSales[2] = new setMultiArray('576','583','General Reseller')
arrIntSales[3] = new setMultiArray('576','584','Brigantia')
arrIntSales[4] = new setMultiArray('576','585','Integra')
arrIntSales[5] = new setMultiArray('576','586','Irish')
arrIntSales[6] = new setMultiArray('576','587','Redcare')
arrIntSales[7] = new setMultiArray('576','588','Gold')
arrIntSales[8] = new setMultiArray('576','589','Silver')
arrIntSales[9] = new setMultiArray('576','590','Bronze')
arrIntSales[10] = new setMultiArray('576','591','Dead')
//arrIntSales[11] = new setMultiArray('576','597','Current User')

arrIntSales[11] = new setMultiArray('578','0','All')
arrIntSales[12] = new setMultiArray('578','580','CL1 Direct')
arrIntSales[13] = new setMultiArray('578','581','CL2 Resellers')
arrIntSales[14] = new setMultiArray('578','582','CL3 Key Reseller')
//arrIntSales[15] = new setMultiArray('578','598','Current User')

arrIntSales[15] = new setMultiArray('579','0','All')
arrIntSales[16] = new setMultiArray('579','592','KA1 Corporate')
arrIntSales[17] = new setMultiArray('579','593','KA2 BT Commercial & Brands')
arrIntSales[18] = new setMultiArray('579','594','KA3 BT Regions')
arrIntSales[19] = new setMultiArray('579','595','KA4 Key Account')
arrIntSales[20] = new setMultiArray('579','596','KA5 Special')
//arrIntSales[21] = new setMultiArray('579','597','Current User')


function AssignIntSales(elSel)
{
	//alert(elSel.value);
	DelAllSelOption(document.frmForm.IntSales);
	
	for(i=0;i<arrIntSales.length;i++)
	{
		if(arrIntSales[i].parentValue == elSel.value)
			AddSelOption(document.frmForm.IntSales, arrIntSales[i].value, arrIntSales[i].text);
	}
}


arrGM[0] = new setMultiArray('0','0','All')
arrGM[1] = new setMultiArray('1','0','All Corporate')
arrGM[2] = new setMultiArray('1','600','Corporate London')
arrGM[3] = new setMultiArray('1','603','Corporate South')
arrGM[4] = new setMultiArray('1','602','Corporate Midlands')
arrGM[5] = new setMultiArray('1','601','Corporate North / Scotland')
arrGM[6] = new setMultiArray('2','0','All')

arrGM[7] = new setMultiArray('3','0','All Regions')
arrGM[8] = new setMultiArray('3','555','South East')
arrGM[9] = new setMultiArray('3','556','South West')
arrGM[10] = new setMultiArray('3','557','West Midlands')
arrGM[11] = new setMultiArray('3','558','East Midlands')
arrGM[12] = new setMultiArray('3','559','East England')
arrGM[13] = new setMultiArray('3','560','North West')
arrGM[14] = new setMultiArray('3','561','North East')
arrGM[15] = new setMultiArray('3','562','Yorkshire & Humber')
arrGM[16] = new setMultiArray('3','563','Wales')
arrGM[17] = new setMultiArray('3','564','Scotland')
arrGM[18] = new setMultiArray('3','565','Northern Ireland')
arrGM[19] = new setMultiArray('3','566','London')

function AssignGM(elSel)
{
	//alert(elSel.value);
	DelAllSelOption(document.frmForm.GenMgr);
	
	for(i=0;i<arrGM.length;i++)
	{
		if(arrGM[i].parentValue == elSel.value)
			AddSelOption(document.frmForm.GenMgr, arrGM[i].value, arrGM[i].text);
	}
}

//Attr_AC_Reseller				=549
//Attr_AC_BT_Corp					=550
//Attr_AC_BT_CnB					=551
//Attr_AC_BT_Reg					=552
//Attr_AC_Direct					=553
//Attr_AC_Special					=554
//Attr_AC_KeyAccount				=599

arrProdType[0] = new setMultiArray('549','6','All')
arrProdType[1] = new setMultiArray('549','1','Calls and Lines')
arrProdType[2] = new setMultiArray('549','2','Business Broadband')
arrProdType[3] = new setMultiArray('549','3','Consumer Broadband')

arrProdType[4] = new setMultiArray('550','5','All Broadband')
arrProdType[5] = new setMultiArray('550','2','Business Broadband')
arrProdType[6] = new setMultiArray('550','3','Consumer Broadband')

arrProdType[7] = new setMultiArray('551','5','All Broadband')
arrProdType[8] = new setMultiArray('551','2','Business Broadband')
arrProdType[9] = new setMultiArray('551','3','Consumer Broadband')

arrProdType[10] = new setMultiArray('552','6','All')
arrProdType[11] = new setMultiArray('552','1','Calls and Lines')
arrProdType[12] = new setMultiArray('552','2','Business Broadband')
arrProdType[13] = new setMultiArray('552','3','Consumer Broadband')

arrProdType[14] = new setMultiArray('553','1','Calls and Lines')

//arrProdType[15] = new setMultiArray('554','5','All Broadband')
//arrProdType[16] = new setMultiArray('554','2','Business Broadband')
arrProdType[15] = new setMultiArray('554','3','Consumer Broadband')

arrProdType[16] = new setMultiArray('599','5','All Broadband')
arrProdType[17] = new setMultiArray('599','2','Business Broadband')
arrProdType[18] = new setMultiArray('599','3','Consumer Broadband')

arrProdType[19] = new setMultiArray('664','5','All Accounts')
arrProdType[20] = new setMultiArray('664','1','Campaigns Account 1')
arrProdType[21] = new setMultiArray('664','2','Campaigns Account 2')
arrProdType[22] = new setMultiArray('664','3','Campaigns Account 3')

arrProdType[23] = new setMultiArray('0','6','All')
arrProdType[24] = new setMultiArray('0','1','Calls and Lines')
arrProdType[25] = new setMultiArray('0','2','Business Broadband')
arrProdType[26] = new setMultiArray('0','3','Consumer Broadband')
arrProdType[27] = new setMultiArray('0','4','Affiliates')

arrProdType[28] = new setMultiArray('-1','-1','-- No Records --')

function AssignProdType(elSel)
{
	//alert(elSel.value);
	
	DelAllSelOption(document.frmForm.ProdType);
	
	for(i=0;i<arrProdType.length;i++)
	{
		if(arrProdType[i].parentValue == elSel.value)
			AddSelOption(document.frmForm.ProdType, arrProdType[i].value, arrProdType[i].text);
	}
}

function DisplayCB(elSel)
{
	var_CallBack = "674";
	//alert(document.getElementById("Attr_1079").value)
	if (document.getElementById("Attr_1079").value = var_CallBack) {
		document.getElementById("CallBackDate").style.display="block";
		document.getElementById("CallBackTime").style.display="block";
	}
}

function DisplayCB_Status(elSel)
{
	var_CallBack = "674";
	
	//alert(elSel.value)
	
	if (elSel.value == var_CallBack) {
		document.getElementById("CallBackDate").style.display="block";
		document.getElementById("CallBackTime").style.display="block";
	}else {
		document.getElementById("CallBackDate").style.display="none";
		document.getElementById("CallBackTime").style.display="none";
	}
}

function AssignService(elSel)
{
	//alert(elSel.value);
	DelAllSelOption(document.frmForm.Attr_507);
	
	for(i=0;i<arrPortfolio.length;i++)
	{
		if(arrPortfolio[i].parentValue == elSel.value)
			AddSelOption(document.frmForm.Attr_507, arrPortfolio[i].value, arrPortfolio[i].text);
	}
}

function CheckSpaces(ObjRef,Value){
	
	var strRegExp;
	
	if (Value.search(" ") >= 0) {
		alert("This field does not allow spaces.");
		strRegExp = / /g;
		ObjRef.value = Value.replace(strRegExp,"");
		ObjRef.focus();
	}
}

function TrimSpaces(ObjRef, Value) {

    var strRegExp;

    strRegExp = / /g;
    ObjRef.value = Value.replace(strRegExp, "");
}


function DisplayCallSpend(Value, PrevContractValue, PrevCallSpendValue){

	var strCallSpend;	
	Value = Number(Value);
	
	if (Value == 312){
		strCallSpend = "0-&pound;250";
	}
	else if (Value == 319) {
		strCallSpend = "4,999";
	}
	else {
		strCallSpend = "";
	}
	
	if (strCallSpend != ""){
	    document.frmForm.Attr_66.value = strCallSpend;
	    document.frmForm.Attr_3475.value = strCallSpend;
	}
	else {
	    document.frmForm.Attr_66.value = PrevContractValue;
	    document.frmForm.Attr_3475.value = PrevCallSpendValue;
	}
}

function QAS_PopupMulti(AddRefOnPage) {
   QAS_PRO = window.open("/VD29/qas/popup-pro3.asp?Add=" + AddRefOnPage + "&CountryCodeName=GBR", "QAS_PRO", "scrollbars=yes,resizable=yes,width=600,height=450");
}

 function QAS_Popup() {

  QAS_PRO = window.open("/VD29/qas/popup-pro3.asp?CountryCodeName=GBR","QAS_PRO", "scrollbars=yes,resizable=yes,width=600,height=450"); 
}


function QAS_Popup2()
{
  QAS_PRO = window.open("/VD29/qas/popup-pro3.asp?Add=2&CountryCodeName=GBR","QAS_PRO", "scrollbars=yes,resizable=yes,width=600,height=450"); 
}

function QAS_PopupPSTN(AddrValue)
{
	QAS_PRO = window.open("/VD29/qas/PSTN/popup-pro3.asp?Add=" + AddrValue + "&CountryCodeName=GBR&Type=PSTN","QAS_PRO", "scrollbars=yes,resizable=yes,width=600,height=450"); 
}

function QAS_PopupPSTNAddr(AddrValue)
{
	QAS_PRO = window.open("/VD29/qas/popup-pro3.asp?Add=" + AddrValue + "&CountryCodeName=GBR&Type=PSTN","QAS_PRO", "scrollbars=yes,resizable=yes,width=600,height=450"); 
}

function changeGlobalID(){
	
    if (document.frmForm.Attr_576.value != "") {
    	document.frmForm.Attr_577.value = document.frmForm.Attr_576.value;
    }
}

function Send_Confirm(What,URL)
	{
	if(confirm("Are you sure you want to send this invoice " + What +" ?")){document.location.href=URL;}
	}

function Resign_Confirm(sType)
{
    var sName;
    
    if (sType == 'RS'){
        sName = 're-sign';
    }else{
        sName = 're-process';
    }
    if(confirm("Are you sure you want to "+ sName +" this order?")){document.frmForm.submit();}
}

function Generic_Confirm(What,URL)
{
	if(confirm("Are you sure you want to " + What +" ?")){document.location.href=URL;}
}


function DisplayTalkNumber_Plan(elSel)
{
	var_TalkPlan = "944";
	var_TalkPlan2 = "943";
	
	if (elSel.value == var_TalkPlan || elSel.value == var_TalkPlan2) {
	    document.getElementById("TalkNumberHeader").style.display="block";
		document.getElementById("TalkNumber").style.display="block";
        if (document.frmForm.Attr_1357_Rdo[1].checked){
            document.getElementById("NumberOptions").style.display="block";
        }
	}else {
		document.getElementById("TalkNumberHeader").style.display="none";
		document.getElementById("TalkNumber").style.display="none";
		document.getElementById("NumberOptions").style.display="none";
	}
}

function DisplayTalkNumber_Options(elSel)
{
	var_TalkPlanOpt = "946";
	
	if (elSel.value == var_TalkPlanOpt) {
		document.getElementById("NumberOptions").style.display="block";
	}else {
		document.getElementById("NumberOptions").style.display="none";
	}
}

function DisplayTalkNumber_Plan_BTNI(elSel)
{
	var_TalkPlan = "944";
	var_TalkPlan2 = "943";
	
	if (elSel.value == var_TalkPlan || elSel.value == var_TalkPlan2) {
        if (document.frmForm.Attr_2059_Rdo[1].checked){
            document.getElementById("NumberOptions").style.display="block";
        }
	}else {
		document.getElementById("NumberOptions").style.display="none";
	}
}


function CB_Place_Order(sAffCode,iPSID,iPagingID)
{
   BTOrder = window.open("http://www.bt.com/broadband/bb_info.jsp?vendorid=" + sAffCode,"BTOrder", "scrollbars=yes,resizable=yes,width=800,height=600,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes"); 
   
   window.location.href="/VD29/process.asp?Proc=7&PSID=" + iPSID +"&iP=" + iPagingID;

}


function DisplayITAdvisorTelNo(elsel)
{
   if (elsel.checked){
	   document.getElementById("ITAdvisorTelNo").style.display="block";
	   document.getElementById("ITAdvisorText").style.display="block";
	   if (document.frmForm.Attr_1614.value == ''){
	        document.frmForm.Attr_1614.value = document.frmForm.Attr_127.value;
	   }
	}else{
	   document.getElementById("ITAdvisorTelNo").style.display="none";
	   document.getElementById("ITAdvisorText").style.display="none";
	}
}

function DisplayITAdvisorTelNoConsumerChoice(elsel) {
    if (elsel.checked) {
        document.getElementById("ITAdvisorTelNoCC").style.display = "block";
        document.getElementById("ITAdvisorTextCC").style.display = "block";
        if (document.frmForm.Attr_3149.value == '') {
            document.frmForm.Attr_3149.value = document.frmForm.Attr_3065.value;
        }
    } else {
        document.getElementById("ITAdvisorTelNoCC").style.display = "none";
        document.getElementById("ITAdvisorTextCC").style.display = "none";
    }
}

function DisplayITAdvisorTelNo_BTNI(elsel)
{
   if (elsel.checked){
	   document.getElementById("ITAdvisorTelNo").style.display="block";
	   document.getElementById("ITAdvisorText").style.display="block";
	   if (document.frmForm.Attr_2062.value == ''){
	        document.frmForm.Attr_2062.value = document.frmForm.Attr_2039.value;
	   }
	}else{
	   document.getElementById("ITAdvisorTelNo").style.display="none";
	   document.getElementById("ITAdvisorText").style.display="none";
	}
}


function ResellerDetails_Popup()
{
  ResellerDetails = window.open("/VD29/member/co/co_view.asp?A=0&C=A&Resign=Y","ResellerDetails", "scrollbars=yes,resizable=yes,width=800,height=600"); 
}

function InsertResellerDetails(sResellerName, sPartnerRef, sContactName, sContactEmail)
{
   window.opener.document.frmForm.Attr_34.value = sResellerName;
   window.opener.document.frmForm.Attr_36.value = sPartnerRef;
   window.opener.document.frmForm.Attr_40.value = sContactName;
   window.opener.document.frmForm.Attr_1305.value = sContactEmail;
   window.opener.document.frmForm.Attr_39.value = 'Danny Ruler';
   window.close();
}


function DisplayMicroSwitch_Product(elSel)
{
    var_MicroSwitchProduct = "1109";
		
	if (elSel.value == var_MicroSwitchProduct) {
	    	document.getElementById("MicroSwitch_1761").style.display="block";
	    	document.getElementById("MicroSwitch_1763").style.display="block";
	    	document.getElementById("MicroSwitch_1764").style.display="block";
	    	document.getElementById("MicroSwitch_1765").style.display="block";
	    	document.getElementById("MicroSwitch_1766").style.display="block";
	    	document.getElementById("MicroSwitch_1767").style.display="block";
	    	document.getElementById("MicroSwitch_1768").style.display="block";
	    	document.getElementById("MicroSwitch_1769").style.display="block";
	    
	    	document.getElementById("NonMicroSwitch_1663").style.display="none";
		document.getElementById("NonMicroSwitch_1664").style.display="none";
		document.getElementById("NonMicroSwitch_1665").style.display="none";
		document.getElementById("NonMicroSwitch_1666").style.display="none";
		document.getElementById("NonMicroSwitch_1667").style.display="none";
		document.getElementById("NonMicroSwitch_1668").style.display="none";
		document.getElementById("NonMicroSwitch_1669").style.display="none";
		document.getElementById("NonMicroSwitch_1670").style.display="none";
		document.getElementById("NonMicroSwitch_1671").style.display="none";
		document.getElementById("NonMicroSwitch_1672").style.display="none";
	}else {
		document.getElementById("NonMicroSwitch_1663").style.display="block";
		document.getElementById("NonMicroSwitch_1664").style.display="block";
		document.getElementById("NonMicroSwitch_1665").style.display="block";
		document.getElementById("NonMicroSwitch_1666").style.display="block";
		document.getElementById("NonMicroSwitch_1667").style.display="block";
		document.getElementById("NonMicroSwitch_1668").style.display="block";
		document.getElementById("NonMicroSwitch_1669").style.display="block";
		document.getElementById("NonMicroSwitch_1670").style.display="block";
		document.getElementById("NonMicroSwitch_1671").style.display="block";
		document.getElementById("NonMicroSwitch_1672").style.display="block";
		
		document.getElementById("MicroSwitch_1761").style.display="none";
	    	document.getElementById("MicroSwitch_1763").style.display="none";
	    	document.getElementById("MicroSwitch_1764").style.display="none";
	    	document.getElementById("MicroSwitch_1765").style.display="none";
	    	document.getElementById("MicroSwitch_1766").style.display="none";
	    	document.getElementById("MicroSwitch_1767").style.display="none";
	    	document.getElementById("MicroSwitch_1768").style.display="none";
	    	document.getElementById("MicroSwitch_1769").style.display="none";
	}
}

function DisplaySwitch_Decision(elSel) {
    var_SwitchDecision = "237";

    if (elSel.value == var_SwitchDecision) {
        document.getElementById("SwitchDecision_2960").style.display = "block";
        document.getElementById("SwitchDecision_2961").style.display = "block";
        document.getElementById("SwitchDecision_2962").style.display = "block";
        document.getElementById("SwitchDecision_2963").style.display = "block";
        document.getElementById("SwitchDecision_2964").style.display = "block";
        document.getElementById("SwitchDecision_2965").style.display = "block";
        document.getElementById("SwitchDecision_2966").style.display = "block";
    } else {
        document.getElementById("SwitchDecision_2960").style.display = "none";
        document.getElementById("SwitchDecision_2961").style.display = "none";
        document.getElementById("SwitchDecision_2962").style.display = "none";
        document.getElementById("SwitchDecision_2963").style.display = "none";
        document.getElementById("SwitchDecision_2964").style.display = "none";
        document.getElementById("SwitchDecision_2965").style.display = "none";
        document.getElementById("SwitchDecision_2966").style.display = "none";
    }
}

function DisplayNewLineOptions(elSel)
{
	var_NewLineReq = "847";
	
	if (elSel.value == var_NewLineReq) {
	    document.getElementById("NewLineReqExtraCharges").style.display="block";
	}else {
		document.getElementById("NewLineReqExtraCharges").style.display="none";
	}
}

function DisplayConfirmExtraCharges(elSel)
{
	var_ConfirmYes = "237";
	
	if (elSel.value == var_ConfirmYes) {
	    document.getElementById("ConfirmExtraCharges").style.display = "block";
	    document.getElementById("ConfirmExtraCharges2").style.display = "block";
	}else {
	    document.getElementById("ConfirmExtraCharges").style.display = "none";
	    document.getElementById("ConfirmExtraCharges2").style.display = "none";
	}
}

function Check_Other_Fields(sVal1, sVal2)
{
    var_NewLineReq = "";
    var_ApproveCharges = "";
    var_ApproveCharges_checked = false;
    var_ConfirmCharge_checked = false;
    
    for (x=0; x<document.frmForm.Attr_124_Rdo.length;x++) {
        if (document.frmForm.Attr_124_Rdo[x].checked) 
        {
           var_NewLineReq = document.frmForm.Attr_124_Rdo[x].value
        }
    }
    
    //for (y=0; y<document.frmForm.Attr_1981_Rdo.length;y++) {
    //    if (document.frmForm.Attr_1981_Rdo[y].checked) 
    //    {
    //       var_ApproveCharges_checked = document.frmForm.Attr_1981_Rdo[y].checked
    //       var_ApproveCharges = document.frmForm.Attr_1981_Rdo[y].value
    //    }
    //}
    
    //for (z=0; z<document.frmForm.Attr_2016_Rdo.length;z++) {
    //    if (document.frmForm.Attr_2016_Rdo[z].checked) 
    //    {
    //       var_ConfirmCharge_checked = document.frmForm.Attr_2016_Rdo[z].checked
    //    }
    //}

    //if (var_NewLineReq == "847" && var_ApproveCharges_checked == "")
    //{
    //    alert("Please select whether the customer will proceed with new line/re-connection installation charges");
    //    return false;
    //}
    //else if (var_NewLineReq == "847" && var_ApproveCharges_checked != "")
    //{
    //    if(var_ApproveCharges == "237" && var_ConfirmCharge_checked == "")
    //    {
     //     alert("Please confirm the &pound;124.99 charge to customer");
    //      return false;  
    //    }
    //    else
    //    {
    //        Check_and_Prompt('frmForm',sVal1, sVal2)
    //    }
    //}
    //else
    //{
        Check_and_Prompt('frmForm',sVal1, sVal2)
    //}
}

function Check_Other_Fields_BTNI(sVal1, sVal2)
{
    var_NewLineReq = "";
    var_ApproveCharges = "";
    var_ApproveCharges_checked = false;
    var_ConfirmCharge_checked = false;
    
    for (x=0; x<document.frmForm.Attr_2037_Rdo.length;x++) {
        if (document.frmForm.Attr_2037_Rdo[x].checked) 
        {
           var_NewLineReq = document.frmForm.Attr_2037_Rdo[x].value
        }
    }
    
    for (y=0; y<document.frmForm.Attr_2040_Rdo.length;y++) {
        if (document.frmForm.Attr_2040_Rdo[y].checked) 
        {
           var_ApproveCharges_checked = document.frmForm.Attr_2040_Rdo[y].checked
           var_ApproveCharges = document.frmForm.Attr_2040_Rdo[y].value
        }
    }
    
    for (z=0; z<document.frmForm.Attr_2041_Rdo.length;z++) {
        if (document.frmForm.Attr_2041_Rdo[z].checked) 
        {
           var_ConfirmCharge_checked = document.frmForm.Attr_2041_Rdo[z].checked
        }
    }

    if (var_NewLineReq == "847" && var_ApproveCharges_checked == "")
    {
        alert("Please select whether the customer will proceed with new line/re-connection installation charges");
        return false;
    }
    else if (var_NewLineReq == "847" && var_ApproveCharges_checked != "")
    {
        if(var_ApproveCharges == "237" && var_ConfirmCharge_checked == "")
        {
          alert("Please confirm the &pound;124.99 charge to customer");
          return false;  
        }
        else
        {
            Check_and_Prompt('frmForm',sVal1, sVal2)
        }
    }
    else
    {
        Check_and_Prompt('frmForm',sVal1, sVal2)
    }
}

function isANumber(string)
{
	var realreg = /^ *[0-9 ]+ *$/;
	if (realreg.test(string)!=true){alert("Please only enter numbers and spaces.");return false;}else{return true;}

}
function isANumberOrNULL(string) {

    if (string == "") return true;

    var realreg = /^ *[0-9]+ *$/;
    if (realreg.test(string) != true) { alert("Please only enter a valid number or leave empty.");return false; } else { return true; }

}

function isANumberNoSpaces(string)
{
	var realreg = /^ *[0-9]+ *$/;
	if (realreg.test(string)!=true){alert("Please only enter numbers.");return false;}else{return true;}

}

function isPosOrNegMonetoryValue(string) {
    var realreg = /^\-?[0-9]+(\.[0-9]{1,2})?$/;
    if (realreg.test(string) != true) { alert("Input value must be in monetory format\nNo currency signs or spaces accepted.\nMax 2 values after decimal point (eg: #.# or #.##)."); return false; } else { return true; }
}

function isAFloat(e, el) {

    

    //get key pressed (cater for differetn browsers)

    var k = document.all ? parseInt(e.keyCode) : parseInt(e.which);

    

    //allow certain keys ([ backspace == 8 ])

    if((k == 8)) return;

    

    if(k){

        //make sure only contains numbers of decimal point 

        var t = validateKey(k, numbers + point);

        

        //check for multiple decimal points

        var nPoints = 0;

        var v = el.value;

        var v2 = v + String.fromCharCode(k); //value with key pressed 

        

        if (t) {

            nPoints = v2.count(point);

            if (nPoints > 1) {

                alert('Multiple decimal points are not allowed.');

                return false;

            }

            return t;

        }

        else {

            alert("Only numbers allowed.");

            return t;

        }

    }    

}


function isPasswordValid(pwd) {

    var alphanum = /^([a-zA-Z0-9_-]+)$/; //This contains A to Z , 0 to 9 and A to Z
    var minLength = 7; // Minimum length
    
    if (pwd.value.match(alphanum)) {
        // check for minimum length
        if (pwd.value.length < minLength) {
            alert('Your password must be at least ' + minLength + ' characters long. Try again.');
            pwd.focus();
            return false;
        } else {return true;}
    } else {
        alert("Your password must be a minimum of 7 alphanumeric characters only.");
        pwd.focus();
        return false;
    }
}

function confirmPassword(confirmpwd,pwd) {
    // check for confirming passwords
    var password = eval('document.frmForm.Attr_' + pwd + '.value');

    if (confirmpwd.value != password) {
        alert("Your passwords do not match. Try again.");
        return false;
    } 
        else {return true;}        
}

function DisplayBTMobileDetails(elSel)
{
	var_Yes = "237";
	
	if (elSel.value == var_Yes) {
	    document.getElementById("BTMobileDetails1").style.display="block";
	    document.getElementById("BTMobileDetails2").style.display="block";
	}else {
		document.getElementById("BTMobileDetails1").style.display="none";
		document.getElementById("BTMobileDetails2").style.display="none";
	}
}

function DisplayExistingOpenzone(elSel)
{
	var_Yes = "237";
	
	if (elSel.value == var_Yes) {
	    document.getElementById("BTExistingOpenzone").style.display="block";
	}else {
		document.getElementById("BTExistingOpenzone").style.display="none";
	}
}

function DisplayExistingOneBillCust(elSel)
{
	var_Yes = "237";
	
	if (elSel.value == var_Yes) {
	    document.getElementById("BTExistingOneBillCust").style.display="block";
	}else {
		document.getElementById("BTExistingOneBillCust").style.display="none";
	}
}

function DisplayTalkPackage(elSel) {
    var_Yes = "237";

    if (elSel.value == var_Yes) {
        document.getElementById("PNTalkPackage").style.display = "block";
    } else {
        document.getElementById("PNTalkPackage").style.display = "none";
        document.frmForm.Attr_2678.value = "0";
    }
}

function DisplayCBVision(elSel, sViewingPack, sContractType, sCBProduct, sEquipment) {
    
    //display vision fields
    if (elSel.value == "1818" || elSel.value == "1819" || elSel.value == "1820" || elSel.value == "1821" || elSel.value == "1822" || elSel.value == "1823" || elSel.value == "0" || elSel.value == "2076" || elSel.value == "2077" || elSel.value == "2078" || elSel.value == "2255" || elSel.value == "2256" || elSel.value == "2184" || elSel.value == "2257") {
        document.getElementById("CBVisionHead").style.display = "none";
        document.getElementById("CBVision").style.display = "none";
    } else {
        document.getElementById("CBVisionHead").style.display = "block";
        document.getElementById("CBVision").style.display = "block";
    }

    //gold product bundles - check viewing packs included in tv package/bundle
    var sVPAttrVal = 'document.frmForm.Attr_' + sViewingPack + '_chk';
    if (elSel.value == "1825" || elSel.value == "1826" || elSel.value == "1829" || elSel.value == "2085" || elSel.value == "2260") {

        for (i = 0; i < eval(sVPAttrVal + '.length'); i++) {

            var objPack = eval(sVPAttrVal+ '[i]');
            var packValue = objPack.value;

            //Exclude Sky Sports 1, Sky Sports 2, Bolly and Beyond
            if (packValue != "2173" && packValue != "2174" && packValue != "2176") {
                objPack.checked = true;
            }
        }
    }
    else {
        for (i = 0; i < eval(sVPAttrVal + '.length'); i++) {
            var sViewingPacksVal = eval(sVPAttrVal + '[i].checked');
            sViewingPacksVal = false;
        }
    }

    //contract type
    var sCTAttrVal = 'document.frmForm.Attr_' + sContractType + '_Rdo';
    for (i = 0; i < eval(sCTAttrVal + '.length'); i++) {
        var objContract = eval(sCTAttrVal + '[i]');
        var ContractValue = objContract.value;

        if (elSel.value == "1818" || elSel.value == "1819" || elSel.value == "1820") {
            //12 months
            if (ContractValue == "853") {
                objContract.checked = true;
                objContract.disabled = false;
            } else {
                objContract.disabled = true;
            }
        } else if (elSel.value == "2084" || elSel.value == "2085" || elSel.value == "2132" || elSel.value == "2258" || elSel.value == "2259" || elSel.value == "2260") {
            //24 months
            if (ContractValue == "2159") {
                objContract.checked = true;
                objContract.disabled = false;
            } else {
                objContract.disabled = true;
            }
            //18 months
        } else if (ContractValue == "854") {
            objContract.checked = true;
            objContract.disabled = false;
        } else {
            objContract.disabled = true;
        }
    }
    
    //product bundles - pre-select product & calling plans
    //Option 1
    var sCBProductObj = eval('document.frmForm.Attr_' + sCBProduct);
    
    if (elSel.value == "1818" || elSel.value == "1821" || elSel.value == "1822" || elSel.value == "1824" || elSel.value == "1827" || elSel.value == "1825" || elSel.value == "2076" || elSel.value == "2083" || elSel.value == "2171" || elSel.value == "2184") {
        sCBProductObj.value = "665";
        setProductOptions6(sCBProductObj, sContractType, sEquipment);
    }
    //Option 2
    else if (elSel.value == "1819" || elSel.value == "2077" || elSel.value == "2084" || elSel.value == "2132") {
        sCBProductObj.value = "666";
        setProductOptions6(sCBProductObj, sContractType, sEquipment);
    }
    //Option 3
    else if (elSel.value == "1820" || elSel.value == "1823" || elSel.value == "1826" || elSel.value == "1828" || elSel.value == "1829" || elSel.value == "2013" || elSel.value == "2078" || elSel.value == "2085") {
        sCBProductObj.value = "667";
        setProductOptions6(sCBProductObj, sContractType, sEquipment);
    }
    //All infinity product options
    else if (elSel.value == "2185" || elSel.value == "2186" || elSel.value == "2222" || elSel.value == "2223" || elSel.value == "2231" || elSel.value == "2255" || elSel.value == "2256" || elSel.value == "2257" || elSel.value == "2258" || elSel.value == "2259" || elSel.value == "2260") {

        sCBProductObj.value = elSel.value;
        setProductOptions6(sCBProductObj, sContractType, sEquipment);
    }
    else {
        sCBProductObj.value = "0";
    }
    
    //product bundles - pre-select calling plans
    //Unlimited UK Evening & Weekend calls
    /*if (elSel.value == "1821" || elSel.value == "1824" || elSel.value == "1825" || elSel.value == "1826" || elSel.value == "2184") {
        document.frmForm.Attr_1223.value = "845";
    }
    //Unlimited Weekend Plan
    else if (elSel.value == "2077" || elSel.value == "2083" || elSel.value == "2084" || elSel.value == "2132" || elSel.value == "2171" || elSel.value == "2185" || elSel.value == "2222" || elSel.value == "2231" || elSel.value == "2261" || elSel.value == "2264" || elSel.value == "2265") {
        document.frmForm.Attr_1223.value = "844";
    }
    //Unlimited UK Anytime calls
    else if (elSel.value == "1822" || elSel.value == "1823" || elSel.value == "2078" || elSel.value == "2085" || elSel.value == "2076" || elSel.value == "2186" || elSel.value == "2223" || elSel.value == "2262" || elSel.value == "2266") {
        document.frmForm.Attr_1223.value = "846";
    }
    else {
        document.frmForm.Attr_1223.value = "0";
    }
    */

    DisplayCBCallExtraPlan(elSel);
}

function DisplayCBVisionCC(elSel) {

    if (elSel.value == "237") {
        document.getElementById("CBVisionCCHead").style.display = "block";
        document.getElementById("CBVisionCT").style.display = "block";
        document.getElementById("CBVisionCN").style.display = "block";
        document.getElementById("CBVisionCH").style.display = "block";
        document.getElementById("CBVisionSD").style.display = "block";
        document.getElementById("CBVisionED").style.display = "block";
        document.getElementById("CBVisionIN").style.display = "block";
        
    } else {
        document.getElementById("CBVisionCCHead").style.display = "none";
        document.getElementById("CBVisionCT").style.display = "none";
        document.getElementById("CBVisionCN").style.display = "none";
        document.getElementById("CBVisionCH").style.display = "none";
        document.getElementById("CBVisionSD").style.display = "none";
        document.getElementById("CBVisionED").style.display = "none";
        document.getElementById("CBVisionIN").style.display = "none";
    }
}

function DisplayCBVisionPrevAdd(elSel) {

    if (elSel.value == "1837") {
        document.getElementById("CBVisionPrevAdd1").style.display = "block";
        document.getElementById("CBVisionPrevAdd2").style.display = "block";
        document.getElementById("CBVisionPrevAdd3").style.display = "block";
        document.getElementById("CBVisionPrevCity").style.display = "block";
        document.getElementById("CBVisionPrevCounty").style.display = "block";
        document.getElementById("CBVisionPrevPC").style.display = "block";
        document.getElementById("CBVisionPrevYYYY").style.display = "block";
        //document.getElementById("CBVisionPrevMM").style.display = "block";

    } else {
        document.getElementById("CBVisionPrevAdd1").style.display = "none";
        document.getElementById("CBVisionPrevAdd2").style.display = "none";
        document.getElementById("CBVisionPrevAdd3").style.display = "none";
        document.getElementById("CBVisionPrevCity").style.display = "none";
        document.getElementById("CBVisionPrevCounty").style.display = "none";
        document.getElementById("CBVisionPrevPC").style.display = "none";
        document.getElementById("CBVisionPrevYYYY").style.display = "none";
        //document.getElementById("CBVisionPrevMM").style.display = "none";
	document.getElementById("CBVisionPrevAdd1_2").style.display = "none";
        document.getElementById("CBVisionPrevAdd2_2").style.display = "none";
        document.getElementById("CBVisionPrevAdd3_2").style.display = "none";
        document.getElementById("CBVisionPrevCity_2").style.display = "none";
        document.getElementById("CBVisionPrevCounty_2").style.display = "none";
        document.getElementById("CBVisionPrevPC_2").style.display = "none";
    }
}

function DisplayCBVisionPrevAdd2(elSel) {

    if (elSel.value == "1837") {
        document.getElementById("CBVisionPrevAdd1_2").style.display = "block";
        document.getElementById("CBVisionPrevAdd2_2").style.display = "block";
        document.getElementById("CBVisionPrevAdd3_2").style.display = "block";
        document.getElementById("CBVisionPrevCity_2").style.display = "block";
        document.getElementById("CBVisionPrevCounty_2").style.display = "block";
        document.getElementById("CBVisionPrevPC_2").style.display = "block";

    } else {
        document.getElementById("CBVisionPrevAdd1_2").style.display = "none";
        document.getElementById("CBVisionPrevAdd2_2").style.display = "none";
        document.getElementById("CBVisionPrevAdd3_2").style.display = "none";
        document.getElementById("CBVisionPrevCity_2").style.display = "none";
        document.getElementById("CBVisionPrevCounty_2").style.display = "none";
        document.getElementById("CBVisionPrevPC_2").style.display = "none";
    }
}


function DisplayBPAquisition(elSel) 
{
    var_Yes = "237";

    if (elSel.value == var_Yes) {
        document.getElementById("BPAquisition").style.display = "block";
    } else {
        document.getElementById("BPAquisition").style.display = "none";
	document.getElementById("BPAquisitionCPS").style.display = "none";
        document.getElementById("BPAquisition1").style.display = "none";
        document.getElementById("BPAquisition2").style.display = "none";
        document.getElementById("BPAquisition3").style.display = "none";
        document.getElementById("BPAquisition4").style.display = "none";
        document.getElementById("BPAquisition5").style.display = "none";
        document.getElementById("BPAquisition6").style.display = "none";
	document.getElementById("inclusiveschemefields").style.display = "none";
    }
}

function DisplayBPAquisition2(elSel) {
    var_Yes = "238";

    if (elSel.value == var_Yes) {
	document.getElementById("BPAquisitionCPS").style.display = "block";
        document.frmForm.Attr_2190_Rdo[1].checked = true;
        document.getElementById("BPAquisition1").style.display = "block";
        document.getElementById("BPAquisition2").style.display = "block";
        document.getElementById("BPAquisition3").style.display = "block";
        document.getElementById("BPAquisition4").style.display = "block";
        document.getElementById("BPAquisition5").style.display = "block";
        document.getElementById("BPAquisition6").style.display = "block";
    } else {
	document.getElementById("BPAquisitionCPS").style.display = "none";
        document.getElementById("BPAquisition1").style.display = "none";
        document.getElementById("BPAquisition2").style.display = "none";
        document.getElementById("BPAquisition3").style.display = "none";
        document.getElementById("BPAquisition4").style.display = "none";
        document.getElementById("BPAquisition5").style.display = "none";
        document.getElementById("BPAquisition6").style.display = "none";
    }

}

function DisplayInclusiveSchemeFields(elSel) {

    if (elSel == "1904" || elSel == "1905" || elSel == "1906") {
        document.getElementById("inclusiveschemefields").style.display = "block";
    } else {
        document.getElementById("inclusiveschemefields").style.display = "none";
    }
}


function DisplayCBVisionConsumerChoice(elSel) {

    //display vision fields
    if (elSel.value == "1818" || elSel.value == "1819" || elSel.value == "1820" || elSel.value == "1821" || elSel.value == "1822" || elSel.value == "1823" || elSel.value == "0"  || elSel.value == "2076" || elSel.value == "2077" || elSel.value == "2078" || elSel.value == "2255" || elSel.value == "2256" || elSel.value == "2184" || elSel.value == "2257") {
        document.getElementById("CBVisionHead").style.display = "none";
        document.getElementById("CBVision").style.display = "none";
    } else {
        document.getElementById("CBVisionHead").style.display = "block";
        document.getElementById("CBVision").style.display = "block";
    }

    //gold product bundles - all viewing options are selected
    if (elSel.value == "1825" || elSel.value == "1826" || elSel.value == "1829" || elSel.value == "2085" || elSel.value == "2260") {

        for (i = 0; i < document.frmForm.Attr_3152_chk.length; i++) {
        
            var objPack = document.frmForm.Attr_3152_chk[i];
            var packValue = objPack.value;
            
            //Exclude Sky Sports 1, Sky Sports 2, Bolly and Beyond
            if (packValue != "2173" && packValue != "2174" && packValue != "2176") {
                objPack.checked = true;
            }
        }
    }
    else {
        for (i = 0; i < document.frmForm.Attr_3152_chk.length; i++) {
            document.frmForm.Attr_3152_chk[i].checked = false;
        }
    }

    //contract type
    //12 months
    if (elSel.value == "1818" || elSel.value == "1819" || elSel.value == "1820") {
        document.frmForm.Attr_3138_Rdo[0].checked = true;
	    document.frmForm.Attr_3138_Rdo[0].disabled = false;
        document.frmForm.Attr_3138_Rdo[1].disabled = true;
	    document.frmForm.Attr_3138_Rdo[2].disabled = true;
    //24 months
    } else if (elSel.value == "2084" || elSel.value == "2085" || elSel.value == "2132" || elSel.value == "2258" || elSel.value == "2259" || elSel.value == "2260") {
	    document.frmForm.Attr_3138_Rdo[2].checked = true;
	    document.frmForm.Attr_3138_Rdo[2].disabled = false;
        document.frmForm.Attr_3138_Rdo[0].disabled = true;
	    document.frmForm.Attr_3138_Rdo[1].disabled = true;
    //18 months
    } else {
        document.frmForm.Attr_3138_Rdo[1].checked = true;
	    document.frmForm.Attr_3138_Rdo[1].disabled = false;
        document.frmForm.Attr_3138_Rdo[0].disabled = true;
        document.frmForm.Attr_3138_Rdo[2].disabled = true;
    }
    

    //product bundles - pre-select product & calling plans
    //Option 1
    if (elSel.value == "1818" || elSel.value == "1821" || elSel.value == "1822" || elSel.value == "1824" || elSel.value == "1827" || elSel.value == "1825" || elSel.value == "2076" || elSel.value == "2083" || elSel.value == "2171" || elSel.value == "2184") {
        document.frmForm.Attr_3139.value = "665";
        setProductOptionsConsumerChoice(document.frmForm.Attr_3139);
    }
    //Option 2
    else if (elSel.value == "1819" || elSel.value == "2077" || elSel.value == "2084" || elSel.value == "2132") {
        document.frmForm.Attr_3139.value = "666";
        setProductOptionsConsumerChoice(document.frmForm.Attr_3139);

    }
    //Option 3
    else if (elSel.value == "1820" || elSel.value == "1823" || elSel.value == "1826" || elSel.value == "1828" || elSel.value == "1829" || elSel.value == "2013" || elSel.value == "2078" || elSel.value == "2085") {
        document.frmForm.Attr_3139.value = "667";
        setProductOptionsConsumerChoice(document.frmForm.Attr_3139);
    }
      //All infinity products
    else if (elSel.value == "2185" || elSel.value == "2186" || elSel.value == "2222" || elSel.value == "2223" || elSel.value == "2231" || elSel.value == "2231" || elSel.value == "2255" || elSel.value == "2256" || elSel.value == "2257" || elSel.value == "2258" || elSel.value == "2259" || elSel.value == "2260") {
      document.frmForm.Attr_3139.value = elSel.value;
      setProductOptionsConsumerChoice(document.frmForm.Attr_3139);
    }
    else {
        document.frmForm.Attr_3139.value = "0";
    }


   
    //product bundles - pre-select calling plans
    //Unlimited UK Evening & Weekend calls
    /*if (elSel.value == "1821" || elSel.value == "1824" || elSel.value == "1825" || elSel.value == "1826" || elSel.value == "2184") {
        document.frmForm.Attr_3125.value = "845";
    }
    //Unlimited Weekend Plan
    else if (elSel.value == "2077" || elSel.value == "2083" || elSel.value == "2084" || elSel.value == "2132" || elSel.value == "2171" || elSel.value == "2185" || elSel.value == "2222" || elSel.value == "2231" || elSel.value == "2255" || elSel.value == "2258" || elSel.value == "2259") {
    document.frmForm.Attr_3125.value = "844";
    }
    //Unlimited UK Anytime calls
    else if (elSel.value == "1822" || elSel.value == "1823" || elSel.value == "2078" || elSel.value == "2085" || elSel.value == "2076" || elSel.value == "2186" || elSel.value == "2223" || elSel.value == "2256" || elSel.value == "2260") {
        document.frmForm.Attr_3125.value = "846";
    }
    else {
        document.frmForm.Attr_3125.value = "0";
    }*/

    DisplayCBCallExtraPlan(elSel);
}


function onChangeScheme(x, iAttr, iOrderNo, blIsClosedState, blIsAcquisition) {

    
    var plan = "";
    var opt = "";
    var optID = "";
    var term = "";

    switch (iAttr) {
        case 2799:
            plan = document.frmForm.Attr_1308;
            opt = document.frmForm.Attr_1309;
            term = document.frmForm.Attr_1307_Rdo;
            optID = "1308";
            break;
        case 2800:
            plan = document.frmForm.Attr_1311;
            opt = document.frmForm.Attr_1312;
            term = document.frmForm.Attr_1310_Rdo;
            optID = "1311";
            break;
        case 2801:
            plan = document.frmForm.Attr_1314;
            opt = document.frmForm.Attr_1315;
            term = document.frmForm.Attr_1313_Rdo;
            optID = "1314";
            break;
        case 2802:
            plan = document.frmForm.Attr_1317
            opt = document.frmForm.Attr_1318;
            term = document.frmForm.Attr_1316_Rdo;
            optID = "1317";
            break;
        case 2803:
            plan = document.frmForm.Attr_1320;
            opt = document.frmForm.Attr_1321;
            term = document.frmForm.Attr_1319_Rdo;
            optID = "1320";
            break;
        case 2804:
            plan = document.frmForm.Attr_2170;
            opt = document.frmForm.Attr_2171;
            term = document.frmForm.Attr_2169_Rdo;
            optID = "2170";
            break;
    }

    //set the contract term default
    if (x == 1 || x == 2 || x == 3 || x == 4 || x == 5 || x == 6) {
        term[1].checked = true;
    }
    else {
        term[0].checked = true;
    }

    //show inclusive scheme fields for 3x schemes/not
    var iAttrVal = "";
    iAttrVal = eval('document.frmForm.Attr_' + iAttr + '.value');
    DisplayInclusiveSchemeFields(iAttrVal);

    //clear options first
    for (m = plan.options.length - 1; m > 0; m--)
        plan.options[m] = null


    for (i = 0; i < arrBTPlansBaseInclHist[x].length; i++) {
        plan.options[i] = new Option(arrBTPlansBaseInclHist[x][i].text, arrBTPlansBaseInclHist[x][i].value)
    }
    

    plan.options[0].selected = true;

    //removing the option values too if scheme changes
    opt.options[0].selected = true;
    for (m = opt.options.length - 1; m > 0; m--)
        opt.options[m] = null


}

var arrBTOpts = new Array(8);
for (i = 0; i < 9; i++) {
    arrBTOpts[i] = new Array(arrBTPlansBaseInclHist[i].length)
    for (j = 0; j < arrBTPlansBaseInclHist[i].length; j++) {
        arrBTOpts[i][j] = new Array()
    }
}


arrBTOpts[0][0][0] = new Option("- - Please Select - -", "0");

//start One Plan scheme
arrBTOpts[1][0][0] = new Option("- - Please Select - -", "0");

arrBTOpts[1][1][0] = new Option("- - Please Select - -", "0");
arrBTOpts[1][1][1] = new Option("Standard", "1656");
arrBTOpts[1][1][2] = new Option("f2mcap", "915");
arrBTOpts[1][1][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[1][1][4] = new Option("IDD CAP", "1094");

arrBTOpts[1][2][0] = new Option("- - Please Select - -", "0");
arrBTOpts[1][2][1] = new Option("Standard", "1656");
arrBTOpts[1][2][2] = new Option("f2mcap", "915");
arrBTOpts[1][2][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[1][2][4] = new Option("IDD CAP", "1094");

arrBTOpts[1][3][0] = new Option("- - Please Select - -", "0");
arrBTOpts[1][3][1] = new Option("Standard", "1656");
arrBTOpts[1][3][2] = new Option("f2mcap", "915");
arrBTOpts[1][3][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[1][3][4] = new Option("IDD CAP", "1094");

arrBTOpts[1][4][0] = new Option("- - Please Select - -", "0");
arrBTOpts[1][4][1] = new Option("Standard", "1656");
arrBTOpts[1][4][2] = new Option("f2mcap", "915");
arrBTOpts[1][4][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[1][4][4] = new Option("IDD CAP", "1094");

arrBTOpts[1][5][0] = new Option("- - Please Select - -", "0");
arrBTOpts[1][5][1] = new Option("Standard", "1656");
arrBTOpts[1][5][2] = new Option("f2mcap", "915");
arrBTOpts[1][5][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[1][5][4] = new Option("IDD CAP", "1094");

arrBTOpts[1][6][0] = new Option("- - Please Select - -", "0");
arrBTOpts[1][6][1] = new Option("Standard", "1656");
arrBTOpts[1][6][2] = new Option("f2mcap", "915");
arrBTOpts[1][6][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[1][6][4] = new Option("IDD CAP", "1094");

arrBTOpts[1][7][0] = new Option("- - Please Select - -", "0");
arrBTOpts[1][7][1] = new Option("f2mcap", "915");
arrBTOpts[1][7][2] = new Option("IDD AND F2M CAP", "1093");

arrBTOpts[1][8][0] = new Option("- - Please Select - -", "0");
arrBTOpts[1][8][1] = new Option("Standard", "1656");
arrBTOpts[1][8][2] = new Option("IDD CAP", "1094");

arrBTOpts[1][9][0] = new Option("- - Please Select - -", "0");
arrBTOpts[1][9][1] = new Option("f2mcap", "915");
arrBTOpts[1][9][2] = new Option("IDD AND F2M CAP", "1093");

arrBTOpts[1][10][0] = new Option("- - Please Select - -", "0");
arrBTOpts[1][10][1] = new Option("Standard", "1656");
arrBTOpts[1][10][2] = new Option("IDD CAP", "1094");

arrBTOpts[1][11][0] = new Option("- - Please Select - -", "0");
arrBTOpts[1][11][1] = new Option("f2mcap", "915");
arrBTOpts[1][11][2] = new Option("IDD AND F2M CAP", "1093");

arrBTOpts[1][12][0] = new Option("- - Please Select - -", "0");
arrBTOpts[1][12][1] = new Option("Standard", "1656");
arrBTOpts[1][12][2] = new Option("IDD CAP", "1094");

arrBTOpts[1][13][0] = new Option("- - Please Select - -", "0");
arrBTOpts[1][13][1] = new Option("f2mcap", "915");
arrBTOpts[1][13][2] = new Option("IDD AND F2M CAP", "1093");

arrBTOpts[1][14][0] = new Option("- - Please Select - -", "0");
arrBTOpts[1][14][1] = new Option("Standard", "1656");
arrBTOpts[1][14][2] = new Option("IDD CAP", "1094");

arrBTOpts[1][15][0] = new Option("- - Please Select - -", "0");
arrBTOpts[1][15][1] = new Option("f2mcap", "915");
arrBTOpts[1][15][2] = new Option("IDD AND F2M CAP", "1093");

arrBTOpts[1][16][0] = new Option("- - Please Select - -", "0");
arrBTOpts[1][16][1] = new Option("Standard", "1656");
arrBTOpts[1][16][2] = new Option("IDD CAP", "1094");
//end One Plan scheme

//start One Plan Plus scheme
arrBTOpts[2][0][0] = new Option("- - Please Select - -", "0");

arrBTOpts[2][1][0] = new Option("- - Please Select - -", "0");
arrBTOpts[2][1][1] = new Option("Standard", "1656");
arrBTOpts[2][1][2] = new Option("f2mcap", "915");
arrBTOpts[2][1][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[2][1][4] = new Option("IDD CAP", "1094");

arrBTOpts[2][2][0] = new Option("- - Please Select - -", "0");
arrBTOpts[2][2][1] = new Option("Standard", "1656");
arrBTOpts[2][2][2] = new Option("f2mcap", "915");
arrBTOpts[2][2][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[2][2][4] = new Option("IDD CAP", "1094");

arrBTOpts[2][3][0] = new Option("- - Please Select - -", "0");
arrBTOpts[2][3][1] = new Option("Standard", "1656");
arrBTOpts[2][3][2] = new Option("f2mcap", "915");
arrBTOpts[2][3][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[2][3][4] = new Option("IDD CAP", "1094");

arrBTOpts[2][4][0] = new Option("- - Please Select - -", "0");
arrBTOpts[2][4][1] = new Option("Standard", "1656");
arrBTOpts[2][4][2] = new Option("f2mcap", "915");
arrBTOpts[2][4][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[2][4][4] = new Option("IDD CAP", "1094");

arrBTOpts[2][5][0] = new Option("- - Please Select - -", "0");
arrBTOpts[2][5][1] = new Option("Standard", "1656");
arrBTOpts[2][5][2] = new Option("f2mcap", "915");
arrBTOpts[2][5][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[2][5][4] = new Option("IDD CAP", "1094");

arrBTOpts[2][6][0] = new Option("- - Please Select - -", "0");
arrBTOpts[2][6][1] = new Option("Standard", "1656");
arrBTOpts[2][6][2] = new Option("f2mcap", "915");
arrBTOpts[2][6][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[2][6][4] = new Option("IDD CAP", "1094");

arrBTOpts[2][7][0] = new Option("- - Please Select - -", "0");
arrBTOpts[2][7][1] = new Option("f2mcap", "915");
arrBTOpts[2][7][2] = new Option("IDD AND F2M CAP", "1093");

arrBTOpts[2][8][0] = new Option("- - Please Select - -", "0");
arrBTOpts[2][8][1] = new Option("Standard", "1656");
arrBTOpts[2][8][2] = new Option("IDD CAP", "1094");

arrBTOpts[2][9][0] = new Option("- - Please Select - -", "0");
arrBTOpts[2][9][1] = new Option("f2mcap", "915");
arrBTOpts[2][9][2] = new Option("IDD AND F2M CAP", "1093");

arrBTOpts[2][10][0] = new Option("- - Please Select - -", "0");
arrBTOpts[2][10][1] = new Option("Standard", "1656");
arrBTOpts[2][10][2] = new Option("IDD CAP", "1094");

arrBTOpts[2][11][0] = new Option("- - Please Select - -", "0");
arrBTOpts[2][11][1] = new Option("f2mcap", "915");
arrBTOpts[2][11][2] = new Option("IDD AND F2M CAP", "1093");

arrBTOpts[2][12][0] = new Option("- - Please Select - -", "0");
arrBTOpts[2][12][1] = new Option("Standard", "1656");
arrBTOpts[2][12][2] = new Option("IDD CAP", "1094");

arrBTOpts[2][13][0] = new Option("- - Please Select - -", "0");
arrBTOpts[2][13][1] = new Option("f2mcap", "915");
arrBTOpts[2][13][2] = new Option("IDD AND F2M CAP", "1093");

arrBTOpts[2][14][0] = new Option("- - Please Select - -", "0");
arrBTOpts[2][14][1] = new Option("Standard", "1656");
arrBTOpts[2][14][2] = new Option("IDD CAP", "1094");

arrBTOpts[2][15][0] = new Option("- - Please Select - -", "0");
arrBTOpts[2][15][1] = new Option("f2mcap", "915");
arrBTOpts[2][15][2] = new Option("IDD AND F2M CAP", "1093");

arrBTOpts[2][16][0] = new Option("- - Please Select - -", "0");
arrBTOpts[2][16][1] = new Option("Standard", "1656");
arrBTOpts[2][16][2] = new Option("IDD CAP", "1094");
//end One Plan Plus scheme

//start One Plan Traditional scheme
arrBTOpts[3][0][0] = new Option("- - Please Select - -", "0");

arrBTOpts[3][1][0] = new Option("- - Please Select - -", "0");
arrBTOpts[3][1][1] = new Option("Standard", "1656");
arrBTOpts[3][1][2] = new Option("f2mcap", "915");
arrBTOpts[3][1][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[3][1][4] = new Option("IDD CAP", "1094");

arrBTOpts[3][2][0] = new Option("- - Please Select - -", "0");
arrBTOpts[3][2][1] = new Option("Standard", "1656");
arrBTOpts[3][2][2] = new Option("f2mcap", "915");
arrBTOpts[3][2][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[3][2][4] = new Option("IDD CAP", "1094");

arrBTOpts[3][3][0] = new Option("- - Please Select - -", "0");
arrBTOpts[3][3][1] = new Option("Standard", "1656");
arrBTOpts[3][3][2] = new Option("f2mcap", "915");
arrBTOpts[3][3][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[3][3][4] = new Option("IDD CAP", "1094");

arrBTOpts[3][4][0] = new Option("- - Please Select - -", "0");
arrBTOpts[3][4][1] = new Option("Standard", "1656");
arrBTOpts[3][4][2] = new Option("f2mcap", "915");
arrBTOpts[3][4][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[3][4][4] = new Option("IDD CAP", "1094");

arrBTOpts[3][5][0] = new Option("- - Please Select - -", "0");
arrBTOpts[3][5][1] = new Option("Standard", "1656");
arrBTOpts[3][5][2] = new Option("f2mcap", "915");
arrBTOpts[3][5][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[3][5][4] = new Option("IDD CAP", "1094");

arrBTOpts[3][6][0] = new Option("- - Please Select - -", "0");
arrBTOpts[3][6][1] = new Option("Standard", "1656");
arrBTOpts[3][6][2] = new Option("f2mcap", "915");
arrBTOpts[3][6][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[3][6][4] = new Option("IDD CAP", "1094");

arrBTOpts[3][7][0] = new Option("- - Please Select - -", "0");
arrBTOpts[3][7][1] = new Option("f2mcap", "915");
arrBTOpts[3][7][2] = new Option("IDD AND F2M CAP", "1093");

arrBTOpts[3][8][0] = new Option("- - Please Select - -", "0");
arrBTOpts[3][8][1] = new Option("Standard", "1656");
arrBTOpts[3][8][2] = new Option("IDD CAP", "1094");

arrBTOpts[3][9][0] = new Option("- - Please Select - -", "0");
arrBTOpts[3][9][1] = new Option("f2mcap", "915");
arrBTOpts[3][9][2] = new Option("IDD AND F2M CAP", "1093");

arrBTOpts[3][10][0] = new Option("- - Please Select - -", "0");
arrBTOpts[3][10][1] = new Option("Standard", "1656");
arrBTOpts[3][10][2] = new Option("IDD CAP", "1094");

arrBTOpts[3][11][0] = new Option("- - Please Select - -", "0");
arrBTOpts[3][11][1] = new Option("f2mcap", "915");
arrBTOpts[3][11][2] = new Option("IDD AND F2M CAP", "1093");

arrBTOpts[3][12][0] = new Option("- - Please Select - -", "0");
arrBTOpts[3][12][1] = new Option("Standard", "1656");
arrBTOpts[3][12][2] = new Option("IDD CAP", "1094");

arrBTOpts[3][13][0] = new Option("- - Please Select - -", "0");
arrBTOpts[3][13][1] = new Option("f2mcap", "915");
arrBTOpts[3][13][2] = new Option("IDD AND F2M CAP", "1093");

arrBTOpts[3][14][0] = new Option("- - Please Select - -", "0");
arrBTOpts[3][14][1] = new Option("Standard", "1656");
arrBTOpts[3][14][2] = new Option("IDD CAP", "1094");
//end One Plan Traditional scheme

//start One Plan Inclusive scheme
arrBTOpts[4][0][0] = new Option("- - Please Select - -", "0");

arrBTOpts[4][1][0] = new Option("- - Please Select - -", "0");
arrBTOpts[4][1][1] = new Option("Standard", "1656");
arrBTOpts[4][1][2] = new Option("f2mcap", "915");
arrBTOpts[4][1][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[4][1][4] = new Option("IDD CAP", "1094");

arrBTOpts[4][2][0] = new Option("- - Please Select - -", "0");
arrBTOpts[4][2][1] = new Option("Standard", "1656");
arrBTOpts[4][2][2] = new Option("f2mcap", "915");
arrBTOpts[4][2][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[4][2][4] = new Option("IDD CAP", "1094");

arrBTOpts[4][3][0] = new Option("- - Please Select - -", "0");
arrBTOpts[4][3][1] = new Option("Standard", "1656");
arrBTOpts[4][3][2] = new Option("f2mcap", "915");
arrBTOpts[4][3][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[4][3][4] = new Option("IDD CAP", "1094");

arrBTOpts[4][4][0] = new Option("- - Please Select - -", "0");
arrBTOpts[4][4][1] = new Option("Standard", "1656");
arrBTOpts[4][4][2] = new Option("f2mcap", "915");
arrBTOpts[4][4][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[4][4][4] = new Option("IDD CAP", "1094");

arrBTOpts[4][5][0] = new Option("- - Please Select - -", "0");
arrBTOpts[4][5][1] = new Option("Standard", "1656");
arrBTOpts[4][5][2] = new Option("f2mcap", "915");
arrBTOpts[4][5][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[4][5][4] = new Option("IDD CAP", "1094");

arrBTOpts[4][6][0] = new Option("- - Please Select - -", "0");
arrBTOpts[4][6][1] = new Option("Standard", "1656");
arrBTOpts[4][6][2] = new Option("f2mcap", "915");
arrBTOpts[4][6][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[4][6][4] = new Option("IDD CAP", "1094");
//end One Plan Inclusive scheme

//start One Plan Plus Inclusive scheme
arrBTOpts[5][0][0] = new Option("- - Please Select - -", "0");

arrBTOpts[5][1][0] = new Option("- - Please Select - -", "0");
arrBTOpts[5][1][1] = new Option("Standard", "1656");
arrBTOpts[5][1][2] = new Option("f2mcap", "915");
arrBTOpts[5][1][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[5][1][4] = new Option("IDD CAP", "1094");

arrBTOpts[5][2][0] = new Option("- - Please Select - -", "0");
arrBTOpts[5][2][1] = new Option("Standard", "1656");
arrBTOpts[5][2][2] = new Option("f2mcap", "915");
arrBTOpts[5][2][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[5][2][4] = new Option("IDD CAP", "1094");

arrBTOpts[5][3][0] = new Option("- - Please Select - -", "0");
arrBTOpts[5][3][1] = new Option("Standard", "1656");
arrBTOpts[5][3][2] = new Option("f2mcap", "915");
arrBTOpts[5][3][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[5][3][4] = new Option("IDD CAP", "1094");

arrBTOpts[5][4][0] = new Option("- - Please Select - -", "0");
arrBTOpts[5][4][1] = new Option("Standard", "1656");
arrBTOpts[5][4][2] = new Option("f2mcap", "915");
arrBTOpts[5][4][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[5][4][4] = new Option("IDD CAP", "1094");

arrBTOpts[5][5][0] = new Option("- - Please Select - -", "0");
arrBTOpts[5][5][1] = new Option("Standard", "1656");
arrBTOpts[5][5][2] = new Option("f2mcap", "915");
arrBTOpts[5][5][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[5][5][4] = new Option("IDD CAP", "1094");

arrBTOpts[5][6][0] = new Option("- - Please Select - -", "0");
arrBTOpts[5][6][1] = new Option("Standard", "1656");
arrBTOpts[5][6][2] = new Option("f2mcap", "915");
arrBTOpts[5][6][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[5][6][4] = new Option("IDD CAP", "1094");
//end One Plan Plus Inclusive scheme

//start One Plan Traditional Inclusive scheme
arrBTOpts[6][0][0] = new Option("- - Please Select - -", "0");

arrBTOpts[6][1][0] = new Option("- - Please Select - -", "0");
arrBTOpts[6][1][1] = new Option("Standard", "1656");
arrBTOpts[6][1][2] = new Option("f2mcap", "915");
arrBTOpts[6][1][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[6][1][4] = new Option("IDD CAP", "1094");

arrBTOpts[6][2][0] = new Option("- - Please Select - -", "0");
arrBTOpts[6][2][1] = new Option("Standard", "1656");
arrBTOpts[6][2][2] = new Option("f2mcap", "915");
arrBTOpts[6][2][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[6][2][4] = new Option("IDD CAP", "1094");

arrBTOpts[6][3][0] = new Option("- - Please Select - -", "0");
arrBTOpts[6][3][1] = new Option("Standard", "1656");
arrBTOpts[6][3][2] = new Option("f2mcap", "915");
arrBTOpts[6][3][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[6][3][4] = new Option("IDD CAP", "1094");

arrBTOpts[6][4][0] = new Option("- - Please Select - -", "0");
arrBTOpts[6][4][1] = new Option("Standard", "1656");
arrBTOpts[6][4][2] = new Option("f2mcap", "915");
arrBTOpts[6][4][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[6][4][4] = new Option("IDD CAP", "1094");

arrBTOpts[6][5][0] = new Option("- - Please Select - -", "0");
arrBTOpts[6][5][1] = new Option("Standard", "1656");
arrBTOpts[6][5][2] = new Option("f2mcap", "915");
arrBTOpts[6][5][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[6][5][4] = new Option("IDD CAP", "1094");

arrBTOpts[6][6][0] = new Option("- - Please Select - -", "0");
arrBTOpts[6][6][1] = new Option("Standard", "1656");
arrBTOpts[6][6][2] = new Option("f2mcap", "915");
arrBTOpts[6][6][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[6][6][4] = new Option("IDD CAP", "1094");

arrBTOpts[6][7][0] = new Option("- - Please Select - -", "0");
arrBTOpts[6][7][1] = new Option("Standard", "1656");
arrBTOpts[6][7][2] = new Option("f2mcap", "915");
arrBTOpts[6][7][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[6][7][4] = new Option("IDD CAP", "1094");
//end One Plan Plus Traditional scheme

//start BT Business Rewards scheme
arrBTOpts[7][0][0] = new Option("- - Please Select - -", "0");

arrBTOpts[7][1][0] = new Option("- - Please Select - -", "0");
arrBTOpts[7][1][1] = new Option("Standard", "1656");
arrBTOpts[7][1][2] = new Option("f2mcap", "915");
arrBTOpts[7][1][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[7][1][4] = new Option("IDD CAP", "1094");

arrBTOpts[7][2][0] = new Option("- - Please Select - -", "0");
arrBTOpts[7][2][1] = new Option("Standard", "1656");
arrBTOpts[7][2][2] = new Option("f2mcap", "915");
arrBTOpts[7][2][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[7][2][4] = new Option("IDD CAP", "1094");

arrBTOpts[7][3][0] = new Option("- - Please Select - -", "0");
arrBTOpts[7][3][1] = new Option("Standard", "1656");
arrBTOpts[7][3][2] = new Option("f2mcap", "915");
arrBTOpts[7][3][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[7][3][4] = new Option("IDD CAP", "1094");

arrBTOpts[7][4][0] = new Option("- - Please Select - -", "0");
arrBTOpts[7][4][1] = new Option("Standard", "1656");
arrBTOpts[7][4][2] = new Option("f2mcap", "915");
arrBTOpts[7][4][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[7][4][4] = new Option("IDD CAP", "1094");

arrBTOpts[7][5][0] = new Option("- - Please Select - -", "0");
arrBTOpts[7][5][1] = new Option("Standard", "1656");
arrBTOpts[7][5][2] = new Option("f2mcap", "915");
arrBTOpts[7][5][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[7][5][4] = new Option("IDD CAP", "1094");

arrBTOpts[7][6][0] = new Option("- - Please Select - -", "0");
arrBTOpts[7][6][1] = new Option("Standard", "1656");
arrBTOpts[7][6][2] = new Option("f2mcap", "915");
arrBTOpts[7][6][3] = new Option("IDD AND F2M CAP", "1093");
arrBTOpts[7][6][4] = new Option("IDD CAP", "1094");
//end BT Business Rewards scheme

//start Business Plan scheme
arrBTOpts[8][0][0] = new Option("- - Please Select - -", "0");

arrBTOpts[8][1][0] = new Option("- - Please Select - -", "0");
arrBTOpts[8][1][1] = new Option("Standard", "1656");
arrBTOpts[8][1][2] = new Option("f2mcap", "915");

arrBTOpts[8][2][0] = new Option("- - Please Select - -", "0");
arrBTOpts[8][2][1] = new Option("Standard", "1656");
arrBTOpts[8][2][2] = new Option("f2mcap", "915");

arrBTOpts[8][3][0] = new Option("- - Please Select - -", "0");
arrBTOpts[8][3][1] = new Option("Standard", "1656");
arrBTOpts[8][3][2] = new Option("f2mcap", "915");

arrBTOpts[8][4][0] = new Option("- - Please Select - -", "0");
arrBTOpts[8][4][1] = new Option("Standard", "1656");
arrBTOpts[8][4][2] = new Option("f2mcap", "915");

arrBTOpts[8][5][0] = new Option("- - Please Select - -", "0");
arrBTOpts[8][5][1] = new Option("Standard", "1656");
arrBTOpts[8][5][2] = new Option("f2mcap", "915");

arrBTOpts[8][6][0] = new Option("- - Please Select - -", "0");
arrBTOpts[8][6][1] = new Option("Standard", "1656");
arrBTOpts[8][6][2] = new Option("f2mcap", "915");

arrBTOpts[8][7][0] = new Option("- - Please Select - -", "0");
arrBTOpts[8][7][1] = new Option("Standard", "1656");
arrBTOpts[8][7][2] = new Option("f2mcap", "915");

arrBTOpts[8][8][0] = new Option("- - Please Select - -", "0");
arrBTOpts[8][8][1] = new Option("Standard", "1656");
arrBTOpts[8][8][2] = new Option("f2mcap", "915");

arrBTOpts[8][9][0] = new Option("- - Please Select - -", "0");
arrBTOpts[8][9][1] = new Option("Standard", "1656");
arrBTOpts[8][9][2] = new Option("f2mcap", "915");

arrBTOpts[8][10][0] = new Option("- - Please Select - -", "0");
arrBTOpts[8][10][1] = new Option("Standard", "1656");
arrBTOpts[8][10][2] = new Option("f2mcap", "915");

arrBTOpts[8][11][0] = new Option("- - Please Select - -", "0");
arrBTOpts[8][11][1] = new Option("Standard", "1656");
arrBTOpts[8][11][2] = new Option("f2mcap", "915");

arrBTOpts[8][12][0] = new Option("- - Please Select - -", "0");
arrBTOpts[8][12][1] = new Option("Standard", "1656");
arrBTOpts[8][12][2] = new Option("f2mcap", "915");

arrBTOpts[8][13][0] = new Option("- - Please Select - -", "0");
arrBTOpts[8][13][1] = new Option("Standard", "1656");
arrBTOpts[8][13][2] = new Option("f2mcap", "915");
//end Business Plan scheme

function onChangePlan(y, iAttr, iOrderNo, blIsClosedState, blIsAcquisition) {

    var scheme = "";
    var opt = "";

    switch (iAttr) {
        case 1308:
            scheme = document.frmForm.Attr_2799;
            opt = document.frmForm.Attr_1309;
            break;
        case 1311:
            scheme = document.frmForm.Attr_2800;
            opt = document.frmForm.Attr_1312;
            break;
        case 1314:
            scheme = document.frmForm.Attr_2801;
            opt = document.frmForm.Attr_1315;
            break;
        case 1317:
            scheme = document.frmForm.Attr_2802;
            opt = document.frmForm.Attr_1318;
            break;
        case 1320:
            scheme = document.frmForm.Attr_2803;
            opt = document.frmForm.Attr_1321;
            break;
        case 2170:
            scheme = document.frmForm.Attr_2804;
            opt = document.frmForm.Attr_2171;
            break;
    }

    for (m = opt.options.length - 1; m > 0; m--)
        opt.options[m] = null

    for (i = 0; i < arrBTOpts[scheme.options.selectedIndex][y].length; i++) {
        opt.options[i] = new Option(arrBTOpts[scheme.options.selectedIndex][y][i].text, arrBTOpts[scheme.options.selectedIndex][y][i].value)

        //default to IDD & F2M Cap - &pound;5k plans have this value at different array levels, so dynamically pick per option value match
        if (opt.options[i].value == "1093") {
            opt.options[i].selected = true;
        }
    }
}
//end 


//helper element functions

function GetElLstVal(elLst) {
    return elLst.options(elLst.selectedIndex).value;
}

function SetTextboxIfEmpty(el, val1, val2) { 
    if(el.value == '')
        SetTextbox(el, val1, val2);
}
function SetTextbox(el, val1, val2) { 
    el.value = val1 + val2;
}


//specific javascript functions
//opal
function SetDefaultPassword() {

    var el = document.frmForm.Attr_2866;      //password el
    var elTxt = document.frmForm.Attr_2854;   //surname el
    //var elLst = document.frmForm.Start_2858_Year;   //DoB el

    //SetTextboxIfEmpty(el, elTxt.value, GetElLstVal(elLst));
    SetTextboxIfEmpty(el, elTxt.value, "");
}

//opal - check min length of customer pwd
function OpalCheckCustPwd() {

    var pwd = document.frmForm.Attr_2866;      //password el
    var alphanum = /^([a-zA-Z0-9_-]+)$/; //This contains a to z , 0 to 9 and A to Z
    var minLength = 8; // Minimum length

    if (pwd.value.match(alphanum)) {
        // check for minimum length
        if (pwd.value.length < minLength) {
            alert("Your password must be at least " + minLength + " characters long. Try again.");
            pwd.focus();
            return false;
        } else { return true; }
    } else {
        alert("Your password must be a minimum of " + minLength + " alphanumeric characters only.");
        pwd.focus();
        return false;
    }
}


//opal - sets billing address to same as the location of line address
function SetBillingAddress(elSel) {

    var elNo = "238";

    if (elSel.value == elNo) {
        document.getElementById("OpalBillAddress1").style.display = "block";
        document.getElementById("OpalBillAddress2").style.display = "block";
        document.getElementById("OpalBillAddress3").style.display = "block";
        document.getElementById("OpalBillTown").style.display = "block";
        document.getElementById("OpalBillCounty").style.display = "block";
        document.getElementById("OpalBillPCode").style.display = "block";
    }
    else {
        document.getElementById("OpalBillAddress1").style.display = "none";
        document.getElementById("OpalBillAddress2").style.display = "none";
        document.getElementById("OpalBillAddress3").style.display = "none";
        document.getElementById("OpalBillTown").style.display = "none";
        document.getElementById("OpalBillCounty").style.display = "none";
        document.getElementById("OpalBillPCode").style.display = "none";
    }
}

//opal - sets fields for new line/existing line
function DisplayOpalOrderType(elSel) {

    var_New = "1956";
    var_Exist = "1957";

    if (elSel.value == var_New) {
        document.getElementById("OpalNewLinePC").style.display = "block";
        document.getElementById("OpalExistLineTelNo").style.display = "none";
        document.getElementById("OpalExistLineMAC").style.display = "none";
    } else if (elSel.value == var_Exist) {
        document.getElementById("OpalNewLinePC").style.display = "none";
        document.getElementById("OpalExistLineTelNo").style.display = "block";
        document.getElementById("OpalExistLineMAC").style.display = "block";
    } else {
        document.getElementById("OpalNewLinePC").style.display = "none";
        document.getElementById("OpalExistLineTelNo").style.display = "none";
        document.getElementById("OpalExistLineMAC").style.display = "none";
    }

}

function DisplayOpalCareLevel(elSel) {

    var_LineOnly = "1973";

    if (elSel.value == var_LineOnly) {
        document.getElementById("OpalCareLevel").style.display = "block";
    } else {
        document.getElementById("OpalCareLevel").style.display = "none";
    }
    
}

function CheckTalkSurfPlus(elSel) {

    var counter = 0;
    document.frmForm.btnForm.disabled = false;
    document.frmForm.btnSaveOrder.disabled = false;

    //only allow 2 viewing packs for this Talk & Surf Plus
    //27-08-2010: Introduce ESPN (2175) as free option so don't count it
    if (document.frmForm.Attr_2978.value == "2084" || document.frmForm.Attr_2978.value == "2132" || document.frmForm.Attr_2978.value == "2231") {
      for (i = 0; i < document.frmForm.Attr_2980_chk.length; i++) {
       
          if (document.frmForm.Attr_2980_chk[i].checked && document.frmForm.Attr_2980_chk[i].value != "2175") {
                counter = counter + 1;
            }
        }

        if (counter > 2) {
          alert("Only 2 viewing packs, excluding ESPN, is allowed for '" + document.frmForm.Attr_2978[document.frmForm.Attr_2978.selectedIndex].text + "'.");
            counter = 0;
            document.frmForm.btnForm.disabled = true;
            document.frmForm.btnSaveOrder.disabled = true;
        }
    }
}

function CheckVNQOSBroadband(elSel, siteID, orderID) {

    var_CustSupplied = "2111";
    var approved = eval('document.frmForm.CustReqTotal_' + orderID + '_' + siteID + '_110');

    if (elSel.value == var_CustSupplied) {
        //var install = eval('document.frmForm.CustReqTotal_' + orderID + '_' + siteID + '_108');
        //var monthly = eval('document.frmForm.CustReqTotal_' + orderID + '_' + siteID + '_109');
        

        //install.value = 0;
        //monthly.value = 0;
        approved.value = 237;
    }
    else {
        approved.value = 238;
    }
}

function ResetVNService(dbService, orderID) {

    if (orderID > 0) {
        document.frmForm.Attr_3409.value = dbService;
    }

    setVNContractPeriod(document.frmForm.Attr_3409);
}

function CheckVNNoOfSites(iNoOfSites, dbNoOfSites) {

    if (iNoOfSites.value < dbNoOfSites) {
        alert("Please use the red cross button next to the site you wish to delete. You can add more sites here but not delete.")
        document.frmForm.Attr_3412_Int.value = dbNoOfSites;
        document.frmForm.Attr_3412_Int.focus();
    }
}

var arrVNContract = new Array();
arrVNContract[0] = '2095'
arrVNContract[1] = '12 months'
arrVNContract[2] = '2136'
arrVNContract[3] = '24 months'
arrVNContract[4] = '2096'
arrVNContract[5] = '36 months'
arrVNContract[6] = '2135'
arrVNContract[7] = '48 months'
arrVNContract[8] = '2097'
arrVNContract[9] = '60 months'

var arrVNService = new Array();
arrVNService[0] = new setMultiArray('2093', arrVNContract[0], arrVNContract[1]);

arrVNService[1] = new setMultiArray('2094', arrVNContract[2], arrVNContract[3]);
arrVNService[2] = new setMultiArray('2094', arrVNContract[4], arrVNContract[5]);
arrVNService[3] = new setMultiArray('2094', arrVNContract[6], arrVNContract[7]);
arrVNService[4] = new setMultiArray('2094', arrVNContract[8], arrVNContract[9]);


function setVNContractPeriod(elLst) {
    var strHTML;
    var sSelected;
    var blSelectedComplete;
    blSelectedComplete = false;
    var blSelectedConnect;
    blSelectedConnect = false;

    if (elLst.options(elLst.selectedIndex).value == "2094") {
        blSelectedComplete = true
    }
    else if (elLst.options(elLst.selectedIndex).value == "2093") {
        blSelectedConnect = true
    }

    strHTML = '<select name="Attr_3410" class="SelectBox"><option value="0">--Please select--</option>';

    for (i = 0; i < arrVNService.length; i++) {
	sSelected = "";
        //set default to 60 mnths for VNComplete
        if (blSelectedComplete && i == 4) {
            sSelected = " selected ";
        //set default to 12 months for VNConnect
        } else if (blSelectedConnect && i == 0) {
            sSelected = " selected ";
        }

        if (arrVNService[i].parentValue == elLst.options(elLst.selectedIndex).value) {
            strHTML += '<option value="' + arrVNService[i].value + '"' + sSelected + '>' + arrVNService[i].text + '</option>';
        }
    }

    strHTML += '</select>';
    
    tdInner_3410.innerHTML = strHTML;
}

//Voicenet: cost per seat calc
function calcVNCostPerSeat(iNoOfSites, iOrderID) {

    var iTotal = 0;
    var FinalTotal = 0;

    for (i = 1; i <= iNoOfSites; i++) {
        var iNoOfSeats = document.getElementById('Number of Seats_' + iOrderID + '_' + i).value;

        iTotal += iNoOfSeats-0;
    }

    var iPrice = eval('document.frmForm.ReqVal_' + iOrderID + '_57');
    var totalField = eval('document.frmForm.CustReqTotal_' + iOrderID + '_1_57');

    if (iPrice.value == "")
        iPrice.value = 0;

    if (iPrice.value > 0) {
        FinalTotal = iPrice.value * iTotal;
    }

    totalField.value = FinalTotal;
    totalField.focus();
}


//create custom method for Strings - counts the number of times a letter is matched in a String value
String.prototype.count = function(k) {

    var res = this.split(k);
    if (res == null) { return 0; }
     return res.length - 1;
 }

//global variables
var letters = ' ABCÇDEFGHIJKLMNÑOPQRSTUVWXYZabcçdefghijklmnñopqrstuvwxyzàáÀÁéèÈÉíìÍÌïÏóòÓÒúùÚÙüÜ'
var numbers = '1234567890'
var signs = ',.:;@-\''
var mathsigns = '+-=()*/'
var custom = '<>#$%&?¿'
var point = ".";

//generic handler function - e.g invoking call onkeypress='Javascript:return CheckVNInputType(event,this,2112);'
function CheckVNInputType(e, el, iValType) {

    var k;
    k = document.all ? parseInt(e.keyCode) : parseInt(e.which);

    switch (iValType) {
        case 2112:
            return validateKey(k, numbers);
            break;
        case 2113:
            return validateCost(k, el);
            break;
        default:
            return validateKey(k, letters + numbers + signs + mathsigns + custom);
    }
}

//generic key validator
function validateKey(k, allow) {
    return (allow.indexOf(String.fromCharCode(k)) != -1);
}

//validate Cost - alerts, etc in here
function validateCost(k, el) {
    var t = validateKey(k, numbers + point);
    var nPoints = 0;
    var v = el.value;
    var v2 = v + String.fromCharCode(k); //value with key pressed 

    if (t) {
        nPoints = v2.count(point);

        //check number of points
        if (nPoints > 1) {
            alert('Cannot have multiple decimal points in Cost value');
            return false;
        }

        //check 2 decimal places
        if (v.indexOf(point) > -1) {
            if ((v.length - v.indexOf(point) > 2)) {
                alert('Cost value can only go to a maximum of 2 decimal places');
                return false;
            }
        }
        return t;
    } else {
        return t;
    }
}

//Start DT Primus Validation
var primusValidators = new Array()
var stdError = "";

//create new primus array
function setPrimusArray(fieldName, optValue, blProceed, msg) {

    this.fieldName = fieldName;
    this.optValue = optValue;
    this.blProceed = blProceed;
    this.errorMsg = msg;
}

//Active phone line
//=================    
//common error msg for this question
stdError = "Why cant I switch?\nIf you’re phone line is not currently connected or active, please contact BT directly on 0800 028 4474 and get your phone line reconnected or installed. There may be a charge for this.";

//possible options
primusValidators[0] = new setPrimusArray("Attr_3426", "2120", true, "");  //Yes I can make calls from this number
primusValidators[1] = new setPrimusArray("Attr_3426", "2121", false, stdError); //No I cannot make calls from this number
primusValidators[2] = new setPrimusArray("Attr_3426", "2122", false, stdError); //No I have just moved into the property

//Current phone provider
//======================
stdError = "Why cant I switch?\nIn order to switch your home phone service, you need an active BT phone line. Please contact BT directly on 0800 028 4474 and get your phone line reconnected or installed. There may be a charge for this.";

//possible options
primusValidators[3] = new setPrimusArray("Attr_3427", "2123", true, "");  //BT
primusValidators[4] = new setPrimusArray("Attr_3427", "2124", false, "Why cant I switch?\nIn order to switch your home phone service, you need" +
        " to ring BT directly on 0800 800 150 and arrange to be removed from the BT Light User Scheme. Once you have confirmation that BT has" +
        " removed you from the Light User Scheme you will be able to proceed with your switch."); //BT Light User
primusValidators[5] = new setPrimusArray("Attr_3427", "2125", false, stdError); //Virgin Media
primusValidators[6] = new setPrimusArray("Attr_3427", "2126", false, stdError); //Sky
primusValidators[7] = new setPrimusArray("Attr_3427", "2127", false, stdError); //TalkTalk
primusValidators[8] = new setPrimusArray("Attr_3427", "2128", false, stdError); //Tiscali
primusValidators[9] = new setPrimusArray("Attr_3427", "2129", true, ""); //Other

//Please confirm that you are authorised to set up direct debit on this account.
primusValidators[10] = new setPrimusArray("Attr_3436_Rdo", "237", true, ""); //Yes
primusValidators[11] = new setPrimusArray("Attr_3436_Rdo", "238", false, "Why cant I switch?\nYou must confirm you are authorised to" +
        " set up a direct debit on the account specified."); //No

//validation method to check the option selected will enable an order to be placed. 
function validateSelection(e) //e==input control
{
    var name = e.name;
    var value = "";

    if (e.type == "select-one")
        value = e.options(e.selectedIndex).value;
    else if (e.type == "radio") {
        value = e.value;
    }

    for (var i = 0; i < primusValidators.length; i++) {
        if (name == primusValidators[i].fieldName && value == primusValidators[i].optValue) {
            document.frmForm.btnForm.disabled = !primusValidators[i].blProceed;
            if (!primusValidators[i].blProceed) { alert(primusValidators[i].errorMsg) }
            break;
        }
    }
}
//End DT Primus Validation

//plusnet filtering of the router options as per the contract type
var arrPNRouter = new Array();
arrPNRouter[0] = '1598'
arrPNRouter[1] = 'No thanks'
arrPNRouter[2] = '1599'
arrPNRouter[3] = 'Wireless Router - FREE'
arrPNRouter[4] = '1600'
arrPNRouter[5] = 'Wired Router - FREE'
arrPNRouter[6] = '2144'
arrPNRouter[7] = 'Wireless Router - &pound;40'
arrPNRouter[8] = '2145'
arrPNRouter[9] = 'Wired Router - &pound;20'

var arrPNContract = new Array();
arrPNContract[0] = new setMultiArray('2138', arrPNRouter[0], arrPNRouter[1]);
arrPNContract[1] = new setMultiArray('2138', arrPNRouter[2], arrPNRouter[3]);
arrPNContract[2] = new setMultiArray('2138', arrPNRouter[4], arrPNRouter[5]);

arrPNContract[3] = new setMultiArray('2139', arrPNRouter[0], arrPNRouter[1]);
arrPNContract[4] = new setMultiArray('2139', arrPNRouter[6], arrPNRouter[7]);
arrPNContract[5] = new setMultiArray('2139', arrPNRouter[8], arrPNRouter[9]);

function setPNRouterOpts(elLst) {
    var strHTML;

    strHTML = '<select name="Attr_2677" class="SelectBox"><option value="0">--Please select--</option>';

    for (i = 0; i < arrPNContract.length; i++) {
        
        if (arrPNContract[i].parentValue == elLst.options(elLst.selectedIndex).value) {
            strHTML += '<option value="' + arrPNContract[i].value + '">' + arrPNContract[i].text + '</option>';
        }
    }

    strHTML += '</select>';

    tdInner_2677.innerHTML = strHTML;
}

function DuplicateVNMainContact() {
    document.frmForm.Attr_3402.value = document.frmForm.Attr_3328.value;
    document.frmForm.Attr_3403.value = document.frmForm.Attr_3329.value;
    document.frmForm.Attr_3404.value = document.frmForm.Attr_3330.value;
    document.frmForm.Attr_3405.value = document.frmForm.Attr_3331.value;
    document.frmForm.Attr_3406.value = document.frmForm.Attr_3332.value;
    document.frmForm.Attr_3407.value = document.frmForm.Attr_3333.value;
}

function DisplayCBCallExtraPlan(elSel) {

    if (elSel.value == "2076" || elSel.value == "2077" || elSel.value == "2084" || elSel.value == "2132" || elSel.value == "2255" || elSel.value == "2258" || elSel.value == "2259") {
        document.getElementById("CBCallExtraPlan").style.display = "none";
    } else {
        document.getElementById("CBCallExtraPlan").style.display = "none";
    }

}

function DisplayBBFibreAppSlots(elSel) {

    if (elSel.value == "2062" || elSel.value == "2063" || elSel.value == "2277") {
        document.getElementById("BBFibreAppSlots").style.display = "block";
    } else {
        document.getElementById("BBFibreAppSlots").style.display = "none";
    }
}

function DisplayBBVASProducts(elSel) {

    if (elSel.value == "237") {
        document.getElementById("BBVASProducts").style.display = "block";
        document.getElementById("BBVASProductsExtra").style.display = "block";
    } else {
        document.getElementById("BBVASProducts").style.display = "none";
        document.getElementById("BBVASProductsExtra").style.display = "none";
    }
}

function CheckNumRange(el, min, max) {

    if (el) {
       
        if (el.value.length > 0) {
            if (!isNaN(el.value)) {
                if (el.value < min) {
                    alert("A minimum value of " + min + " has been set for this field");
                    el.value = 1;
                    el.focus();
                }
                if (el.value > max) {
                    alert("A max value of " + max + " has been set for this field");
                    el.value = max;
                    el.focus();
                }
            }
            else {
                alert("Please enter a numeric value.");
                el.value = "";
                el.focus();
            } 
        }
       
    }
}

function DisplayBBMarketingQuestions(elSel) {

    if (elSel.value == "237") {
        document.getElementById("BBMarketingBuyOnline").style.display = "block";
        document.getElementById("BBMarketingOtherQues").style.display = "block";
        document.getElementById("BBMarketingExclOffer").style.display = "block";
        document.getElementById("BBMarketingCompetitor").style.display = "block";

        if (document.frmForm.Attr_3611_Rdo[1].checked)
            document.getElementById("BBMarketingMoreQues").style.display = "block";

        if (document.frmForm.Attr_3614_Rdo[1].checked)
            document.getElementById("BBMarketingCompQues").style.display = "block";
    } else {
        document.getElementById("BBMarketingBuyOnline").style.display = "none";
        document.getElementById("BBMarketingOtherQues").style.display = "none";
        document.getElementById("BBMarketingExclOffer").style.display = "none";
        document.getElementById("BBMarketingCompetitor").style.display = "none";
        document.getElementById("BBMarketingMoreQues").style.display = "none";
        document.getElementById("BBMarketingCompQues").style.display = "none";
    }
}

function DisplayBBMarketingMoreQuestions(elSel) {

    if (elSel.value == "237") {
        document.getElementById("BBMarketingMoreQues").style.display = "block";
    } else {
        document.getElementById("BBMarketingMoreQues").style.display = "none";
    }
}

function DisplayBBMarketingCompetitor(elSel) {

    if (elSel.value == "237") {
        document.getElementById("BBMarketingCompQues").style.display = "block";
    } else {
        document.getElementById("BBMarketingCompQues").style.display = "none";
    }
}

function DisplaySLExtendedInfo(elSel) {

    if (elSel.value == "237") {
        document.getElementById("SLNoOfEmployees").style.display = "block";
        document.getElementById("SLNoOfSeats").style.display = "block";
        document.getElementById("SLNoOfLocations").style.display = "block";
        document.getElementById("SLLines").style.display = "block";
        document.getElementById("SLCallSpend").style.display = "block";
        document.getElementById("SLAnnualSpend").style.display = "block";
        document.getElementById("SLBroadband").style.display = "block";
        document.getElementById("SLNetwork").style.display = "block";
        document.getElementById("SLSwitch").style.display = "block";
        document.getElementById("SLMobile").style.display = "block";
        document.getElementById("SLMobileNo").style.display = "block";
        document.getElementById("SLMobileOp").style.display = "block";
        document.getElementById("SLHostedVoip").style.display = "block";
        document.getElementById("SLHostedApp").style.display = "block";
        document.getElementById("SLInterests").style.display = "block";
        document.getElementById("SLBreak1").style.display = "block";
        document.getElementById("SLBreak2").style.display = "block";
        document.getElementById("SLBreak3").style.display = "block";
        document.getElementById("SLBreak4").style.display = "block";
    } else {
        document.getElementById("SLNoOfEmployees").style.display = "none";
        document.getElementById("SLNoOfSeats").style.display = "none";
        document.getElementById("SLNoOfLocations").style.display = "none";
        document.getElementById("SLLines").style.display = "none";
        document.getElementById("SLCallSpend").style.display = "none";
        document.getElementById("SLAnnualSpend").style.display = "none";
        document.getElementById("SLBroadband").style.display = "none";
        document.getElementById("SLNetwork").style.display = "none";
        document.getElementById("SLSwitch").style.display = "none";
        document.getElementById("SLMobile").style.display = "none";
        document.getElementById("SLMobileNo").style.display = "none";
        document.getElementById("SLMobileOp").style.display = "none";
        document.getElementById("SLHostedVoip").style.display = "none";
        document.getElementById("SLHostedApp").style.display = "none";
        document.getElementById("SLInterests").style.display = "none";
        document.getElementById("SLBreak1").style.display = "none";
        document.getElementById("SLBreak2").style.display = "none";
        document.getElementById("SLBreak3").style.display = "none";
        document.getElementById("SLBreak4").style.display = "none";
    }
}

function DisplayBusPSTN_CreditVet(elSel) {

    if (elSel.value == "237") {
        document.getElementById("BusPSTNExistNo").style.display = "none";
        document.getElementById("BusPSTNCVHeader").style.display = "block";
        document.getElementById("BusPSTNCDHeader").style.display = "block";
        document.getElementById("BusPSTNCompanyName").style.display = "block";
        document.getElementById("BusPSTNLimitedCompany").style.display = "block";
        document.getElementById("BusPSTNCompanyReg").style.display = "block";
        document.getElementById("BusPSTNFormationDate").style.display = "block";
        document.getElementById("BusPSTNDDHeader").style.display = "block";
        document.getElementById("BusPSTNTitle").style.display = "block";
        document.getElementById("BusPSTNName").style.display = "block";
        document.getElementById("BusPSTNDOB").style.display = "block";
        document.getElementById("BusPSTNAddr1").style.display = "block";
        document.getElementById("BusPSTNAddr2").style.display = "block";
        document.getElementById("BusPSTNAddr3").style.display = "block";
        document.getElementById("BusPSTNCity").style.display = "block";
        document.getElementById("BusPSTNCounty").style.display = "block";
        document.getElementById("BusPSTNPCode").style.display = "block";
        document.getElementById("BusPSTNTel").style.display = "block";
        document.getElementById("BusPSTNTimeAtAddr").style.display = "block";
        document.getElementById("BusPSTNPAHeader").style.display = "block";
        document.getElementById("BusPSTNPAddr1").style.display = "block";
        document.getElementById("BusPSTNPAddr2").style.display = "block";
        document.getElementById("BusPSTNPAddr3").style.display = "block";
        document.getElementById("BusPSTNPCity").style.display = "block";
        document.getElementById("BusPSTNPCounty").style.display = "block";
        document.getElementById("BusPSTNPPCode").style.display = "block";
        document.getElementById("BusPSTNPTel").style.display = "block";
        document.getElementById("BusPSTNPTimeAtAddr").style.display = "block";
    } else {
        document.getElementById("BusPSTNExistNo").style.display = "block";
        document.getElementById("BusPSTNCVHeader").style.display = "none";
        document.getElementById("BusPSTNCDHeader").style.display = "none";
        document.getElementById("BusPSTNCompanyName").style.display = "none";
        document.getElementById("BusPSTNLimitedCompany").style.display = "none";
        document.getElementById("BusPSTNCompanyReg").style.display = "none";
        document.getElementById("BusPSTNFormationDate").style.display = "none";
        document.getElementById("BusPSTNDDHeader").style.display = "none";
        document.getElementById("BusPSTNTitle").style.display = "none";
        document.getElementById("BusPSTNName").style.display = "none";
        document.getElementById("BusPSTNDOB").style.display = "none";
        document.getElementById("BusPSTNAddr1").style.display = "none";
        document.getElementById("BusPSTNAddr2").style.display = "none";
        document.getElementById("BusPSTNAddr3").style.display = "none";
        document.getElementById("BusPSTNCity").style.display = "none";
        document.getElementById("BusPSTNCounty").style.display = "none";
        document.getElementById("BusPSTNPCode").style.display = "none";
        document.getElementById("BusPSTNTel").style.display = "none";
        document.getElementById("BusPSTNTimeAtAddr").style.display = "none";
        document.getElementById("BusPSTNPAHeader").style.display = "none";
        document.getElementById("BusPSTNPAddr1").style.display = "none";
        document.getElementById("BusPSTNPAddr2").style.display = "none";
        document.getElementById("BusPSTNPAddr3").style.display = "none";
        document.getElementById("BusPSTNPCity").style.display = "none";
        document.getElementById("BusPSTNPCounty").style.display = "none";
        document.getElementById("BusPSTNPPCode").style.display = "none";
        document.getElementById("BusPSTNPTel").style.display = "none";
        document.getElementById("BusPSTNPTimeAtAddr").style.display = "none";
    }
}

function DisplayBusPSTN_PrevAddr(elSel) {

    if (elSel.value < 3) {
        document.getElementById("BusPSTNPAHeader").style.display = "block";
        document.getElementById("BusPSTNPAddr1").style.display = "block";
        document.getElementById("BusPSTNPAddr2").style.display = "block";
        document.getElementById("BusPSTNPAddr3").style.display = "block";
        document.getElementById("BusPSTNPCity").style.display = "block";
        document.getElementById("BusPSTNPCounty").style.display = "block";
        document.getElementById("BusPSTNPPCode").style.display = "block";
        document.getElementById("BusPSTNPTel").style.display = "block";
        document.getElementById("BusPSTNPTimeAtAddr").style.display = "block";
    } else {
        document.getElementById("BusPSTNPAHeader").style.display = "none";
        document.getElementById("BusPSTNPAddr1").style.display = "none";
        document.getElementById("BusPSTNPAddr2").style.display = "none";
        document.getElementById("BusPSTNPAddr3").style.display = "none";
        document.getElementById("BusPSTNPCity").style.display = "none";
        document.getElementById("BusPSTNPCounty").style.display = "none";
        document.getElementById("BusPSTNPPCode").style.display = "none";
        document.getElementById("BusPSTNPTel").style.display = "none";
        document.getElementById("BusPSTNPTimeAtAddr").style.display = "none";
    }
}

function DisplayBusPSTN_NewPremises(elSel) {

    if (elSel.value == "237") {
        document.getElementById("BusPSTNNPAddr1").style.display = "block";
        document.getElementById("BusPSTNNPAddr2").style.display = "block";
        document.getElementById("BusPSTNNPAddr3").style.display = "block";
        document.getElementById("BusPSTNNPCity").style.display = "block";
        document.getElementById("BusPSTNNPCounty").style.display = "block";
        document.getElementById("BusPSTNNPPCode").style.display = "block";
    } else {
        document.getElementById("BusPSTNNPAddr1").style.display = "none";
        document.getElementById("BusPSTNNPAddr2").style.display = "none";
        document.getElementById("BusPSTNNPAddr3").style.display = "none";
        document.getElementById("BusPSTNNPCity").style.display = "none";
        document.getElementById("BusPSTNNPCounty").style.display = "none";
        document.getElementById("BusPSTNNPPCode").style.display = "none";
    }
}

function DisplayBusPSTN_BillingNewAddr(elSel) {

    if (elSel.value == "616") {
        document.getElementById("BusPSTNBillAddr1").style.display = "block";
        document.getElementById("BusPSTNBillAddr2").style.display = "block";
        document.getElementById("BusPSTNBillAddr3").style.display = "block";
        document.getElementById("BusPSTNBillCity").style.display = "block";
        document.getElementById("BusPSTNBillCounty").style.display = "block";
        document.getElementById("BusPSTNBillPCode").style.display = "block";
    } else {
        document.getElementById("BusPSTNBillAddr1").style.display = "none";
        document.getElementById("BusPSTNBillAddr2").style.display = "none";
        document.getElementById("BusPSTNBillAddr3").style.display = "none";
        document.getElementById("BusPSTNBillCity").style.display = "none";
        document.getElementById("BusPSTNBillCounty").style.display = "none";
        document.getElementById("BusPSTNBillPCode").style.display = "none";
    }
}

function DisplayBB_BillingAddress(elSel) {

    if (elSel.value == "2367") {
        document.getElementById("BBBillQAS").style.display = "block";
        document.getElementById("BBBillAddress1").style.display = "block";
        document.getElementById("BBBillAddress2").style.display = "block";
        document.getElementById("BBBillAddress3").style.display = "block";
        document.getElementById("BBBillCity").style.display = "block";
        document.getElementById("BBBillCounty").style.display = "block";
        document.getElementById("BBBillPCode").style.display = "block";
        document.getElementById("BBBillContact").style.display = "block";
    } else {
        document.getElementById("BBBillQAS").style.display = "none";
        document.getElementById("BBBillAddress1").style.display = "none";
        document.getElementById("BBBillAddress2").style.display = "none";
        document.getElementById("BBBillAddress3").style.display = "none";
        document.getElementById("BBBillCity").style.display = "none";
        document.getElementById("BBBillCounty").style.display = "none";
        document.getElementById("BBBillPCode").style.display = "none";
        document.getElementById("BBBillContact").style.display = "none";
    }
}

function DisplayBB_DirectDebit(elSel) {

    if (elSel.value == "237") {
        document.getElementById("BBDDHeader").style.display = "block";
        document.getElementById("BBDDAccName").style.display = "block";
        document.getElementById("BBDDSortCode").style.display = "block";
        document.getElementById("BBDDAccNo").style.display = "block";
    } else {
        document.getElementById("BBDDHeader").style.display = "none";
        document.getElementById("BBDDAccName").style.display = "none";
        document.getElementById("BBDDSortCode").style.display = "none";
        document.getElementById("BBDDAccNo").style.display = "none";
    }
}



//gets a group of elements by name and then loops through to check if the checkedVal element is checked.
//if checked, show elSwitchId element else hide
function divSwitchElByName(elSwitchId, elCheckName, checkedVal) {
    els = eval("document.forms[0]." + elCheckName);
    
    if (els) {
        switchEl = document.getElementById(elSwitchId);
        for (i = 0; i < els.length; i++) {
            obj = eval("document.forms[0]." + elCheckName + "[" + i + "]");
            if (obj.checked == true && obj.value == checkedVal) {
                switchEl.style.display = "block";
                break;
            }
            else {
                switchEl.style.display = "none";
            }
        }
    }
}

//function to show/hide content areas based on standard yes/no question/values
//Content to hide/show based on Yes/No answer which is determined by showIfYes (i.e. if true and yes is selected then show)
function divSwitchelByYesNo(elSwitchId, elCheckName, showIfYes) {
    divSwitchElByName(elSwitchId, elCheckName, ((showIfYes) ? '237' : '238'));
}

//custom js for bt bb credit vet questions.
function divBTBBCreditVetSwitch() {
   divSwitchelByYesNo('credvet_existing', 'Attr_3689_Rdo', false);
   divSwitchelByYesNo('credvet_new', 'Attr_3689_Rdo', true);

}



function isInteger(n) {
    return (/^\d+$/.test(n + ''));
}

function CurrencyFormatted(amount) {
    var i = parseFloat(amount);
    if (isNaN(i)) { i = 0.00; }
    var minus = '';
    if (i < 0) { minus = '-'; }
    i = Math.abs(i);
    i = parseInt((i + .005) * 100);
    i = i / 100;
    s = new String(i);
    if (s.indexOf('.') < 0) { s += '.00'; }
    if (s.indexOf('.') == (s.length - 2)) { s += '0'; }
    s = minus + s;
    return s;
}

