var securename = 'rebecc';
var surveybak  = '#666666';
var deptsname  = 'index.htm';
var AAprice    = 0.70;
var Cprice     = 1.40;
var bothprice  = AAprice + Cprice;
var BattQty, BattPrice, BattType, BattCode, BattDesc;

function custom_pre_navi()
{
 doICQ = false;
// document.writeln("We're sponsporing the <a href='http://www.letsfixbritain.com' target='_blank'>Let's Fix Britain</a> organisation");
};

function custom_additem_options()
{
 // Battery Codes: a=1xAA,b=2xAA,c=3xAA,d=4xAA,e=1xC,f=2xC,g=3xC,h=4xC,i=2xC and 2xAA;

 if (OptionString.toUpperCase().indexOf('COLOUR:') != -1)
   {document.writeln('<TR><TD ALIGN="CENTER">',f2,
                     'If your colour is out of stock,<BR>',
                     'shall we send a substitute?<BR>',
                     '(NO means we will wait for your colour)</FONT></TD>',
                     '<TD><SELECT NAME = "substit">',
                          '<option selected value=""                  >No </option>',
                          '<option          value=", Other colours OK">Yes</option></select>'
                    );
   };
 
 if (ItemType.indexOf('batt=') != -1)
    {
     var WhichBatt;
     WhichBatt = ItemType.substr(ItemType.indexOf('batt=')+5,1);
     myswitch: 
	 switch (WhichBatt)
     { case  'a': {BattQty = 1; BattPrice = AAprice; BattType = 'AA Alkaline'; BattCode = 'battAA'; break myswitch};
       case  'b': {BattQty = 2; BattPrice = AAprice; BattType = 'AA Alkaline'; BattCode = 'battAA'; break myswitch};
       case  'c': {BattQty = 3; BattPrice = AAprice; BattType = 'AA Alkaline'; BattCode = 'battAA'; break myswitch};
       case  'd': {BattQty = 4; BattPrice = AAprice; BattType = 'AA Alkaline'; BattCode = 'battAA'; break myswitch};
       case  'e': {BattQty = 1; BattPrice = Cprice;  BattType = 'C Alkaline';  BattCode = 'battC';  break myswitch};
       case  'f': {BattQty = 2; BattPrice = Cprice;  BattType = 'C Alkaline';  BattCode = 'battC';  break myswitch};
       case  'g': {BattQty = 3; BattPrice = Cprice;  BattType = 'C Alkaline';  BattCode = 'battC';  break myswitch};
       case  'h': {BattQty = 4; BattPrice = Cprice;  BattType = 'C Alkaline';  BattCode = 'battC';  break myswitch};
       case  'i': {BattQty = 2; BattPrice = bothprice; BattType = 'A & C Alkaline';  BattCode = 'battAC';break myswitch};
     };
   
    BattDesc = 'This product uses ' + BattQty + ' x ' + BattType + ' batteries.<BR>' +
	           'Tick the box to add them to your basket at £' + MoneyFormat(BattQty * BattPrice) + '.'; 

    document.writeln('<TR><TD ALIGN="CENTER">',f2, BattDesc, '</FONT></TD>',
                     '<TD><INPUT TYPE="checkbox" NAME="batts">',
                     '<IMAGE SRC="batts.gif" ALIGN="MIDDLE"',
                     'ALT="These are powerful, long life, high quality Alkaline (like Duracell) batteries'+
					 ' and will last far longer than any included batteries">'
                    );
   }; // Batteries
}; // Custom additem options function

function custom_additem_checks()
{if (OptionString.toUpperCase().indexOf('COLOUR:') != -1)
    {
     ChosenOptions += document.addform.substit[document.addform.substit.selectedIndex].value;
    }; // Product with colour choices


if  (ItemType.indexOf('batt=') != -1)
    {
     if (document.addform.batts.checked)
        {var BatteryItem = 'X^^gif^' + BattCode + '^^' + BattType + ' batteries to fit ' + ItemTitle
                         + ' @ £' + MoneyFormat(BattPrice) + ' each^' + BattPrice + '^^' + BattQty + '^-^'
                         + MoneyFormat(BattPrice * BattQty) + '|';
         OrderCookie += BatteryItem;
        };
    };
 return true;
}; //CUSTOM CHECKS

function custom_basket_topleft()
{
};

function custom_additem_tail()
{
};

function custom_basket_head()
{
};

function custom_basket_tail()
{
};
