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(); 


  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)
  {
   var strHTML;
      strHTML = '';

      if (document.frmForm.Attr_1268_Rdo[1].checked == true) {
          for (i = 0; i < arrMultiArray4.length; i++) {
              if (arrMultiArray4[i].parentValue == elLst.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.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 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;
  }
  

   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") {
        document.getElementById("BBFibreChecksHead").style.display = "block";
        document.getElementById("BBFibreChecks").style.display = "block";
    } else {
        document.getElementById("BBFibreChecksHead").style.display = "none";
        document.getElementById("BBFibreChecks").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 (additional £260)'
  arrOptions[28] = '507'								
  arrOptions[29] = 'Router option (additional £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'
  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) £5'
  arrOptions[50] = '837'								
  arrOptions[51] = 'Plug and Go V220 Router - £49'
  arrOptions[52] = '838'								
  arrOptions[53] = 'Plug and Go 2700 Wireless Router (£79 one off charge)'
  arrOptions[54] = '1134'								
  arrOptions[55] = 'BT Advanced Web Hosting £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)'

  
//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]);

////Adding more new options for BB
//	arrOptions[12] = '349'								//local=349 ; live=349
//  arrOptions[13] = 'Internet Security Pack'
//	arrOptions[32] = '656'								
//	arrOptions[33] = '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] = 'Share Internet Business Pack'
//	arrOptions[50] = '837'								
//	arrOptions[51] = 'Plug and Go V220 Router - Free'
//	arrOptions[52] = '838'								
//	arrOptions[53] = 'Plug and Go 2700 Wireless Router (£79 one off charge)'
  
  
////end of more new options

//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[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[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[194] = new setMultiArray('654', arrOptions[38],arrOptions[39]);
    	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[201] = new setMultiArray('655', arrOptions[38],arrOptions[39]);
    	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[208] = new setMultiArray('1033', arrOptions[50],arrOptions[51]);
	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[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[229] = new setMultiArray('1035', arrOptions[32],arrOptions[33]);
	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[240] = new setMultiArray('2062', arrOptions[32], arrOptions[33]);
	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[251] = new setMultiArray('2063', arrOptions[32], arrOptions[33]);
	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]);
	
	
	
//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 £80)'

//669	No equipment
//670	Router
//671	Wireless router
//672	Wireless router additional £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 £30'
  arrOptions2[12] = '851'
  arrOptions2[13] = 'Hub Phone (Free)'
  arrOptions2[14] = '852'
  arrOptions2[15] = 'BT Hub Phone 2.1 (£39.99)'
  //arrOptions2[16] = '669'
  //arrOptions2[17] = 'No equipment'
  arrOptions2[16] = '896'
  arrOptions2[17] = 'Wireless Router (£25)'
  arrOptions2[18] = '897'
  arrOptions2[19] = 'Black Wireless BT Home Hub 2.0 Black (£25.00)'
 */

      arrOptions2[0] = '1581'
      arrOptions2[1] = 'BT Home Hub (Free)'
      arrOptions2[2] = '1582'
      arrOptions2[3] = 'BT Hub Phone (£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 - £9.99<br>Allowance = 1Gb per month for duration of 18 month contract.'
      arrOptions2[10] = '1689'
      arrOptions2[11] = 'BT Broadband Dongle - £49.99<br>Allowance = 1Gb per month for duration of 18 month contract.'
      arrOptions2[12] = '2086'
      arrOptions2[13] = 'BT Home Hub (£39.99)'

/*
  
//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 £25 
//666	Option 2 - No equipment, Router, Wireless router additional £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('666', arrOptions2[0],arrOptions2[1]);
	arrMultiArray3[3] = new setMultiArray('666', arrOptions2[2],arrOptions2[3]);
	
	arrMultiArray3[4] = new setMultiArray('667', arrOptions2[0],arrOptions2[1]);
	arrMultiArray3[5] = new setMultiArray('667', arrOptions2[4], arrOptions2[5]);

	arrMultiArray3[6] = new setMultiArray('1580', arrOptions2[0], arrOptions2[1]);
	arrMultiArray3[7] = new setMultiArray('1580', arrOptions2[4], arrOptions2[5]);
	arrMultiArray3[8] = new setMultiArray('1580', arrOptions2[6], arrOptions2[7]);

	arrMultiArray3[9] = new setMultiArray('2077', arrOptions2[2], arrOptions2[3]);
	arrMultiArray3[10] = new setMultiArray('2077', arrOptions2[0], arrOptions2[1]);

	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('666', arrOptions2[0], arrOptions2[1]);
	arrMultiArray4[4] = new setMultiArray('666', arrOptions2[2], arrOptions2[3]);
	arrMultiArray4[5] = new setMultiArray('666', arrOptions2[10], arrOptions2[11]);

	arrMultiArray4[6] = new setMultiArray('667', arrOptions2[0], arrOptions2[1]);
	arrMultiArray4[7] = new setMultiArray('667', arrOptions2[4], arrOptions2[5]);
	arrMultiArray4[8] = new setMultiArray('667', arrOptions2[8], arrOptions2[9]);

	arrMultiArray4[9] = new setMultiArray('1580', arrOptions2[0], arrOptions2[1]);
	arrMultiArray4[10] = new setMultiArray('1580', arrOptions2[4], arrOptions2[5]);
	arrMultiArray4[11] = new setMultiArray('1580', arrOptions2[6], arrOptions2[7]);

	arrMultiArray4[12] = new setMultiArray('2077', arrOptions2[2], arrOptions2[3]);
	arrMultiArray4[13] = new setMultiArray('2077', arrOptions2[8], arrOptions2[9]);
	arrMultiArray4[14] = new setMultiArray('2077', arrOptions2[0], arrOptions2[1]);
  
 
 /*
 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-£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_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 £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 £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 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) {
    
    //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") {
        document.getElementById("CBVisionHead").style.display = "none";
        document.getElementById("CBVision").style.display = "none";
        document.getElementById("CBVisionESPN").style.display = "none";
        document.getElementById("CBVisionDDHead").style.display = "none";
        document.getElementById("CBVisionDDSurname").style.display = "none";
        document.getElementById("CBVisionDDSC").style.display = "none";
        document.getElementById("CBVisionDDAccNo").style.display = "none";
    } else {
        document.getElementById("CBVisionHead").style.display = "block";
        document.getElementById("CBVision").style.display = "block";
        document.getElementById("CBVisionESPN").style.display = "block";
        document.getElementById("CBVisionDDHead").style.display = "block";
        document.getElementById("CBVisionDDSurname").style.display = "block";
        document.getElementById("CBVisionDDSC").style.display = "block";
        document.getElementById("CBVisionDDAccNo").style.display = "block";
    }


    //these 3 products only show Direct Debit details
    if (elSel.value == "1821" || elSel.value == "1822" || elSel.value == "1823") {
        document.getElementById("CBVisionDDHead").style.display = "block";
        document.getElementById("CBVisionDDSurname").style.display = "block";
        document.getElementById("CBVisionDDSC").style.display = "block";
        document.getElementById("CBVisionDDAccNo").style.display = "block";        
    }

    //gold product bundles - all viewing options are selected
    if (elSel.value == "1825" || elSel.value == "1826" || elSel.value == "1829" || elSel.value == "2085") {

        for (i = 0; i < document.frmForm.Attr_2980_chk.length; i++) {
            document.frmForm.Attr_2980_chk[i].checked = true;
        }
    }
    else
    {
      for (i = 0; i < document.frmForm.Attr_2980_chk.length; i++) {
            document.frmForm.Attr_2980_chk[i].checked = false;
        }
    }

    //contract type
    //12 months
    if (elSel.value == "1818" || elSel.value == "1819" || elSel.value == "1820") {
        document.frmForm.Attr_1268_Rdo[0].checked = true;
	document.frmForm.Attr_1268_Rdo[0].disabled = false;
        document.frmForm.Attr_1268_Rdo[1].disabled = true;
	document.frmForm.Attr_1268_Rdo[2].disabled = true;
    //24 months
    } else if (elSel.value == "2084" || elSel.value == "2085" || elSel.value == "2132") {
	document.frmForm.Attr_1268_Rdo[2].checked = true;
	document.frmForm.Attr_1268_Rdo[2].disabled = false;
        document.frmForm.Attr_1268_Rdo[0].disabled = true;
	document.frmForm.Attr_1268_Rdo[1].disabled = true;
    //18 months
    } else {
        document.frmForm.Attr_1268_Rdo[1].checked = true;
	document.frmForm.Attr_1268_Rdo[1].disabled = false;
        document.frmForm.Attr_1268_Rdo[0].disabled = true;
        document.frmForm.Attr_1268_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") {
        document.frmForm.Attr_131.value = "665";
        //setProductOptions3(document.frmForm.Attr_131);
	setProductOptions6(document.frmForm.Attr_131);
    }
    //Option 2
    else if (elSel.value == "1819" || elSel.value == "2077" || elSel.value == "2084" || elSel.value == "2132") {
        document.frmForm.Attr_131.value = "666";
        //setProductOptions3(document.frmForm.Attr_131);
	setProductOptions6(document.frmForm.Attr_131);
    }
    //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_131.value = "667";
        //setProductOptions3(document.frmForm.Attr_131);
	setProductOptions6(document.frmForm.Attr_131);
    }
    else {
        document.frmForm.Attr_131.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") {
        document.frmForm.Attr_1223.value = "845";
    }
    //Unlimited Weekend Plan
    else if (elSel.value == "2076" || elSel.value == "2077" || elSel.value == "2083" || elSel.value == "2084" || elSel.value == "2132") {
        document.frmForm.Attr_1223.value = "844";
    }
    //Unlimited UK Anytime calls
    else if (elSel.value == "1822" || elSel.value == "1823" || elSel.value == "2078" || elSel.value == "2085") {
        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("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("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("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") {
        document.getElementById("CBVisionHead").style.display = "none";
        document.getElementById("CBVision").style.display = "none";
        document.getElementById("CBVisionESPN").style.display = "none";
        document.getElementById("CBVisionDDHead").style.display = "none";
        document.getElementById("CBVisionDDSurname").style.display = "none";
        document.getElementById("CBVisionDDSC").style.display = "none";
        document.getElementById("CBVisionDDAccNo").style.display = "none";
    } else {
        document.getElementById("CBVisionHead").style.display = "block";
        document.getElementById("CBVision").style.display = "block";
        document.getElementById("CBVisionESPN").style.display = "block";
        document.getElementById("CBVisionDDHead").style.display = "block";
        document.getElementById("CBVisionDDSurname").style.display = "block";
        document.getElementById("CBVisionDDSC").style.display = "block";
        document.getElementById("CBVisionDDAccNo").style.display = "block";
    }


    //these 3 products only show Direct Debit details
    if (elSel.value == "1821" || elSel.value == "1822" || elSel.value == "1823") {
        document.getElementById("CBVisionDDHead").style.display = "block";
        document.getElementById("CBVisionDDSurname").style.display = "block";
        document.getElementById("CBVisionDDSC").style.display = "block";
        document.getElementById("CBVisionDDAccNo").style.display = "block";
    }


    //gold product bundles - all viewing options are selected
    if (elSel.value == "1825" || elSel.value == "1826" || elSel.value == "1829") {

        for (i = 0; i < document.frmForm.Attr_3152_chk.length; i++) {
            document.frmForm.Attr_3152_chk[i].checked = true;
        }
    }
    else {
        for (i = 0; i < document.frmForm.Attr_3152_chk.length; i++) {
            document.frmForm.Attr_3152_chk[i].checked = false;
        }
    }

    //contract type
    if (elSel.value == "1818" || elSel.value == "1819" || elSel.value == "1820") {
        document.frmForm.Attr_3138_Rdo[0].checked = true;
        document.frmForm.Attr_3138_Rdo[1].disabled = true;
        document.frmForm.Attr_3138_Rdo[0].disabled = false;
    } else {
        document.frmForm.Attr_3138_Rdo[1].checked = true;
        document.frmForm.Attr_3138_Rdo[0].disabled = true;
        document.frmForm.Attr_3138_Rdo[1].disabled = false;
    }


    //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") {
        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);
    }
    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") {
        document.frmForm.Attr_3125.value = "845";
    }
    //Unlimited UK Anytime calls
    else if (elSel.value == "1822" || elSel.value == "1823") {
        document.frmForm.Attr_3125.value = "846";
    }
    else {
        document.frmForm.Attr_3125.value = "0";
    }
}


//array for Business Plan scheme/plan - base
var arrBTPlansBase = new Array(3);
for (i = 0; i < 4; i++)
    arrBTPlansBase[i] = new Array();

arrBTPlansBase[0][0] = new Option("- - Please Select - -", "0");

arrBTPlansBase[1][0] = new Option("- - Please Select - -", "0");
arrBTPlansBase[1][1] = new Option("BT Business One Plan £500", "1286");
arrBTPlansBase[1][2] = new Option("BT Business One Plan £5K", "1299");
arrBTPlansBase[1][3] = new Option("BT Business One Plan £30K", "1300");
arrBTPlansBase[1][4] = new Option("BT Business One Plan £100K", "1301");
arrBTPlansBase[1][5] = new Option("BT Business One Plan £200K", "1302");
arrBTPlansBase[1][6] = new Option("BT Business One Plan £400K", "1303");
arrBTPlansBase[1][7] = new Option("BT Business One Plan May09 £5K Inland Capped", "1718");
arrBTPlansBase[1][8] = new Option("BT Business One Plan May09 £5K Inland Uncapped", "1719");
arrBTPlansBase[1][9] = new Option("BT Business One Plan May09 £30K Inland Capped", "1720");
arrBTPlansBase[1][10] = new Option("BT Business One Plan May09 £30K Inland Uncapped", "1721");
arrBTPlansBase[1][11] = new Option("BT Business One Plan May09 £100K Inland Capped", "1722");
arrBTPlansBase[1][12] = new Option("BT Business One Plan May09 £100K Inland Uncapped", "1723");
arrBTPlansBase[1][13] = new Option("BT Business One Plan May09 £200K Inland Capped", "1724");
arrBTPlansBase[1][14] = new Option("BT Business One Plan May09 £200K Inland Uncapped", "1725");
arrBTPlansBase[1][15] = new Option("BT Business One Plan May09 £400K Inland Capped", "1726");
arrBTPlansBase[1][16] = new Option("BT Business One Plan May09 £400K Inland Uncapped", "1727");

arrBTPlansBase[2][0] = new Option("- - Please Select - -", "0");
arrBTPlansBase[2][1] = new Option("BT Business One Plan Plus £500", "1569");
arrBTPlansBase[2][2] = new Option("BT Business One Plan Plus £5K", "1568");
arrBTPlansBase[2][3] = new Option("BT Business One Plan Plus £30K", "1576");
arrBTPlansBase[2][4] = new Option("BT Business One Plan Plus £100K", "1577");
arrBTPlansBase[2][5] = new Option("BT Business One Plan Plus £200K", "1578");
arrBTPlansBase[2][6] = new Option("BT Business One Plan Plus £400K", "1579");
arrBTPlansBase[2][7] = new Option("BT Business One Plan Plus May09 £5K Inland Capped", "1728");
arrBTPlansBase[2][8] = new Option("BT Business One Plan Plus May09 £5K Inland Uncapped", "1729");
arrBTPlansBase[2][9] = new Option("BT Business One Plan Plus May09 £30K Inland Capped", "1730");
arrBTPlansBase[2][10] = new Option("BT Business One Plan Plus May09 £30K Inland Uncapped", "1731");
arrBTPlansBase[2][11] = new Option("BT Business One Plan Plus May09 £100K Inland Capped", "1732");
arrBTPlansBase[2][12] = new Option("BT Business One Plan Plus May09 £100K Inland Uncapped", "1733");
arrBTPlansBase[2][13] = new Option("BT Business One Plan Plus May09 £200K Inland Capped", "1734");
arrBTPlansBase[2][14] = new Option("BT Business One Plan Plus May09 £200K Inland Uncapped", "1735");
arrBTPlansBase[2][15] = new Option("BT Business One Plan Plus May09 £400K Inland Capped", "1736");
arrBTPlansBase[2][16] = new Option("BT Business One Plan Plus May09 £400K Inland Uncapped", "1737");

arrBTPlansBase[3][0] = new Option("- - Please Select - -", "0");
arrBTPlansBase[3][1] = new Option("BT Business One Plan Traditional £200", "1675");
arrBTPlansBase[3][2] = new Option("BT Business One Plan Traditional £500", "1676");
arrBTPlansBase[3][3] = new Option("BT Business One Plan Traditional £5K", "1677");
arrBTPlansBase[3][4] = new Option("BT Business One Plan Traditional £30K", "1678");
arrBTPlansBase[3][5] = new Option("BT Business One Plan Traditional £100K", "1679");
arrBTPlansBase[3][6] = new Option("BT Business One Plan Traditional £200K", "1680");
arrBTPlansBase[3][7] = new Option("BT Business One Plan Traditional May09 £5K Inland Capped", "1738");
arrBTPlansBase[3][8] = new Option("BT Business One Plan Traditional May09 £5K Inland Uncapped", "1739");
arrBTPlansBase[3][9] = new Option("BT Business One Plan Traditional May09 £30K Inland Capped", "1740");
arrBTPlansBase[3][10] = new Option("BT Business One Plan Traditional May09 £30K Inland Uncapped", "1741");
arrBTPlansBase[3][11] = new Option("BT Business One Plan Traditional May09 £100K Inland Capped", "1742");
arrBTPlansBase[3][12] = new Option("BT Business One Plan Traditional May09 £100K Inland Uncapped", "1743");
arrBTPlansBase[3][13] = new Option("BT Business One Plan Traditional May09 £200K Inland Capped", "1744");
arrBTPlansBase[3][14] = new Option("BT Business One Plan Traditional May09 £200K Inland Uncapped", "1745");

//array for Business Plan scheme/plans - base + inclusive
var arrBTPlansBaseIncl = new Array(6);
for (i = 0; i < 7; i++)
    arrBTPlansBaseIncl[i] = new Array()

arrBTPlansBaseIncl[0][0] = new Option("- - Please Select - -", "0");

arrBTPlansBaseIncl[1][0] = new Option("- - Please Select - -", "0");
arrBTPlansBaseIncl[1][1] = new Option("BT Business One Plan £500", "1286");
arrBTPlansBaseIncl[1][2] = new Option("BT Business One Plan £5K", "1299");
arrBTPlansBaseIncl[1][3] = new Option("BT Business One Plan £30K", "1300");
arrBTPlansBaseIncl[1][4] = new Option("BT Business One Plan £100K", "1301");
arrBTPlansBaseIncl[1][5] = new Option("BT Business One Plan £200K", "1302");
arrBTPlansBaseIncl[1][6] = new Option("BT Business One Plan £400K", "1303");
arrBTPlansBaseIncl[1][7] = new Option("BT Business One Plan May09 £5K Inland Capped", "1718");
arrBTPlansBaseIncl[1][8] = new Option("BT Business One Plan May09 £5K Inland Uncapped", "1719");
arrBTPlansBaseIncl[1][9] = new Option("BT Business One Plan May09 £30K Inland Capped", "1720");
arrBTPlansBaseIncl[1][10] = new Option("BT Business One Plan May09 £30K Inland Uncapped", "1721");
arrBTPlansBaseIncl[1][11] = new Option("BT Business One Plan May09 £100K Inland Capped", "1722");
arrBTPlansBaseIncl[1][12] = new Option("BT Business One Plan May09 £100K Inland Uncapped", "1723");
arrBTPlansBaseIncl[1][13] = new Option("BT Business One Plan May09 £200K Inland Capped", "1724");
arrBTPlansBaseIncl[1][14] = new Option("BT Business One Plan May09 £200K Inland Uncapped", "1725");
arrBTPlansBaseIncl[1][15] = new Option("BT Business One Plan May09 £400K Inland Capped", "1726");
arrBTPlansBaseIncl[1][16] = new Option("BT Business One Plan May09 £400K Inland Uncapped", "1727");

arrBTPlansBaseIncl[2][0] = new Option("- - Please Select - -", "0");
arrBTPlansBaseIncl[2][1] = new Option("BT Business One Plan Plus £500", "1569");
arrBTPlansBaseIncl[2][2] = new Option("BT Business One Plan Plus £5K", "1568");
arrBTPlansBaseIncl[2][3] = new Option("BT Business One Plan Plus £30K", "1576");
arrBTPlansBaseIncl[2][4] = new Option("BT Business One Plan Plus £100K", "1577");
arrBTPlansBaseIncl[2][5] = new Option("BT Business One Plan Plus £200K", "1578");
arrBTPlansBaseIncl[2][6] = new Option("BT Business One Plan Plus £400K", "1579");
arrBTPlansBaseIncl[2][7] = new Option("BT Business One Plan Plus May09 £5K Inland Capped", "1728");
arrBTPlansBaseIncl[2][8] = new Option("BT Business One Plan Plus May09 £5K Inland Uncapped", "1729");
arrBTPlansBaseIncl[2][9] = new Option("BT Business One Plan Plus May09 £30K Inland Capped", "1730");
arrBTPlansBaseIncl[2][10] = new Option("BT Business One Plan Plus May09 £30K Inland Uncapped", "1731");
arrBTPlansBaseIncl[2][11] = new Option("BT Business One Plan Plus May09 £100K Inland Capped", "1732");
arrBTPlansBaseIncl[2][12] = new Option("BT Business One Plan Plus May09 £100K Inland Uncapped", "1733");
arrBTPlansBaseIncl[2][13] = new Option("BT Business One Plan Plus May09 £200K Inland Capped", "1734");
arrBTPlansBaseIncl[2][14] = new Option("BT Business One Plan Plus May09 £200K Inland Uncapped", "1735");
arrBTPlansBaseIncl[2][15] = new Option("BT Business One Plan Plus May09 £400K Inland Capped", "1736");
arrBTPlansBaseIncl[2][16] = new Option("BT Business One Plan Plus May09 £400K Inland Uncapped", "1737");

arrBTPlansBaseIncl[3][0] = new Option("- - Please Select - -", "0");
arrBTPlansBaseIncl[3][1] = new Option("BT Business One Plan Traditional £200", "1675");
arrBTPlansBaseIncl[3][2] = new Option("BT Business One Plan Traditional £500", "1676");
arrBTPlansBaseIncl[3][3] = new Option("BT Business One Plan Traditional £5K", "1677");
arrBTPlansBaseIncl[3][4] = new Option("BT Business One Plan Traditional £30K", "1678");
arrBTPlansBaseIncl[3][5] = new Option("BT Business One Plan Traditional £100K", "1679");
arrBTPlansBaseIncl[3][6] = new Option("BT Business One Plan Traditional £200K", "1680");
arrBTPlansBaseIncl[3][7] = new Option("BT Business One Plan Traditional May09 £5K Inland Capped", "1738");
arrBTPlansBaseIncl[3][8] = new Option("BT Business One Plan Traditional May09 £5K Inland Uncapped", "1739");
arrBTPlansBaseIncl[3][9] = new Option("BT Business One Plan Traditional May09 £30K Inland Capped", "1740");
arrBTPlansBaseIncl[3][10] = new Option("BT Business One Plan Traditional May09 £30K Inland Uncapped", "1741");
arrBTPlansBaseIncl[3][11] = new Option("BT Business One Plan Traditional May09 £100K Inland Capped", "1742");
arrBTPlansBaseIncl[3][12] = new Option("BT Business One Plan Traditional May09 £100K Inland Uncapped", "1743");
arrBTPlansBaseIncl[3][13] = new Option("BT Business One Plan Traditional May09 £200K Inland Capped", "1744");
arrBTPlansBaseIncl[3][14] = new Option("BT Business One Plan Traditional May09 £200K Inland Uncapped", "1745");

arrBTPlansBaseIncl[4][0] = new Option("- - Please Select - -", "0");
arrBTPlansBaseIncl[4][1] = new Option("BT Business One Plan Inclusive £500", "1907");
arrBTPlansBaseIncl[4][2] = new Option("BT Business One Plan Inclusive £5K", "1908");
arrBTPlansBaseIncl[4][3] = new Option("BT Business One Plan Inclusive £30K", "1909");
arrBTPlansBaseIncl[4][4] = new Option("BT Business One Plan Inclusive £100K", "1910");
arrBTPlansBaseIncl[4][5] = new Option("BT Business One Plan Inclusive £200K", "1911");
arrBTPlansBaseIncl[4][6] = new Option("BT Business One Plan Inclusive £400K", "1912");

arrBTPlansBaseIncl[5][0] = new Option("- - Please Select - -", "0");
arrBTPlansBaseIncl[5][1] = new Option("BT Business One Plan Plus Inclusive £500", "1913");
arrBTPlansBaseIncl[5][2] = new Option("BT Business One Plan Plus Inclusive £5K", "1914");
arrBTPlansBaseIncl[5][3] = new Option("BT Business One Plan Plus Inclusive £30K", "1915");
arrBTPlansBaseIncl[5][4] = new Option("BT Business One Plan Plus Inclusive £100K", "1916");
arrBTPlansBaseIncl[5][5] = new Option("BT Business One Plan Plus Inclusive £200K", "1917");
arrBTPlansBaseIncl[5][6] = new Option("BT Business One Plan Plus Inclusive £400K", "1918");

arrBTPlansBaseIncl[6][0] = new Option("- - Please Select - -", "0");
arrBTPlansBaseIncl[6][1] = new Option("BT Business One Plan Traditional Inclusive £200", "1919");
arrBTPlansBaseIncl[6][2] = new Option("BT Business One Plan Traditional Inclusive £500", "1920");
arrBTPlansBaseIncl[6][3] = new Option("BT Business One Plan Traditional Inclusive £5K", "1921");
arrBTPlansBaseIncl[6][4] = new Option("BT Business One Plan Traditional Inclusive £30K", "1922");
arrBTPlansBaseIncl[6][5] = new Option("BT Business One Plan Traditional Inclusive £100K", "1923");
arrBTPlansBaseIncl[6][6] = new Option("BT Business One Plan Traditional Inclusive £200K", "1924");
arrBTPlansBaseIncl[6][7] = new Option("BT Business One Plan Traditional Inclusive £400K", "1925");

//array for Business Plan scheme/plans - base + inclusive + historical
var arrBTPlansBaseInclHist = new Array(8);
for (i = 0; i < 9; i++)
    arrBTPlansBaseInclHist[i] = new Array()

arrBTPlansBaseInclHist[0][0] = new Option("- - Please Select - -", "0");

arrBTPlansBaseInclHist[1][0] = new Option("- - Please Select - -", "0");
arrBTPlansBaseInclHist[1][1] = new Option("BT Business One Plan £500", "1286");
arrBTPlansBaseInclHist[1][2] = new Option("BT Business One Plan £5K", "1299");
arrBTPlansBaseInclHist[1][3] = new Option("BT Business One Plan £30K", "1300");
arrBTPlansBaseInclHist[1][4] = new Option("BT Business One Plan £100K", "1301");
arrBTPlansBaseInclHist[1][5] = new Option("BT Business One Plan £200K", "1302");
arrBTPlansBaseInclHist[1][6] = new Option("BT Business One Plan £400K", "1303");
arrBTPlansBaseInclHist[1][7] = new Option("BT Business One Plan May09 £5K Inland Capped", "1718");
arrBTPlansBaseInclHist[1][8] = new Option("BT Business One Plan May09 £5K Inland Uncapped", "1719");
arrBTPlansBaseInclHist[1][9] = new Option("BT Business One Plan May09 £30K Inland Capped", "1720");
arrBTPlansBaseInclHist[1][10] = new Option("BT Business One Plan May09 £30K Inland Uncapped", "1721");
arrBTPlansBaseInclHist[1][11] = new Option("BT Business One Plan May09 £100K Inland Capped", "1722");
arrBTPlansBaseInclHist[1][12] = new Option("BT Business One Plan May09 £100K Inland Uncapped", "1723");
arrBTPlansBaseInclHist[1][13] = new Option("BT Business One Plan May09 £200K Inland Capped", "1724");
arrBTPlansBaseInclHist[1][14] = new Option("BT Business One Plan May09 £200K Inland Uncapped", "1725");
arrBTPlansBaseInclHist[1][15] = new Option("BT Business One Plan May09 £400K Inland Capped", "1726");
arrBTPlansBaseInclHist[1][16] = new Option("BT Business One Plan May09 £400K Inland Uncapped", "1727");

arrBTPlansBaseInclHist[2][0] = new Option("- - Please Select - -", "0");
arrBTPlansBaseInclHist[2][1] = new Option("BT Business One Plan Plus £500", "1569");
arrBTPlansBaseInclHist[2][2] = new Option("BT Business One Plan Plus £5K", "1568");
arrBTPlansBaseInclHist[2][3] = new Option("BT Business One Plan Plus £30K", "1576");
arrBTPlansBaseInclHist[2][4] = new Option("BT Business One Plan Plus £100K", "1577");
arrBTPlansBaseInclHist[2][5] = new Option("BT Business One Plan Plus £200K", "1578");
arrBTPlansBaseInclHist[2][6] = new Option("BT Business One Plan Plus £400K", "1579");
arrBTPlansBaseInclHist[2][7] = new Option("BT Business One Plan Plus May09 £5K Inland Capped", "1728");
arrBTPlansBaseInclHist[2][8] = new Option("BT Business One Plan Plus May09 £5K Inland Uncapped", "1729");
arrBTPlansBaseInclHist[2][9] = new Option("BT Business One Plan Plus May09 £30K Inland Capped", "1730");
arrBTPlansBaseInclHist[2][10] = new Option("BT Business One Plan Plus May09 £30K Inland Uncapped", "1731");
arrBTPlansBaseInclHist[2][11] = new Option("BT Business One Plan Plus May09 £100K Inland Capped", "1732");
arrBTPlansBaseInclHist[2][12] = new Option("BT Business One Plan Plus May09 £100K Inland Uncapped", "1733");
arrBTPlansBaseInclHist[2][13] = new Option("BT Business One Plan Plus May09 £200K Inland Capped", "1734");
arrBTPlansBaseInclHist[2][14] = new Option("BT Business One Plan Plus May09 £200K Inland Uncapped", "1735");
arrBTPlansBaseInclHist[2][15] = new Option("BT Business One Plan Plus May09 £400K Inland Capped", "1736");
arrBTPlansBaseInclHist[2][16] = new Option("BT Business One Plan Plus May09 £400K Inland Uncapped", "1737");

arrBTPlansBaseInclHist[3][0] = new Option("- - Please Select - -", "0");
arrBTPlansBaseInclHist[3][1] = new Option("BT Business One Plan Traditional £200", "1675");
arrBTPlansBaseInclHist[3][2] = new Option("BT Business One Plan Traditional £500", "1676");
arrBTPlansBaseInclHist[3][3] = new Option("BT Business One Plan Traditional £5K", "1677");
arrBTPlansBaseInclHist[3][4] = new Option("BT Business One Plan Traditional £30K", "1678");
arrBTPlansBaseInclHist[3][5] = new Option("BT Business One Plan Traditional £100K", "1679");
arrBTPlansBaseInclHist[3][6] = new Option("BT Business One Plan Traditional £200K", "1680");
arrBTPlansBaseInclHist[3][7] = new Option("BT Business One Plan Traditional May09 £5K Inland Capped", "1738");
arrBTPlansBaseInclHist[3][8] = new Option("BT Business One Plan Traditional May09 £5K Inland Uncapped", "1739");
arrBTPlansBaseInclHist[3][9] = new Option("BT Business One Plan Traditional May09 £30K Inland Capped", "1740");
arrBTPlansBaseInclHist[3][10] = new Option("BT Business One Plan Traditional May09 £30K Inland Uncapped", "1741");
arrBTPlansBaseInclHist[3][11] = new Option("BT Business One Plan Traditional May09 £100K Inland Capped", "1742");
arrBTPlansBaseInclHist[3][12] = new Option("BT Business One Plan Traditional May09 £100K Inland Uncapped", "1743");
arrBTPlansBaseInclHist[3][13] = new Option("BT Business One Plan Traditional May09 £200K Inland Capped", "1744");
arrBTPlansBaseInclHist[3][14] = new Option("BT Business One Plan Traditional May09 £200K Inland Uncapped", "1745");

arrBTPlansBaseInclHist[4][0] = new Option("- - Please Select - -", "0");
arrBTPlansBaseInclHist[4][1] = new Option("BT Business One Plan Inclusive £500", "1907");
arrBTPlansBaseInclHist[4][2] = new Option("BT Business One Plan Inclusive £5K", "1908");
arrBTPlansBaseInclHist[4][3] = new Option("BT Business One Plan Inclusive £30K", "1909");
arrBTPlansBaseInclHist[4][4] = new Option("BT Business One Plan Inclusive £100K", "1910");
arrBTPlansBaseInclHist[4][5] = new Option("BT Business One Plan Inclusive £200K", "1911");
arrBTPlansBaseInclHist[4][6] = new Option("BT Business One Plan Inclusive £400K", "1912");

arrBTPlansBaseInclHist[5][0] = new Option("- - Please Select - -", "0");
arrBTPlansBaseInclHist[5][1] = new Option("BT Business One Plan Plus Inclusive £500", "1913");
arrBTPlansBaseInclHist[5][2] = new Option("BT Business One Plan Plus Inclusive £5K", "1914");
arrBTPlansBaseInclHist[5][3] = new Option("BT Business One Plan Plus Inclusive £30K", "1915");
arrBTPlansBaseInclHist[5][4] = new Option("BT Business One Plan Plus Inclusive £100K", "1916");
arrBTPlansBaseInclHist[5][5] = new Option("BT Business One Plan Plus Inclusive £200K", "1917");
arrBTPlansBaseInclHist[5][6] = new Option("BT Business One Plan Plus Inclusive £400K", "1918");

arrBTPlansBaseInclHist[6][0] = new Option("- - Please Select - -", "0");
arrBTPlansBaseInclHist[6][1] = new Option("BT Business One Plan Traditional Inclusive £200", "1919");
arrBTPlansBaseInclHist[6][2] = new Option("BT Business One Plan Traditional Inclusive £500", "1920");
arrBTPlansBaseInclHist[6][3] = new Option("BT Business One Plan Traditional Inclusive £5K", "1921");
arrBTPlansBaseInclHist[6][4] = new Option("BT Business One Plan Traditional Inclusive £30K", "1922");
arrBTPlansBaseInclHist[6][5] = new Option("BT Business One Plan Traditional Inclusive £100K", "1923");
arrBTPlansBaseInclHist[6][6] = new Option("BT Business One Plan Traditional Inclusive £200K", "1924");
arrBTPlansBaseInclHist[6][7] = new Option("BT Business One Plan Traditional Inclusive £400K", "1925");

arrBTPlansBaseInclHist[7][0] = new Option("- - Please Select - -", "0");
arrBTPlansBaseInclHist[7][1] = new Option("BT Business Reward £200", "1232");
arrBTPlansBaseInclHist[7][2] = new Option("BT Business Reward £500", "1233");
arrBTPlansBaseInclHist[7][3] = new Option("BT Business Reward £5K", "1234");
arrBTPlansBaseInclHist[7][4] = new Option("BT Business Reward £30K", "1235");
arrBTPlansBaseInclHist[7][5] = new Option("BT Business Reward £100K", "1236");
arrBTPlansBaseInclHist[7][6] = new Option("BT Business Reward £200K", "1237");

arrBTPlansBaseInclHist[8][0] = new Option("- - Please Select - -", "0");
arrBTPlansBaseInclHist[8][1] = new Option("BT Business Plan Lite", "914");
arrBTPlansBaseInclHist[8][2] = new Option("BT Business Plan £250", "908");
arrBTPlansBaseInclHist[8][3] = new Option("BT Business Plan £500", "910");
arrBTPlansBaseInclHist[8][4] = new Option("BT Business Plan £750", "912");
arrBTPlansBaseInclHist[8][5] = new Option("BT Business Plan £250 Tailored Option", "909");
arrBTPlansBaseInclHist[8][6] = new Option("BT Business Plan £500 Tailored Option", "911");
arrBTPlansBaseInclHist[8][7] = new Option("BT Business Plan £750 Tailored Option", "913");
arrBTPlansBaseInclHist[8][8] = new Option("BT Business Plan £5K", "929");
arrBTPlansBaseInclHist[8][9] = new Option("BT Business Plan £30K", "931");
arrBTPlansBaseInclHist[8][10] = new Option("BT Business Plan £100K", "933");
arrBTPlansBaseInclHist[8][11] = new Option("BT Business Plan £5K Tailored Option", "930");
arrBTPlansBaseInclHist[8][12] = new Option("BT Business Plan £30K Tailored Option", "932");
arrBTPlansBaseInclHist[8][13] = new Option("BT Business Plan £100K Tailored Option", "934");

//array for Business Plan scheme/plans - base + historical
var arrBTPlansBaseHist = new Array(5);
for (i = 0; i < 6; i++)
    arrBTPlansBaseHist[i] = new Array()

arrBTPlansBaseHist[0][0] = new Option("- - Please Select - -", "0");

arrBTPlansBaseHist[1][0] = new Option("- - Please Select - -", "0");
arrBTPlansBaseHist[1][1] = new Option("BT Business One Plan £500", "1286");
arrBTPlansBaseHist[1][2] = new Option("BT Business One Plan £5K", "1299");
arrBTPlansBaseHist[1][3] = new Option("BT Business One Plan £30K", "1300");
arrBTPlansBaseHist[1][4] = new Option("BT Business One Plan £100K", "1301");
arrBTPlansBaseHist[1][5] = new Option("BT Business One Plan £200K", "1302");
arrBTPlansBaseHist[1][6] = new Option("BT Business One Plan £400K", "1303");
arrBTPlansBaseHist[1][7] = new Option("BT Business One Plan May09 £5K Inland Capped", "1718");
arrBTPlansBaseHist[1][8] = new Option("BT Business One Plan May09 £5K Inland Uncapped", "1719");
arrBTPlansBaseHist[1][9] = new Option("BT Business One Plan May09 £30K Inland Capped", "1720");
arrBTPlansBaseHist[1][10] = new Option("BT Business One Plan May09 £30K Inland Uncapped", "1721");
arrBTPlansBaseHist[1][11] = new Option("BT Business One Plan May09 £100K Inland Capped", "1722");
arrBTPlansBaseHist[1][12] = new Option("BT Business One Plan May09 £100K Inland Uncapped", "1723");
arrBTPlansBaseHist[1][13] = new Option("BT Business One Plan May09 £200K Inland Capped", "1724");
arrBTPlansBaseHist[1][14] = new Option("BT Business One Plan May09 £200K Inland Uncapped", "1725");
arrBTPlansBaseHist[1][15] = new Option("BT Business One Plan May09 £400K Inland Capped", "1726");
arrBTPlansBaseHist[1][16] = new Option("BT Business One Plan May09 £400K Inland Uncapped", "1727");

arrBTPlansBaseHist[2][0] = new Option("- - Please Select - -", "0");
arrBTPlansBaseHist[2][1] = new Option("BT Business One Plan Plus £500", "1569");
arrBTPlansBaseHist[2][2] = new Option("BT Business One Plan Plus £5K", "1568");
arrBTPlansBaseHist[2][3] = new Option("BT Business One Plan Plus £30K", "1576");
arrBTPlansBaseHist[2][4] = new Option("BT Business One Plan Plus £100K", "1577");
arrBTPlansBaseHist[2][5] = new Option("BT Business One Plan Plus £200K", "1578");
arrBTPlansBaseHist[2][6] = new Option("BT Business One Plan Plus £400K", "1579");
arrBTPlansBaseHist[2][7] = new Option("BT Business One Plan Plus May09 £5K Inland Capped", "1728");
arrBTPlansBaseHist[2][8] = new Option("BT Business One Plan Plus May09 £5K Inland Uncapped", "1729");
arrBTPlansBaseHist[2][9] = new Option("BT Business One Plan Plus May09 £30K Inland Capped", "1730");
arrBTPlansBaseHist[2][10] = new Option("BT Business One Plan Plus May09 £30K Inland Uncapped", "1731");
arrBTPlansBaseHist[2][11] = new Option("BT Business One Plan Plus May09 £100K Inland Capped", "1732");
arrBTPlansBaseHist[2][12] = new Option("BT Business One Plan Plus May09 £100K Inland Uncapped", "1733");
arrBTPlansBaseHist[2][13] = new Option("BT Business One Plan Plus May09 £200K Inland Capped", "1734");
arrBTPlansBaseHist[2][14] = new Option("BT Business One Plan Plus May09 £200K Inland Uncapped", "1735");
arrBTPlansBaseHist[2][15] = new Option("BT Business One Plan Plus May09 £400K Inland Capped", "1736");
arrBTPlansBaseHist[2][16] = new Option("BT Business One Plan Plus May09 £400K Inland Uncapped", "1737");

arrBTPlansBaseHist[3][0] = new Option("- - Please Select - -", "0");
arrBTPlansBaseHist[3][1] = new Option("BT Business One Plan Traditional £200", "1675");
arrBTPlansBaseHist[3][2] = new Option("BT Business One Plan Traditional £500", "1676");
arrBTPlansBaseHist[3][3] = new Option("BT Business One Plan Traditional £5K", "1677");
arrBTPlansBaseHist[3][4] = new Option("BT Business One Plan Traditional £30K", "1678");
arrBTPlansBaseHist[3][5] = new Option("BT Business One Plan Traditional £100K", "1679");
arrBTPlansBaseHist[3][6] = new Option("BT Business One Plan Traditional £200K", "1680");
arrBTPlansBaseHist[3][7] = new Option("BT Business One Plan Traditional May09 £5K Inland Capped", "1738");
arrBTPlansBaseHist[3][8] = new Option("BT Business One Plan Traditional May09 £5K Inland Uncapped", "1739");
arrBTPlansBaseHist[3][9] = new Option("BT Business One Plan Traditional May09 £30K Inland Capped", "1740");
arrBTPlansBaseHist[3][10] = new Option("BT Business One Plan Traditional May09 £30K Inland Uncapped", "1741");
arrBTPlansBaseHist[3][11] = new Option("BT Business One Plan Traditional May09 £100K Inland Capped", "1742");
arrBTPlansBaseHist[3][12] = new Option("BT Business One Plan Traditional May09 £100K Inland Uncapped", "1743");
arrBTPlansBaseHist[3][13] = new Option("BT Business One Plan Traditional May09 £200K Inland Capped", "1744");
arrBTPlansBaseHist[3][14] = new Option("BT Business One Plan Traditional May09 £200K Inland Uncapped", "1745");

arrBTPlansBaseHist[4][0] = new Option("- - Please Select - -", "0");
arrBTPlansBaseHist[4][1] = new Option("BT Business Reward £200", "1232");
arrBTPlansBaseHist[4][2] = new Option("BT Business Reward £500", "1233");
arrBTPlansBaseHist[4][3] = new Option("BT Business Reward £5K", "1234");
arrBTPlansBaseHist[4][4] = new Option("BT Business Reward £30K", "1235");
arrBTPlansBaseHist[4][5] = new Option("BT Business Reward £100K", "1236");
arrBTPlansBaseHist[4][6] = new Option("BT Business Reward £200K", "1237");

arrBTPlansBaseHist[5][0] = new Option("- - Please Select - -", "0");
arrBTPlansBaseHist[5][1] = new Option("BT Business Plan Lite", "914");
arrBTPlansBaseHist[5][2] = new Option("BT Business Plan £250", "908");
arrBTPlansBaseHist[5][3] = new Option("BT Business Plan £500", "910");
arrBTPlansBaseHist[5][4] = new Option("BT Business Plan £750", "912");
arrBTPlansBaseHist[5][5] = new Option("BT Business Plan £250 Tailored Option", "909");
arrBTPlansBaseHist[5][6] = new Option("BT Business Plan £500 Tailored Option", "911");
arrBTPlansBaseHist[5][7] = new Option("BT Business Plan £750 Tailored Option", "913");
arrBTPlansBaseHist[5][8] = new Option("BT Business Plan £5K", "929");
arrBTPlansBaseHist[5][9] = new Option("BT Business Plan £30K", "931");
arrBTPlansBaseHist[5][10] = new Option("BT Business Plan £100K", "933");
arrBTPlansBaseHist[5][11] = new Option("BT Business Plan £5K Tailored Option", "930");
arrBTPlansBaseHist[5][12] = new Option("BT Business Plan £30K Tailored Option", "932");
arrBTPlansBaseHist[5][13] = new Option("BT Business Plan £100K Tailored Option", "934");

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 == 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

    //if edit and closed = history & Acquisition = yes = inclusive
    if (iOrderNo != "" && blIsClosedState && blIsAcquisition) {
        for (i = 0; i < arrBTPlansBaseInclHist[x].length; i++) {
            plan.options[i] = new Option(arrBTPlansBaseInclHist[x][i].text, arrBTPlansBaseInclHist[x][i].value)
        }
    }
    //if edit and closed = history only
    else if (iOrderNo != "" && blIsClosedState) {
        for (i = 0; i < arrBTPlansBaseHist[x].length; i++) {
            plan.options[i] = new Option(arrBTPlansBaseHist[x][i].text, arrBTPlansBaseHist[x][i].value)
        }
    }
    //if acquisition = yes only = inclusive (saved not dynamically)
    else if (blIsAcquisition) {
        for (i = 0; i < arrBTPlansBaseIncl[x].length; i++) {
            plan.options[i] = new Option(arrBTPlansBaseIncl[x][i].text, arrBTPlansBaseIncl[x][i].value)
        }
    }
    //base only
    else {
        for (i = 0; i < arrBTPlansBase[x].length; i++) {
            plan.options[i] = new Option(arrBTPlansBase[x][i].text, arrBTPlansBase[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 - £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
    if (document.frmForm.Attr_2978.value == "2084" || document.frmForm.Attr_2978.value == "2132") {
        for (i = 0; i < document.frmForm.Attr_2980_chk.length; i++) {
            if (document.frmForm.Attr_2980_chk[i].checked) {
                counter = counter + 1;
            }
        }

        if (counter > 2) {
            alert("Please select only 2 viewing packs for Talk, Surf & Watch More.");
            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") {
        document.getElementById("CBCallExtraPlan").style.display = "block";
    } else {
        document.getElementById("CBCallExtraPlan").style.display = "none";
    }

}