<!-- Hide script from old browsers 

        // XML Functions
        var xmlhttp;
        function loadXMLDoc(url, intstatechange) {
            xmlhttp = null;
            if (window.XMLHttpRequest) {
                xmlhttp = new XMLHttpRequest();
            }
            else if (window.ActiveXObject) {
                xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
            }
            if (xmlhttp != null) {
                switch (intstatechange) {
                    case 0:
                        xmlhttp.onreadystatechange = stateChangeloadXMLDoc;
                        break;
                    case 1:
                        xmlhttp.onreadystatechange = MenuChangeExpandStateloadXMLDoc;
                        break;
                    case 2:
                        xmlhttp.onreadystatechange = comparatorloadXMLDoc;
                        break;
                    case 3:
                        xmlhttp.onreadystatechange = HiResloadXMLDoc;
                        break;
                    case 4:
                        xmlhttp.onreadystatechange = BasketjscriptloadXMLDoc;
                        break;
                    case 5:
                        xmlhttp.onreadystatechange = BasketSectionDeliveryloadXMLDoc;
                        break;
                    case 6:
                        xmlhttp.onreadystatechange = BasketSectionPaymentloadXMLDoc;
                        break;
                    case 7:
                        xmlhttp.onreadystatechange = BasketSectionEmailloadXMLDoc;
                        break;
                    default:
                        xmlhttp.onreadystatechange = stateChangeloadXMLDoc;
                        break;
                }
                xmlhttp.open("GET", url, true);
                xmlhttp.send(null);
            }
            else {
                alert("Your browser does not support XMLHTTP.");
            }
        }
        function stateChangeloadXMLDoc() {
            if (xmlhttp.readyState == 4) {
                // 4 = loaded
                if (xmlhttp.status == 200) {
                    // 200 = OK
                    // ...our code here...
                    // alert(xmlhttp.status);
                    // alert(xmlhttp.statusText);
                    // alert("[" + xmlhttp.responseText + "]");
                }
                else {
                    alert("Problem retrieving XML data");
                }
            }
        }


        // Exclude product from list - used in Low1 images
        function sendxmlfun1excproducttrue(strproductcode) {
            var strrandom = String.fromCharCode(38) + 'postrandomizer=' + Math.random();
            loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=1' + String.fromCharCode(38) + 'prodcode=' + strproductcode + String.fromCharCode(38) + 'truefalse=true' + String.fromCharCode(38) + 'returnpage=none' + strrandom, 0);
            excludedprodchangeimageexc(strproductcode);
        }

        function sendxmlfun1excproductfalse(strproductcode) {
            var strrandom = String.fromCharCode(38) + 'postrandomizer=' + Math.random();
            loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=1' + String.fromCharCode(38) + 'prodcode=' + strproductcode + String.fromCharCode(38) + 'truefalse=false' + String.fromCharCode(38) + 'returnpage=none' + strrandom, 0);
            excludedprodchangeimageinc(strproductcode);
        }

        function excludedprodchangeimageexc(strproductcode) {
            strimagename = "excludeproduct" + strproductcode;
            document[strimagename].src = imgexcludedprodincexcgif2.src;
        }

        function excludedprodchangeimageinc(strproductcode) {
            strimagename = "excludeproduct" + strproductcode;
            document[strimagename].src = imgexcludedprodincexcgif1.src;
        }

        function excludeproduct(strproductcode) {
            if (eval('excludeproductswitch' + strproductcode + ';') >= 1) {
                eval('excludeproductswitch' + strproductcode + ' = 0;');
                sendxmlfun1excproductfalse(strproductcode);
            }
            else {
                eval('excludeproductswitch' + strproductcode + ' = 1;');
                sendxmlfun1excproducttrue(strproductcode);
            }
        }

        // Load images - Used in Exclude products in Low1
        imgexcludedprodincexcgif1 = new Image;
        imgexcludedprodincexcgif2 = new Image;

        imgexcludedprodincexcgif1.src = "../PurelyImages/excludeproductinc.gif";
        imgexcludedprodincexcgif2.src = "../PurelyImages/excludeproductexc.gif";

        // Product Comparator functions - Used in recent list
        var IE = document.all ? true : false;
        var intMouseX = 0;
        var intMouseY = 0;

        function DocumentScrollTop() {
            var intScrollTop;
            // Document dimensions
            if (typeof window.pageYOffset != 'undefined') {
                intScrollTop = window.pageYOffset
            }
            else {
                intScrollTop = document.documentElement.scrollTop;
            }
            return intScrollTop;
        }
        function ComparatorGetMouseXY() {
            if (1 == 1) {
                intMouseX = event.clientX;
                intMouseY = event.clientY + DocumentScrollTop();
            }
            else {
                intMouseX = e.pageX;
                intMouseY = e.pageY;
            }
        }

        // Functions use by MiniShadeChart in products page
        var intBrightnessDefault = 1;

        function MiniChartFindX(obj) {
            var curleft = 0;
            if (obj.offsetParent)
                while (1) {
                    curleft += obj.offsetLeft;
                    if (!obj.offsetParent)
                        break;
                    obj = obj.offsetParent;
                }
            else if (obj.x)
                curleft += obj.x;
            return curleft;
        }
        function MiniChartFindY(obj) {
            var curtop = 0;
            if (obj.offsetParent)
                while (1) {
                    curtop += obj.offsetTop;
                    if (!obj.offsetParent)
                        break;
                    obj = obj.offsetParent;
                }
            else if (obj.y)
                curtop += obj.y;
            return curtop;
        }
        function MiniChartPlaceImageX(intX) {
            document.all.MiniChartDiv.style.pixelLeft = intX;
        }
        function MiniChartPlaceImageY(intY) {
            document.all.MiniChartDiv.style.pixelTop = intY;
        }
        function MiniChartShowDiv() {
            if (document.getElementById) {
                document.getElementById('MiniChartDiv').style.visibility = 'visible';
            }
            else {
                if (document.layers) {
                    document.MiniChartDiv.visibility = 'visible';
                }
                else {
                    document.all.MiniChartDiv.style.visibility = 'visible';
                }
            }
        }
        function MiniChartHideDiv() {
            if (document.getElementById) {
                document.getElementById('MiniChartDiv').style.visibility = 'hidden';
            }
            else {
                if (document.layers) {
                    document.MiniChartDiv.visibility = 'hidden';
                }
                else {
                    document.all.MiniChartDiv.style.visibility = 'hidden';
                }
            }
        }
        function MiniChartMouseOverSlot(strShadeColour, intLastSlotInShadeColour) {
            var intSlot = 0;
            var intImageLeft = MiniChartFindX(document['MiniSlot1']);
            ComparatorGetMouseXY();
            intImageLeft = intMouseX - intImageLeft - 75;
            if (intImageLeft <= 0) { return 0 }
            intSlot = Math.floor(intImageLeft / 15) + 1;
            if (intSlot <= intLastSlotInShadeColour) {
                return intSlot
            }
            else {
                return 0
            }
        }
        function MiniChartMouseOut() {
            MiniChartHideDiv();
            cursorclear();
        }
        function MiniChartMouseMove(strShadeColour, intLastSlotInShadeColour) {
            var strSlot = MiniChartMouseOverSlot(strShadeColour, intLastSlotInShadeColour);
            var strValues = '';

            if (strSlot == '0') {
                MiniChartHideDiv();
                cursorclear();
                return;
            }

            //strValues = 'Slot' + strSlot;
            //document.getElementById('MiniChartDivSpan').innerHTML = strValues;
            cursorhand();
            MiniChartPlaceImageX(intMouseX - 125);
            MiniChartPlaceImageY(intMouseY - 85);
            MiniChartShowDiv();
            MiniChartChangePicture(strShadeColour, strSlot);
        }
        function MiniChartMouseClick(strShadeColour, intLastSlotInShadeColour, intProductCode, str1, str2, str3, str4, str5, str6, str7, str8, str9, str10, str11, str12, str13, str14, str15, str16, str17, str18, str19, str20) {
            var strrandom = String.fromCharCode(38) + 'postrandomizer=' + Math.random();
            var strSlot = MiniChartMouseOverSlot(strShadeColour, intLastSlotInShadeColour);
            if (strSlot == '0') {
                return 0
            }
            var strColour = eval('str' + strSlot);
            var strTarget = '../FunctionsSitePreferences.aspx?functionnumber=19' + String.fromCharCode(38) + 'prodcode=' + intProductCode + String.fromCharCode(38) + 'selectedshade=' + strColour + String.fromCharCode(38) + 'returnpage=All_Products/Wigs_' + intProductCode + '.aspx' + strrandom;
            window.location = strTarget;
        }
        function MiniChartReselect(intProductCode) {
            var strrandom = String.fromCharCode(38) + 'postrandomizer=' + Math.random();

            var strTarget = '../FunctionsSitePreferences.aspx?functionnumber=19' + String.fromCharCode(38) + 'prodcode=' + intProductCode + String.fromCharCode(38) + 'selectedshade=0' + String.fromCharCode(38) + 'returnpage=All_Products/Wigs_' + intProductCode + '.aspx' + strrandom;
            window.location = strTarget;
        }

        imgMiniChartShadeColour1DisplayImage1 = new Image;
        imgMiniChartShadeColour1DisplayImage2 = new Image;
        imgMiniChartShadeColour1DisplayImage3 = new Image;
        imgMiniChartShadeColour1DisplayImage4 = new Image;
        imgMiniChartShadeColour1DisplayImage5 = new Image;
        imgMiniChartShadeColour1DisplayImage6 = new Image;
        imgMiniChartShadeColour1DisplayImage7 = new Image;
        imgMiniChartShadeColour1DisplayImage8 = new Image;
        imgMiniChartShadeColour1DisplayImage9 = new Image;
        imgMiniChartShadeColour1DisplayImage10 = new Image;
        imgMiniChartShadeColour1DisplayImage11 = new Image;
        imgMiniChartShadeColour1DisplayImage12 = new Image;
        imgMiniChartShadeColour1DisplayImage13 = new Image;
        imgMiniChartShadeColour1DisplayImage14 = new Image;
        imgMiniChartShadeColour1DisplayImage15 = new Image;
        imgMiniChartShadeColour1DisplayImage16 = new Image;
        imgMiniChartShadeColour1DisplayImage17 = new Image;
        imgMiniChartShadeColour1DisplayImage18 = new Image;
        imgMiniChartShadeColour1DisplayImage19 = new Image;
        imgMiniChartShadeColour1DisplayImage20 = new Image;

        imgMiniChartShadeColour2DisplayImage1 = new Image;
        imgMiniChartShadeColour2DisplayImage2 = new Image;
        imgMiniChartShadeColour2DisplayImage3 = new Image;
        imgMiniChartShadeColour2DisplayImage4 = new Image;
        imgMiniChartShadeColour2DisplayImage5 = new Image;
        imgMiniChartShadeColour2DisplayImage6 = new Image;
        imgMiniChartShadeColour2DisplayImage7 = new Image;
        imgMiniChartShadeColour2DisplayImage8 = new Image;
        imgMiniChartShadeColour2DisplayImage9 = new Image;
        imgMiniChartShadeColour2DisplayImage10 = new Image;
        imgMiniChartShadeColour2DisplayImage11 = new Image;
        imgMiniChartShadeColour2DisplayImage12 = new Image;
        imgMiniChartShadeColour2DisplayImage13 = new Image;
        imgMiniChartShadeColour2DisplayImage14 = new Image;
        imgMiniChartShadeColour2DisplayImage15 = new Image;
        imgMiniChartShadeColour2DisplayImage16 = new Image;
        imgMiniChartShadeColour2DisplayImage17 = new Image;
        imgMiniChartShadeColour2DisplayImage18 = new Image;
        imgMiniChartShadeColour2DisplayImage19 = new Image;
        imgMiniChartShadeColour2DisplayImage20 = new Image;

        imgMiniChartShadeColour3DisplayImage1 = new Image;
        imgMiniChartShadeColour3DisplayImage2 = new Image;
        imgMiniChartShadeColour3DisplayImage3 = new Image;
        imgMiniChartShadeColour3DisplayImage4 = new Image;
        imgMiniChartShadeColour3DisplayImage5 = new Image;
        imgMiniChartShadeColour3DisplayImage6 = new Image;
        imgMiniChartShadeColour3DisplayImage7 = new Image;
        imgMiniChartShadeColour3DisplayImage8 = new Image;
        imgMiniChartShadeColour3DisplayImage9 = new Image;
        imgMiniChartShadeColour3DisplayImage10 = new Image;
        imgMiniChartShadeColour3DisplayImage11 = new Image;
        imgMiniChartShadeColour3DisplayImage12 = new Image;
        imgMiniChartShadeColour3DisplayImage13 = new Image;
        imgMiniChartShadeColour3DisplayImage14 = new Image;
        imgMiniChartShadeColour3DisplayImage15 = new Image;
        imgMiniChartShadeColour3DisplayImage16 = new Image;
        imgMiniChartShadeColour3DisplayImage17 = new Image;
        imgMiniChartShadeColour3DisplayImage18 = new Image;
        imgMiniChartShadeColour3DisplayImage19 = new Image;
        imgMiniChartShadeColour3DisplayImage20 = new Image;

        imgMiniChartShadeColour4DisplayImage1 = new Image;
        imgMiniChartShadeColour4DisplayImage2 = new Image;
        imgMiniChartShadeColour4DisplayImage3 = new Image;
        imgMiniChartShadeColour4DisplayImage4 = new Image;
        imgMiniChartShadeColour4DisplayImage5 = new Image;
        imgMiniChartShadeColour4DisplayImage6 = new Image;
        imgMiniChartShadeColour4DisplayImage7 = new Image;
        imgMiniChartShadeColour4DisplayImage8 = new Image;
        imgMiniChartShadeColour4DisplayImage9 = new Image;
        imgMiniChartShadeColour4DisplayImage10 = new Image;
        imgMiniChartShadeColour4DisplayImage11 = new Image;
        imgMiniChartShadeColour4DisplayImage12 = new Image;
        imgMiniChartShadeColour4DisplayImage13 = new Image;
        imgMiniChartShadeColour4DisplayImage14 = new Image;
        imgMiniChartShadeColour4DisplayImage15 = new Image;
        imgMiniChartShadeColour4DisplayImage16 = new Image;
        imgMiniChartShadeColour4DisplayImage17 = new Image;
        imgMiniChartShadeColour4DisplayImage18 = new Image;
        imgMiniChartShadeColour4DisplayImage19 = new Image;
        imgMiniChartShadeColour4DisplayImage20 = new Image;

        imgMiniChartShadeColour5DisplayImage1 = new Image;
        imgMiniChartShadeColour5DisplayImage2 = new Image;
        imgMiniChartShadeColour5DisplayImage3 = new Image;
        imgMiniChartShadeColour5DisplayImage4 = new Image;
        imgMiniChartShadeColour5DisplayImage5 = new Image;
        imgMiniChartShadeColour5DisplayImage6 = new Image;
        imgMiniChartShadeColour5DisplayImage7 = new Image;
        imgMiniChartShadeColour5DisplayImage8 = new Image;
        imgMiniChartShadeColour5DisplayImage9 = new Image;
        imgMiniChartShadeColour5DisplayImage10 = new Image;
        imgMiniChartShadeColour5DisplayImage11 = new Image;
        imgMiniChartShadeColour5DisplayImage12 = new Image;
        imgMiniChartShadeColour5DisplayImage13 = new Image;
        imgMiniChartShadeColour5DisplayImage14 = new Image;
        imgMiniChartShadeColour5DisplayImage15 = new Image;
        imgMiniChartShadeColour5DisplayImage16 = new Image;
        imgMiniChartShadeColour5DisplayImage17 = new Image;
        imgMiniChartShadeColour5DisplayImage18 = new Image;
        imgMiniChartShadeColour5DisplayImage19 = new Image;
        imgMiniChartShadeColour5DisplayImage20 = new Image;

        imgMiniChartShadeColour6DisplayImage1 = new Image;
        imgMiniChartShadeColour6DisplayImage2 = new Image;
        imgMiniChartShadeColour6DisplayImage3 = new Image;
        imgMiniChartShadeColour6DisplayImage4 = new Image;
        imgMiniChartShadeColour6DisplayImage5 = new Image;
        imgMiniChartShadeColour6DisplayImage6 = new Image;
        imgMiniChartShadeColour6DisplayImage7 = new Image;
        imgMiniChartShadeColour6DisplayImage8 = new Image;
        imgMiniChartShadeColour6DisplayImage9 = new Image;
        imgMiniChartShadeColour6DisplayImage10 = new Image;
        imgMiniChartShadeColour6DisplayImage11 = new Image;
        imgMiniChartShadeColour6DisplayImage12 = new Image;
        imgMiniChartShadeColour6DisplayImage13 = new Image;
        imgMiniChartShadeColour6DisplayImage14 = new Image;
        imgMiniChartShadeColour6DisplayImage15 = new Image;
        imgMiniChartShadeColour6DisplayImage16 = new Image;
        imgMiniChartShadeColour6DisplayImage17 = new Image;
        imgMiniChartShadeColour6DisplayImage18 = new Image;
        imgMiniChartShadeColour6DisplayImage19 = new Image;
        imgMiniChartShadeColour6DisplayImage20 = new Image;

        function MiniChartSetBrightnessLevel(intBrightness) {
            intBrightnessDefault = intBrightness;
        }
        function MiniChartLoadPicture(intShadeColour, intItemCounter, strJPG) {
            var strEval = '';
            var strPathName = '../PublicImages/shaderings/ShadeRing1Bright' + intBrightnessDefault + '/' + strJPG;
            var strImageName = 'imgMiniChartShadeColour' + intShadeColour + 'DisplayImage' + intItemCounter + '.src';

            strEval = strImageName + ' = "' + strPathName + '"';
            eval(strEval);
        }
        function M(intShadeColour, intItemCounter, strJPG) { MiniChartLoadPicture(intShadeColour, intItemCounter, strJPG) }
        function MiniChartChangePicture(strShadeColour, intItemCounter) {
            var strEval = 'document.MiniChartImage.src = imgMiniChartShadeColour' + strShadeColour + 'DisplayImage' + intItemCounter + '.src';
            eval(strEval);
        }

        // Function used in Preference Fail Report
        function changeExcludeProductBtn(strbtnnumber, strproductcode) {
            var strrandom = String.fromCharCode(38) + 'postrandomizer=' + Math.random();
            strvarname = "btnExcludeProductSwitch" + strbtnnumber;

            if (eval(strvarname) == 0) {
                changeReturnToPreviousPageBtnON();
                strimagename = "btnExcludeProductImgSwitch" + strbtnnumber;
                document[strimagename].src = btnRestoreExcludedON.src;
                loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=1' + String.fromCharCode(38) + 'prodcode=' + strproductcode + String.fromCharCode(38) + 'truefalse=false' + String.fromCharCode(38) + 'returnpage=none' + strrandom, 0);
                eval(strvarname + ' = 1');
            }
            else {
                strimagename = "btnExcludeProductImgSwitch" + strbtnnumber;
                document[strimagename].src = btnRestoreExcludedOFF.src;
                loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=1' + String.fromCharCode(38) + 'prodcode=' + strproductcode + String.fromCharCode(38) + 'truefalse=true' + String.fromCharCode(38) + 'returnpage=none' + strrandom, 0);
                eval(strvarname + ' = 0');
            }
        }

        function changeProfessionalProductBtn(strbtnnumber, strproductcode) {
            changeReturnToPreviousPageBtnON();
            var strrandom = String.fromCharCode(38) + 'postrandomizer=' + Math.random();
            strvarname = "btnProfessionalProductSwitch" + strbtnnumber;

            if (eval(strvarname) == 0) {
                changeProfessionalBtnON();
                loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=5' + String.fromCharCode(38) + 'truefalse=true' + String.fromCharCode(38) + 'returnpage=none' + strrandom, 0);
            }
            else {
                changeProfessionalBtnOFF();
                loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=5' + String.fromCharCode(38) + 'truefalse=false' + String.fromCharCode(38) + 'returnpage=none' + strrandom, 0);
            }
        }

        function changeColourBlondeBtn(strbtnnumber, strproductcode) {
            changeReturnToPreviousPageBtnON();
            var strrandom = String.fromCharCode(38) + 'postrandomizer=' + Math.random();
            strvarname = "btnColourBlondesSwitch" + strbtnnumber;

            if (eval(strvarname) == 0) {
                changeColourBlondesBtnON();
                loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=6' + String.fromCharCode(38) + 'truefalse=true' + String.fromCharCode(38) + 'returnpage=none' + strrandom, 0);
            }
            else {
                changeColourBlondesBtnOFF();
                loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=6' + String.fromCharCode(38) + 'truefalse=false' + String.fromCharCode(38) + 'returnpage=none' + strrandom, 0);
            }
        }

        function changeColourBrunetteBtn(strbtnnumber, strproductcode) {
            changeReturnToPreviousPageBtnON();
            var strrandom = String.fromCharCode(38) + 'postrandomizer=' + Math.random();
            strvarname = "btnColourBrunettesSwitch" + strbtnnumber;

            if (eval(strvarname) == 0) {
                changeColourBrunettesBtnON();
                loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=7' + String.fromCharCode(38) + 'truefalse=true' + String.fromCharCode(38) + 'returnpage=none' + strrandom, 0);
            }
            else {
                changeColourBrunettesBtnOFF();
                loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=7' + String.fromCharCode(38) + 'truefalse=false' + String.fromCharCode(38) + 'returnpage=none' + strrandom, 0);
            }
        }

        function changeColourRedBtn(strbtnnumber, strproductcode) {
            changeReturnToPreviousPageBtnON();
            var strrandom = String.fromCharCode(38) + 'postrandomizer=' + Math.random();
            strvarname = "btnColourRedsSwitch" + strbtnnumber;

            if (eval(strvarname) == 0) {
                changeColourRedsBtnON();
                loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=8' + String.fromCharCode(38) + 'truefalse=true' + String.fromCharCode(38) + 'returnpage=none' + strrandom, 0);
            }
            else {
                changeColourRedsBtnOFF();
                loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=8' + String.fromCharCode(38) + 'truefalse=false' + String.fromCharCode(38) + 'returnpage=none' + strrandom, 0);
            }
        }

        function changeColourGreyBtn(strbtnnumber, strproductcode) {
            changeReturnToPreviousPageBtnON();
            var strrandom = String.fromCharCode(38) + 'postrandomizer=' + Math.random();
            strvarname = "btnColourGreysSwitch" + strbtnnumber;

            if (eval(strvarname) == 0) {
                changeColourGreysBtnON();
                loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=9' + String.fromCharCode(38) + 'truefalse=true' + String.fromCharCode(38) + 'returnpage=none' + strrandom, 0);
            }
            else {
                changeColourGreysBtnOFF();
                loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=9' + String.fromCharCode(38) + 'truefalse=false' + String.fromCharCode(38) + 'returnpage=none' + strrandom, 0);
            }
        }

        function changeColourHighlightBtn(strbtnnumber, strproductcode) {
            changeReturnToPreviousPageBtnON();
            var strrandom = String.fromCharCode(38) + 'postrandomizer=' + Math.random();
            strvarname = "btnColourHighlightsSwitch" + strbtnnumber;

            if (eval(strvarname) == 0) {
                changeColourHighlightsBtnON();
                loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=10' + String.fromCharCode(38) + 'truefalse=true' + String.fromCharCode(38) + 'returnpage=none' + strrandom, 0);
            }
            else {
                changeColourHighlightsBtnOFF();
                loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=10' + String.fromCharCode(38) + 'truefalse=false' + String.fromCharCode(38) + 'returnpage=none' + strrandom, 0);
            }
        }

        function changeColourFunBtn(strbtnnumber, strproductcode) {
            changeReturnToPreviousPageBtnON();
            var strrandom = String.fromCharCode(38) + 'postrandomizer=' + Math.random();
            strvarname = "btnColourFunSwitch" + strbtnnumber;

            if (eval(strvarname) == 0) {
                changeColourFunBtnON();
                loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=10' + String.fromCharCode(38) + 'truefalse=true' + String.fromCharCode(38) + 'returnpage=none' + strrandom, 0);
            }
            else {
                changeColourFunBtnOFF();
                loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=10' + String.fromCharCode(38) + 'truefalse=false' + String.fromCharCode(38) + 'returnpage=none' + strrandom, 0);
            }
        }
        // Functions for Brochure Ordering
        function brochureforwardform() {
            var TheForm;
            TheForm = document.forms.mainformbody;
            var strrandom = String.fromCharCode(38) + 'postrandomizer=' + Math.random();
            var strVars = '';

            strVars += String.fromCharCode(38) + 'nameTitleText=' + TheForm.nameTitleText.value;
            strVars += String.fromCharCode(38) + 'nameFirstNameText=' + TheForm.nameFirstNameText.value;
            strVars += String.fromCharCode(38) + 'nameSurnameText=' + TheForm.nameSurnameText.value;
            strVars += String.fromCharCode(38) + 'nameCompanyText=' + TheForm.nameCompanyText.value;
            strVars += String.fromCharCode(38) + 'namePropertyText=' + TheForm.namePropertyText.value;
            strVars += String.fromCharCode(38) + 'nameStreet1Text=' + TheForm.nameStreet1Text.value;
            strVars += String.fromCharCode(38) + 'nameStreet2Text=' + TheForm.nameStreet2Text.value;
            strVars += String.fromCharCode(38) + 'nameCountyText=' + TheForm.nameCountyText.value;
            strVars += String.fromCharCode(38) + 'namePostCodeText=' + TheForm.namePostCodeText.value;
            strVars += String.fromCharCode(38) + 'nameCountryText=' + TheForm.nameCountryText.value;
            strVars += String.fromCharCode(38) + 'namePhoneNumberText=' + TheForm.namePhoneNumberText.value;
            strVars += String.fromCharCode(38) + 'nameEmailText=' + TheForm.nameEmailText.value;

            var strTarget = '../FunctionsSitePreferences.aspx?functionnumber=23' + strVars + String.fromCharCode(38) + 'returnpage=Wigs_UK_FREE_Brochure_Thank_You_Purely_Wigs' + strrandom;
            window.location = strTarget;
        }
        function brochureforwardformrealhair() {
            var TheForm;
            TheForm = document.forms.mainformbody;
            var strrandom = String.fromCharCode(38) + 'postrandomizer=' + Math.random();
            var strVars = '';

            strVars += String.fromCharCode(38) + 'nameWomansBrochureCheckbox=' + TheForm.nameWomansBrochureCheckbox.checked;
            strVars += String.fromCharCode(38) + 'nameMensBrochureCheckbox=' + TheForm.nameMensBrochureCheckbox.checked;

            strVars += String.fromCharCode(38) + 'nameTitleText=' + TheForm.nameTitleText.value;
            strVars += String.fromCharCode(38) + 'nameFirstNameText=' + TheForm.nameFirstNameText.value;
            strVars += String.fromCharCode(38) + 'nameSurnameText=' + TheForm.nameSurnameText.value;
            strVars += String.fromCharCode(38) + 'nameCompanyText=' + TheForm.nameCompanyText.value;
            strVars += String.fromCharCode(38) + 'namePropertyText=' + TheForm.namePropertyText.value;
            strVars += String.fromCharCode(38) + 'nameStreet1Text=' + TheForm.nameStreet1Text.value;
            strVars += String.fromCharCode(38) + 'nameStreet2Text=' + TheForm.nameStreet2Text.value;
            strVars += String.fromCharCode(38) + 'nameCountyText=' + TheForm.nameCountyText.value;
            strVars += String.fromCharCode(38) + 'namePostCodeText=' + TheForm.namePostCodeText.value;
            strVars += String.fromCharCode(38) + 'nameCountryText=' + TheForm.nameCountryText.value;
            strVars += String.fromCharCode(38) + 'namePhoneNumberText=' + TheForm.namePhoneNumberText.value;
            strVars += String.fromCharCode(38) + 'nameEmailText=' + TheForm.nameEmailText.value;

            var strTarget = '../FunctionsSitePreferences.aspx?functionnumber=25' + strVars + String.fromCharCode(38) + 'returnpage=Wigs_UK_FREE_Brochure_Thank_You_Purely_Wigs' + strrandom;
            window.location = strTarget;
        }
        // Functions for Underwraps ordering
        function underwrapsorderingform() {
            var TheForm;
            TheForm = document.forms.mainformbody;
            var strrandom = String.fromCharCode(38) + 'postrandomizer=' + Math.random();
            var strVars = '';

            strVars += String.fromCharCode(38) + 'nameUnderWraps12QtyText=' + TheForm.nameUnderWraps12QtyText.value;
            strVars += String.fromCharCode(38) + 'nameUnderWraps25QtyText=' + TheForm.nameUnderWraps25QtyText.value;

            var strTarget = '../FunctionsSitePreferences.aspx?functionnumber=24' + strVars + String.fromCharCode(38) + 'returnpage=Wigs_UK_Basket_Contents_Purely_Wigs' + strrandom;
            window.location = strTarget;
        }

        // Functions for LeftBarMenu - MenuChangeExpandState(51);
        // Load images used in Menu
        imgexpandexpgif = new Image;
        imgexpandcolgif = new Image;
        imgexpandwaigif = new Image;

        imgexpandexpgif.src = "../PurelyImages/MenuPlus.gif";
        imgexpandcolgif.src = "../PurelyImages/MenuMinus.gif";
        imgexpandwaigif.src = "../PurelyImages/MenuWait.gif";

        var lngcategorynumberXML;
        function MenuChangeExpandState(lngcategorynumber) {
            strimgname = 'ExpandCategoryBTN' + lngcategorynumber;
            document[strimgname].src = imgexpandwaigif.src;
            var strrandom = String.fromCharCode(38) + 'postrandomizer=' + Math.random();
            lngcategorynumberXML = lngcategorynumber;
            loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=15' + String.fromCharCode(38) + 'categorynumber=' + lngcategorynumber + String.fromCharCode(38) + 'returnpage=none' + strrandom, 1);
        }

        function MenuChangeExpandStateloadXMLDoc() {
            var strxml;
            var strimgname;
            if (xmlhttp.readyState == 4) {// 4 = "loaded"
                if (xmlhttp.status == 200) {// 200 = OK
                    strxml = xmlhttp.responseText;
                    if (strxml == '') {
                        document.getElementById('CategoryItems' + lngcategorynumberXML).innerHTML = '';
                        name = "ExpandCategoryBTN<%CategoryNumber()%>"
                        strimgname = 'ExpandCategoryBTN' + lngcategorynumberXML;
                        document[strimgname].src = imgexpandexpgif.src;
                    }
                    else {
                        document.getElementById('CategoryItems' + lngcategorynumberXML).innerHTML = strxml;
                        strimgname = 'ExpandCategoryBTN' + lngcategorynumberXML;
                        document[strimgname].src = imgexpandcolgif.src;
                    }
                }
                else {
                    alert("Problem retrieving XML data");
                }
            }
            cursorclear();
        }

        function cursorwait() {
            document.body.style.cursor = 'wait';
        }
        function cursorhand() {
            document.body.style.cursor = 'hand';
        }
        function cursorclear() {
            document.body.style.cursor = 'default';
        }

        // Basket functions
        imgBasketXMLLoading0 = new Image;
        imgBasketXMLLoading1 = new Image;
        imgBasketXMLindicator0 = new Image;
        imgBasketXMLindicator1 = new Image;
        imgBasketXMLindicator2 = new Image;
        imgBasketXMLindicator3 = new Image;

        imgBasketXMLLoading0.src = "../PurelyImages/1x1white.gif";
        imgBasketXMLLoading1.src = "../PurelyImages/comparatorloading.gif";
        imgBasketXMLindicator0.src = "../PurelyImages/BasketXMLFieldIndicators0.gif";
        imgBasketXMLindicator1.src = "../PurelyImages/BasketXMLFieldIndicators1.gif";
        imgBasketXMLindicator2.src = "../PurelyImages/BasketXMLFieldIndicators2.gif";
        imgBasketXMLindicator3.src = "../PurelyImages/BasketXMLFieldIndicators3.gif";

        function BasketEmailSendButton() {
            BasketShowUpdateEmail();
        }

        function BasketEmailChangeAddress() {
            var TheForm;
            TheForm = document.forms.mainformbody;
            var strVars = '';

            TheForm.TextNameEmailAddress.value = strVars;

            BasketShowUpdateEmail();
        }


        // Add to Basket function
        imgBasketAddNormal = new Image;
        imgBasketAddOver = new Image;

        imgBasketAddNormal.src = "../PurelyImages/addtobasketbtn0_normal.gif";
        imgBasketAddOver.src = "../PurelyImages/addtobasketbtn0_over.gif";

        function BasketAddNormal(objImage) {
            objImage.src = imgBasketAddNormal.src;
        }
        function BasketAddOver(objImage) {
            objImage.src = imgBasketAddOver.src;
        }
        function BasketAdd(intProductCode, intQty, intColour) {
            var TheForm;
            TheForm = document.forms.mainformbody;
            var strrandom = String.fromCharCode(38) + 'postrandomizer=' + Math.random();
            var intQtyToAdd = intQty;
            if (intQty == 0) {
                if (TheForm.BasketAddQty.value == '') {
                    intQtyToAdd = 1;
                }
                else {
                    intQtyToAdd = TheForm.BasketAddQty.value;
                    if (intQtyToAdd == 0) { intQtyToAdd = 1 }
                }
            }
            var strTarget = '../FunctionsSitePreferences.aspx?functionnumber=1000' + String.fromCharCode(38) + 'prodcode=' + intProductCode + String.fromCharCode(38) + 'qty=' + intQtyToAdd + String.fromCharCode(38) + 'selectedshade=' + intColour + String.fromCharCode(38) + 'returnpage=Wigs_UK_Basket_Contents_Purely_Wigs' + strrandom;
            window.location = strTarget;
        }
        function BasketAddPromotional() {
            var TheForm;
            TheForm = document.forms.mainformbody;
            var strrandom = String.fromCharCode(38) + 'postrandomizer=' + Math.random();
            var strPromotionalCode = '';
            if (TheForm.NamePromotionalCode.value == '') {
                alert('Please enter your promotional code');
                return '';
            }
            else {
                strPromotionalCode = TheForm.NamePromotionalCode.value;
            }
            var strTarget = '../FunctionsSitePreferences.aspx?functionnumber=2001' + String.fromCharCode(38) + 'ProCodeUniqueNumber=' + strPromotionalCode + String.fromCharCode(38) + 'returnpage=../Wigs_UK_Basket_Contents_Purely_Wigs' + strrandom;
            window.location = strTarget;
        }
        function BasketUpdateQty(strFieldName, intItemNumber) {
            var TheForm;
            TheForm = document.forms.mainformbody;
            var strrandom = String.fromCharCode(38) + 'postrandomizer=' + Math.random();
            var intQtyToAdd = 0;
            if (TheForm[strFieldName].value == '') {
                intQtyToAdd = 1;
            }
            else {
                intQtyToAdd = TheForm[strFieldName].value;
                if (intQtyToAdd == 0) { intQtyToAdd = 1 }
            }
            var strTarget = '../FunctionsSitePreferences.aspx?functionnumber=1020' + String.fromCharCode(38) + 'itemnumber=' + intItemNumber + String.fromCharCode(38) + 'qty=' + intQtyToAdd + String.fromCharCode(38) + 'returnpage=' + document.URL + strrandom;
            window.location = strTarget;
        }
        function BasketUpdateQtyFieldEnter(strFieldName, intItemNumber, thefield, e) {
            var keycode = 0;
            if (window.event) {
                keycode = window.event.keyCode;
            }
            else {
                if (e) {
                    keycode = e.which;
                }
                else {
                    return true;
                }
            }

            if (keycode == 13) {
                BasketUpdateQty(strFieldName, intItemNumber);
                return false;
            }
            else {
                return true;
            }

        }
        function BasketOnChangeDelivery() {
            var TheForm;
            TheForm = document.forms.mainformbody;
            var strrandom = String.fromCharCode(38) + 'postrandomizer=' + Math.random();
            var intDelivery = 0;
            if (TheForm.DeliveryMethod.value == '') {
                intDelivery = 1;
            }
            else {
                intDelivery = TheForm.DeliveryMethod.value;
                if (intDelivery == 0) { intDelivery = 1 }
            }
            var strTarget = '../FunctionsSitePreferences.aspx?functionnumber=1030' + String.fromCharCode(38) + 'deliverymethod=' + intDelivery + String.fromCharCode(38) + 'returnpage=' + document.URL + strrandom;
            window.location = strTarget;
        }
        function BasketValidateForm() {
            return false;
        }
        function BasketPlaceYourOrderBTNClick() {
            var TheForm;
            TheForm = document.forms.mainformbody;
            var strrandom = String.fromCharCode(38) + 'postrandomizer=' + Math.random();
            var booDeliveryValue = TheForm.CheckboxNameDeliverTo1.checked;

            TheForm.ButtonNamePlaceYourOrder.disabled = true;
            document.BasketContentLoading.src = imgBasketXMLLoading1.src;
            loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=1200' + encodeURI(BasketSectionDelivery()) + encodeURI(BasketSectionPayment()) + encodeURI(BasketSectionEmail()) + String.fromCharCode(38) + 'returnpage=none' + strrandom, 4);
        }
        function BasketjscriptXMLSend(strFieldName, strFieldID, strIndicatorFieldName, strSpanFieldID, strExtraFieldName) {
            var TheForm;
            TheForm = document.forms.mainformbody;
            var strrandom = String.fromCharCode(38) + 'postrandomizer=' + Math.random();
            var strFieldValue = TheForm[strFieldName].value;
            var strExtraFieldValue = '';

            if (strExtraFieldName != '') {
                strExtraFieldValue = TheForm[strExtraFieldName].value;
            }
            if (strIndicatorFieldName != '') {
                document[strIndicatorFieldName].src = imgBasketXMLindicator1.src;
            }
            loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=1040' + String.fromCharCode(38) + 'fieldname=' + encodeURI(strFieldName) + String.fromCharCode(38) + 'fieldid=' + encodeURI(strFieldID) + String.fromCharCode(38) + 'fieldindicatorname=' + encodeURI(strIndicatorFieldName) + String.fromCharCode(38) + 'fieldvalue=' + encodeURI(strFieldValue) + String.fromCharCode(38) + 'fieldspan=' + encodeURI(strSpanFieldID) + String.fromCharCode(38) + 'extrafieldvalue=' + encodeURI(strExtraFieldValue) + String.fromCharCode(38) + 'returnpage=none' + strrandom, 4);
        }
        function BasketjscriptloadXMLDoc() {
            if (xmlhttp.readyState == 4) {
                // 4 = loaded
                if (xmlhttp.status == 200) {
                    // 200 = OK
                    var strJscript = decodeURI(xmlhttp.responseText);
                    //alert("[" + strJscript + "]");
                    try {
                        eval(strJscript);
                    }
                    catch (err) {
                        // Error
                        alert('XML Jscript Error');
                    }
                }
                else {
                    alert("Problem retrieving XML data");
                }
            }
        }
        function BasketSectionDeliveryloadXMLDoc() {
            var TheForm;
            TheForm = document.forms.mainformbody;

            if (xmlhttp.readyState == 4) {
                // 4 = loaded
                if (xmlhttp.status == 200) {
                    // 200 = OK
                    var strHTML = decodeURI(xmlhttp.responseText);
                    //alert("[" + strJscript + "]");
                    try {
                        document.getElementById('BasketCheckoutDeliverySpan').innerHTML = strHTML;
                        var strVars = TheForm.TextNameDeliveryHiddenJscript1.value;
                        eval(strVars);
                    }
                    catch (err) {
                        // Error
                        alert('XML Jscript Error');
                    }
                }
                else {
                    alert("Problem retrieving XML data");
                }
            }
        }
        function BasketSectionEmailloadXMLDoc() {
            var TheForm;
            TheForm = document.forms.mainformbody;

            if (xmlhttp.readyState == 4) {
                // 4 = loaded
                if (xmlhttp.status == 200) {
                    // 200 = OK
                    var strHTML = decodeURI(xmlhttp.responseText);
                    //alert("[" + strJscript + "]");
                    try {
                        document.getElementById('BasketCheckoutEmailSpan').innerHTML = strHTML;
                        var strVars = TheForm.TextNameHiddenJScript1.value;
                        eval(strVars);
                    }
                    catch (err) {
                        // Error
                        alert('XML Jscript Error');
                    }
                }
                else {
                    alert("Problem retrieving XML data");
                }
            }
        }
        function BasketSectionPaymentloadXMLDoc() {
            var TheForm;
            TheForm = document.forms.mainformbody;

            if (xmlhttp.readyState == 4) {
                // 4 = loaded
                if (xmlhttp.status == 200) {
                    // 200 = OK
                    var strHTML = decodeURI(xmlhttp.responseText);
                    //alert("[" + strJscript + "]");
                    try {
                        document.getElementById('BasketCheckoutPaymentSpan').innerHTML = strHTML;
                        var strVars = TheForm.TextNamePaymentsHiddenJscript1.value;
                        eval(strVars);
                    }
                    catch (err) {
                        // Error
                        alert('XML Jscript Error');
                    }
                }
                else {
                    alert("Problem retrieving XML data");
                }
            }
        }
        function BasketDeliverToClick() {
            var TheForm;
            TheForm = document.forms.mainformbody;
            var strrandom = String.fromCharCode(38) + 'postrandomizer=' + Math.random();
            var booDeliveryValue = TheForm.CheckboxNameDeliverTo1.checked;

            if (booDeliveryValue == true) {
                document.BasketDeliveryLoading.src = imgBasketXMLLoading1.src;
                loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=1050' + encodeURI(BasketSectionDelivery()) + String.fromCharCode(38) + 'returnpage=none' + strrandom, 5);
            }
            else {
                document.BasketDeliveryLoading.src = imgBasketXMLLoading1.src;
                loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=1050' + encodeURI(BasketSectionDelivery()) + String.fromCharCode(38) + 'returnpage=none' + strrandom, 5);
            }
        }
        function BasketPaymentToClick() {
            var TheForm;
            TheForm = document.forms.mainformbody;
            var strrandom = String.fromCharCode(38) + 'postrandomizer=' + Math.random();
            var booPaymentValue = TheForm.CheckboxNamePaymentCCSameAsPersonal1.checked;

            if (booPaymentValue == true) {
                document.BasketPaymentLoading.src = imgBasketXMLLoading1.src;
                loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=1080' + encodeURI(BasketSectionPayment()) + String.fromCharCode(38) + 'returnpage=none' + strrandom, 6);
            }
            else {
                document.BasketPaymentLoading.src = imgBasketXMLLoading1.src;
                loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=1080' + encodeURI(BasketSectionPayment()) + String.fromCharCode(38) + 'returnpage=none' + strrandom, 6);
            }
        }
        function BasketDeliveryPostcodeLookups(intLookupButtonNumber) {
            var TheForm;
            TheForm = document.forms.mainformbody;
            var strrandom = String.fromCharCode(38) + 'postrandomizer=' + Math.random();
            var booDeliveryValue = TheForm.CheckboxNameDeliverTo1.checked;

            if (intLookupButtonNumber == 1) {
                document.TextIndicatorPersonalAddress1.src = imgBasketXMLindicator1.src;
            }
            if (intLookupButtonNumber == 2) {
                document.TextIndicatorDeilveryAddress1.src = imgBasketXMLindicator1.src;
            }

            if (booDeliveryValue == true) {
                document.BasketDeliveryLoading.src = imgBasketXMLLoading1.src;
                loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=1060' + String.fromCharCode(38) + 'storeid=' + intLookupButtonNumber + encodeURI(BasketSectionDelivery()) + String.fromCharCode(38) + 'returnpage=none' + strrandom, 5);
            }
            else {
                document.BasketDeliveryLoading.src = imgBasketXMLLoading1.src;
                loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=1060' + String.fromCharCode(38) + 'storeid=' + intLookupButtonNumber + encodeURI(BasketSectionDelivery()) + String.fromCharCode(38) + 'returnpage=none' + strrandom, 5);
            }
        }
        function BasketPaymentPostcodeLookups(intLookupButtonNumber) {
            var TheForm;
            TheForm = document.forms.mainformbody;
            var strrandom = String.fromCharCode(38) + 'postrandomizer=' + Math.random();
            var booPaymentValue = TheForm.CheckboxNamePaymentCCSameAsPersonal1.checked;

            document.TextIndicatorPaymentCCAddress1.src = imgBasketXMLindicator1.src;

            if (booPaymentValue == true) {
                document.BasketPaymentLoading.src = imgBasketXMLLoading1.src;
                loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=1060' + String.fromCharCode(38) + 'storeid=' + intLookupButtonNumber + encodeURI(BasketSectionPayment()) + String.fromCharCode(38) + 'returnpage=none' + strrandom, 6);
            }
            else {
                document.BasketPaymentLoading.src = imgBasketXMLLoading1.src;
                loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=1060' + String.fromCharCode(38) + 'storeid=' + intLookupButtonNumber + encodeURI(BasketSectionPayment()) + String.fromCharCode(38) + 'returnpage=none' + strrandom, 6);
            }
        }
        function BasketSectionDelivery() {
            var TheForm;
            TheForm = document.forms.mainformbody;
            var strVars = '';

            strVars += String.fromCharCode(38) + 'strTextNamePersonalName1=' + TheForm.TextNamePersonalName1.value;
            strVars += String.fromCharCode(38) + 'strTextNamePersonalAddress1=' + TheForm.TextNamePersonalAddress1.value;
            strVars += String.fromCharCode(38) + 'strTextNamePersonalAddress2=' + TheForm.TextNamePersonalAddress2.value;
            strVars += String.fromCharCode(38) + 'strTextNamePersonalAddress3=' + TheForm.TextNamePersonalAddress3.value;
            strVars += String.fromCharCode(38) + 'strTextNamePersonalAddress4=' + TheForm.TextNamePersonalAddress4.value;
            strVars += String.fromCharCode(38) + 'strTextNamePersonalAddress5=' + TheForm.TextNamePersonalAddress5.value;
            strVars += String.fromCharCode(38) + 'strTextNamePersonalTelephone1=' + TheForm.TextNamePersonalTelephone1.value;
            strVars += String.fromCharCode(38) + 'strTextNamePersonalPassword1=' + TheForm.TextNamePersonalPassword1.value;
            strVars += String.fromCharCode(38) + 'strTextNamePersonalPassword2=' + TheForm.TextNamePersonalPassword2.value;
            strVars += String.fromCharCode(38) + 'strCheckboxNamePersonalAutoSignIn1=' + TheForm.CheckboxNamePersonalAutoSignIn1.checked;
            strVars += String.fromCharCode(38) + 'strCheckboxNameDeliverTo1=' + TheForm.CheckboxNameDeliverTo1.checked;
            try {
                strVars += String.fromCharCode(38) + 'strTextNameDeliveryName1=' + TheForm.TextNameDeliveryName1.value;
                strVars += String.fromCharCode(38) + 'strTextNameDeliveryAddress1=' + TheForm.TextNameDeliveryAddress1.value;
                strVars += String.fromCharCode(38) + 'strTextNameDeliveryAddress2=' + TheForm.TextNameDeliveryAddress2.value;
                strVars += String.fromCharCode(38) + 'strTextNameDeliveryAddress3=' + TheForm.TextNameDeliveryAddress3.value;
                strVars += String.fromCharCode(38) + 'strTextNameDeliveryAddress4=' + TheForm.TextNameDeliveryAddress4.value;
                strVars += String.fromCharCode(38) + 'strTextNameDeliveryAddress5=' + TheForm.TextNameDeliveryAddress5.value;
            }
            catch (err) {
                strVars += String.fromCharCode(38) + 'strTextNameDeliveryName1=';
                strVars += String.fromCharCode(38) + 'strTextNameDeliveryAddress1=';
                strVars += String.fromCharCode(38) + 'strTextNameDeliveryAddress2=';
                strVars += String.fromCharCode(38) + 'strTextNameDeliveryAddress3=';
                strVars += String.fromCharCode(38) + 'strTextNameDeliveryAddress4=';
                strVars += String.fromCharCode(38) + 'strTextNameDeliveryAddress5=';
            }
            try {
                strVars += String.fromCharCode(38) + 'strTextNamePersonalDoorNumber1=' + TheForm.TextNamePersonalDoorNumber1.value;
                strVars += String.fromCharCode(38) + 'strTextNamePersonalPostcode1=' + TheForm.TextNamePersonalPostcode1.value;
            }
            catch (err) {
                strVars += String.fromCharCode(38) + 'strTextNamePersonalDoorNumber1=';
                strVars += String.fromCharCode(38) + 'strTextNamePersonalPostcode1=';
            }
            try {
                strVars += String.fromCharCode(38) + 'strTextNameDeliveryDoorNumber1=' + TheForm.TextNameDeliveryDoorNumber1.value;
                strVars += String.fromCharCode(38) + 'strTextNameDeliveryPostcode1=' + TheForm.TextNameDeliveryPostcode1.value;
            }
            catch (err) {
                strVars += String.fromCharCode(38) + 'strTextNameDeliveryDoorNumber1=';
                strVars += String.fromCharCode(38) + 'strTextNameDeliveryPostcode1=';
            }


            return strVars;
        }
        function BasketSectionPayment() {
            var TheForm;
            TheForm = document.forms.mainformbody;
            var strVars = '';

            strVars += String.fromCharCode(38) + 'strTextNamePaymentCCType1=' + TheForm.TextNamePaymentCCType1.value;

            strVars += String.fromCharCode(38) + 'strTextNamePaymentCCName1=' + TheForm.TextNamePaymentCCName1.value;
            strVars += String.fromCharCode(38) + 'strTextNamePaymentCCNumber1=' + TheForm.TextNamePaymentCCNumber1.value;
            strVars += String.fromCharCode(38) + 'strTextNamePaymentCCStartMonth1=' + TheForm.TextNamePaymentCCStartMonth1.value;
            strVars += String.fromCharCode(38) + 'strTextNamePaymentCCStartYear1=' + TheForm.TextNamePaymentCCStartYear1.value;
            strVars += String.fromCharCode(38) + 'strTextNamePaymentCCEndMonth1=' + TheForm.TextNamePaymentCCEndMonth1.value;
            strVars += String.fromCharCode(38) + 'strTextNamePaymentCCEndYear1=' + TheForm.TextNamePaymentCCEndYear1.value;
            strVars += String.fromCharCode(38) + 'strTextNamePaymentCCSecurityCode1=' + TheForm.TextNamePaymentCCSecurityCode1.value;
            strVars += String.fromCharCode(38) + 'strCheckboxNamePaymentCCSaveToAccount1=' + TheForm.CheckboxNamePaymentCCSaveToAccount1.checked;
            strVars += String.fromCharCode(38) + 'strCheckboxNamePaymentCCSameAsPersonal1=' + TheForm.CheckboxNamePaymentCCSameAsPersonal1.checked;

            try {
                strVars += String.fromCharCode(38) + 'strTextNamePaymentCCIssue1=' + TheForm.TextNamePaymentCCIssue1.value;
            }
            catch (err) {
                strVars += String.fromCharCode(38) + 'strTextNamePaymentCCIssue1=';
            }
            try {
                strVars += String.fromCharCode(38) + 'strTextNamePaymentCCAddress1=' + TheForm.TextNamePaymentCCAddress1.value;
                strVars += String.fromCharCode(38) + 'strTextNamePaymentCCAddress2=' + TheForm.TextNamePaymentCCAddress2.value;
                strVars += String.fromCharCode(38) + 'strTextNamePaymentCCAddress3=' + TheForm.TextNamePaymentCCAddress3.value;
                strVars += String.fromCharCode(38) + 'strTextNamePaymentCCAddress4=' + TheForm.TextNamePaymentCCAddress4.value;
                strVars += String.fromCharCode(38) + 'strTextNamePaymentCCAddress5=' + TheForm.TextNamePaymentCCAddress5.value;
            }
            catch (err) {
                strVars += String.fromCharCode(38) + 'strTextNamePaymentCCAddress1=';
                strVars += String.fromCharCode(38) + 'strTextNamePaymentCCAddress2=';
                strVars += String.fromCharCode(38) + 'strTextNamePaymentCCAddress3=';
                strVars += String.fromCharCode(38) + 'strTextNamePaymentCCAddress4=';
                strVars += String.fromCharCode(38) + 'strTextNamePaymentCCAddress5=';
            }
            try {
                strVars += String.fromCharCode(38) + 'strTextNamePaymentDoorNumber1=' + TheForm.TextNamePaymentDoorNumber1.value;
                strVars += String.fromCharCode(38) + 'strTextNamePaymentPostcode1=' + TheForm.TextNamePaymentPostcode1.value;
            }
            catch (err) {
                strVars += String.fromCharCode(38) + 'strTextNamePaymentDoorNumber1=';
                strVars += String.fromCharCode(38) + 'strTextNamePaymentPostcode1=';
            }


            return strVars;
        }
        function BasketSectionEmail() {
            var TheForm;
            TheForm = document.forms.mainformbody;
            var strVars = '';

            strVars += String.fromCharCode(38) + 'strTextNameEmailAddress=' + TheForm.TextNameEmailAddress.value;


            return strVars;
        }
        function BasketShowPostcode(intLookupButtonNumber) {
            var TheForm;
            TheForm = document.forms.mainformbody;
            var strrandom = String.fromCharCode(38) + 'postrandomizer=' + Math.random();
            var booDeliveryValue = TheForm.CheckboxNameDeliverTo1.checked;
            var booPaymentValue = TheForm.CheckboxNamePaymentCCSameAsPersonal1.checked;

            if (intLookupButtonNumber == 1) {
                if (booDeliveryValue == true) {
                    document.BasketDeliveryLoading.src = imgBasketXMLLoading1.src;
                    loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=1070' + String.fromCharCode(38) + 'storeid=' + intLookupButtonNumber + encodeURI(BasketSectionDelivery()) + String.fromCharCode(38) + 'returnpage=none' + strrandom, 5);
                }
                else {
                    document.BasketDeliveryLoading.src = imgBasketXMLLoading1.src;
                    loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=1070' + String.fromCharCode(38) + 'storeid=' + intLookupButtonNumber + encodeURI(BasketSectionDelivery()) + String.fromCharCode(38) + 'returnpage=none' + strrandom, 5);
                }
            }

            if (intLookupButtonNumber == 2) {
                if (booDeliveryValue == true) {
                    document.BasketDeliveryLoading.src = imgBasketXMLLoading1.src;
                    loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=1070' + String.fromCharCode(38) + 'storeid=' + intLookupButtonNumber + encodeURI(BasketSectionDelivery()) + String.fromCharCode(38) + 'returnpage=none' + strrandom, 5);
                }
                else {
                    document.BasketDeliveryLoading.src = imgBasketXMLLoading1.src;
                    loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=1070' + String.fromCharCode(38) + 'storeid=' + intLookupButtonNumber + encodeURI(BasketSectionDelivery()) + String.fromCharCode(38) + 'returnpage=none' + strrandom, 5);
                }
            }

            if (intLookupButtonNumber == 3) {
                if (booPaymentValue == true) {
                    document.BasketPaymentLoading.src = imgBasketXMLLoading1.src;
                    loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=1070' + String.fromCharCode(38) + 'storeid=' + intLookupButtonNumber + encodeURI(BasketSectionPayment()) + String.fromCharCode(38) + 'returnpage=none' + strrandom, 6);
                }
                else {
                    document.BasketPaymentLoading.src = imgBasketXMLLoading1.src;
                    loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=1070' + String.fromCharCode(38) + 'storeid=' + intLookupButtonNumber + encodeURI(BasketSectionPayment()) + String.fromCharCode(38) + 'returnpage=none' + strrandom, 6);
                }
            }

        }
        function BasketShowUpdateEmail() {
            var TheForm;
            TheForm = document.forms.mainformbody;
            var strrandom = String.fromCharCode(38) + 'postrandomizer=' + Math.random();
            // Indicator
            document['TextIndicatorEmailAddress'].src = imgBasketXMLindicator1.src;

            document.BasketEmailLoading.src = imgBasketXMLLoading1.src;
            loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=1090' + encodeURI(BasketSectionEmail()) + String.fromCharCode(38) + 'returnpage=none' + strrandom, 7);

        }
        function BasketShowDelAfterUpdateEmail() {
            var TheForm;
            TheForm = document.forms.mainformbody;
            var strrandom = String.fromCharCode(38) + 'postrandomizer=' + Math.random();

            TheForm.ButtonNamePlaceYourOrder.disabled = false;

            document.BasketDeliveryLoading.src = imgBasketXMLLoading1.src;
            loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=1100' + String.fromCharCode(38) + 'returnpage=none' + strrandom, 5);

        }
        function BasketShowPayAfterUpdateEmail() {
            var TheForm;
            TheForm = document.forms.mainformbody;
            var strrandom = String.fromCharCode(38) + 'postrandomizer=' + Math.random();

            document.BasketPaymentLoading.src = imgBasketXMLLoading1.src;
            loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=1110' + String.fromCharCode(38) + 'returnpage=none' + strrandom, 6);

        }

        // Functions used in HiRes image view
        function HiResChangeImageClickOnCart(intProductCode, intImageNumber) {
            var catWindow = 0;
            var strrandom = String.fromCharCode(38) + 'postrandomizer=' + Math.random();
            loadXMLDoc('../FunctionsSitePreferences.aspx?functionnumber=21' + String.fromCharCode(38) + 'prodcode=' + intProductCode + String.fromCharCode(38) + 'itemnumber=' + intImageNumber + String.fromCharCode(38) + 'returnpage=none' + strrandom, 3);
        }
        function HiResloadXMLDoc() {
            if (xmlhttp.readyState == 4) {// 4 = "loaded"
                if (xmlhttp.status == 200) {// 200 = OK
                    // ...our code here...
                    // alert(xmlhttp.status);
                    // alert(xmlhttp.statusText);
                    var strHTML = xmlhttp.responseText;
                    //alert("[" + strHTML + "]");
                    document.getElementById('XMLUpdate').innerHTML = strHTML;
                }
                else {
                    alert("Problem retrieving XML data");
                }
            }
        }

        // Function used in Site Search Box
        function sitesearchforwardmainformbody() {
            var TheForm;
            TheForm = document.forms.mainformbody;
            var strrandom = String.fromCharCode(38) + 'postrandomizer=' + Math.random();
            var strVars = '';

            strVars += TheForm.NameSiteSearchTextBox2.value;

            var strTarget = '../Wigs_UK_Search_Results?sitesearchtext=' + strVars + strrandom;
            window.location = strTarget;
        }
        function sitesearchforwardmainformheader() {
            var TheForm;
            TheForm = document.forms.mainformheader;
            var strrandom = String.fromCharCode(38) + 'postrandomizer=' + Math.random();
            var strVars = '';

            strVars += TheForm.NameSiteSearchTextBox1.value;

            var strTarget = '../Wigs_UK_Search_Results?sitesearchtext=' + strVars + strrandom;
            window.location = strTarget;
        }
        function sitesearchforwardmainformheaderfocus() {
            var TheForm;
            TheForm = document.forms.mainformheader;
            var strVars = '';

            strVars += TheForm.NameSiteSearchTextBox1.value;
            if (strVars == 'Search Purely...') {
                TheForm.NameSiteSearchTextBox1.value = '';
            }
        }  

// End hiding script fromm old broswers -->


