function DispleftMore(a, b) {
    var a;
    var b;
    document.getElementById(a).style.display = "";
    document.getElementById(b).style.display = "none"
}

function openWin1(a) {
    var j = window.open(a, "jj", "left=20, top=20, width=550,height=600,scrollbars=1")
}

function openWin2(a) {
    var j = window.open(a, "jj", "left=20, top=20, width=700,height=570,scrollbars=1")
}

function openWin3(a) {
    var j = window.open(a, "jj", "left=20, top=20, width=500,height=300,scrollbars=1")
}

function openWinlarge(a) {
    var j = window.open(a, "jj", "left=20, top=20, width=500,height=410,scrollbars=1")
}

function openWin4(a) {
    var j = window.open(a, "jj", "left=20, top=20, width=400,height=180,scrollbars=1")
}

function openWin5(a) {
    var j = window.open(a, "jj", "left=20, top=20, width=550,height=500,scrollbars=1")
}

function openprint(a) {
    var j = window.open(a, "jj", "left=20, top=20, width=900,height=900,scrollbars=1")
}

function MM_findObj(n, d) {
    var p, i, x;
    if (!d) d = document;
    if ((p = n.indexOf("?")) > 0 && parent.frames.length) {
        d = parent.frames[n.substring(p + 1)].document;
        n = n.substring(0, p)
    }
    if (!(x = d[n]) && d.all) x = d.all[n];
    for (i = 0; !x && i < d.forms.length; i++) x = d.forms[i][n];
    for (i = 0; !x && d.layers && i < d.layers.length; i++) x = MM_findObj(n, d.layers[i].document);
    if (!x && d.getElementById) x = d.getElementById(n);
    return x
}

function MM_showHideLayers() {
    var i, p, v, obj, args = MM_showHideLayers.arguments;
    for (i = 0; i < (args.length - 2); i += 3) if ((obj = MM_findObj(args[i])) != null) {
        v = args[i + 2];
        if (obj.style) {
            obj = obj.style;
            v = (v == 'show') ? 'visible' : (v == 'hide') ? 'hidden' : v
        }
        obj.visibility = v
    }
}

function changebg(a) {
    fmobj = document.form1;
    re = /bigform12/gi;
    for (var i = 0; i < fmobj.elements.length; i++) {
        var e = fmobj.elements[i];
        if (e != a) e.className = e.className.replace(re, '');
        else a.className += a.className + ' bigform12'
    }
    if (a.value.length > 0) a.className += a.className + ' bigform12'
}

function visibleMoreCat_presc() {
    if (document.getElementById("set_more_link").value == 0) {
        document.getElementById("set_more_link").value = 1;
        document.getElementById("more_cat").style.display = "";
        document.getElementById("pres_dont").style.display = "none"
    } else {
        document.getElementById("set_more_link").value = 0;
        document.getElementById("pres_dont").style.display = "";
        document.getElementById("more_cat").style.display = "none"
    }
}

function visibleMoreCat() {
    if (document.getElementById("set_more_link").value == 0) {
        document.getElementById("set_more_link").value = 1;
        document.getElementById("more_cat").style.display = "";
        document.getElementById("brandList").style.display = "none";
        document.getElementById("viewBrandLink").style.display = "none";
        document.getElementById("viewAllBrandLink").style.display = "";
        document.getElementById("backId").style.display = "";
        if (document.getElementById("pres_dont")) {
            document.getElementById("pres_dont").style.display = "none";
            document.getElementById("brandList").style.display = "";
            document.getElementById("viewBrandLink").style.display = "";
            document.getElementById("viewAllBrandLink").style.display = "none"
        }
    } else {
        document.getElementById("set_more_link").value = 0;
        document.getElementById("more_cat").style.display = "none";
        document.getElementById("brandList").style.display = "";
        document.getElementById("viewBrandLink").style.display = "";
        document.getElementById("viewAllBrandLink").style.display = "none";
        document.getElementById("backId").style.display = "";
        var a = document.getElementById("urlId").value + "#a";
        window.location = a;
        if (document.getElementById("pres_dont")) {
            document.getElementById("pres_dont").style.display = "";
            document.getElementById("brandList").style.display = "none";
            document.getElementById("viewBrandLink").style.display = "";
            document.getElementById("viewAllBrandLink").style.display = "none"
        }
    }
}

function paging_submit(a, b) {
    theForm = document.getElementById(b);
    theForm.action = a;
    theForm.submit()
}

function changeView(a, b) {
    theForm = document.getElementById(b);
    theForm.vi.value = a;
    theForm.submit()
}

function productLimit(a, b, c) {
    theForm = document.getElementById(b);
    theForm.pnos.value = a;
    theForm.action = c;
    theForm.submit()
}

function doPriceSort(a, b) {
    theForm = document.getElementById(b);
    theForm.ps.value = a;
    theForm.submit()
}

function filltextbox(i) {
    var a = document.getElementById('qty_sel_' + i).value;
    if (isNaN(a)) {
        document.getElementById('qty_sel_' + i).style.display = 'none';
        document.getElementById('qty_' + i).style.display = '';
        document.getElementById('qty_' + i).value = '21'
    } else {
        document.getElementById('qty_' + i).value = a
    }
}

function filltextbox_search(i) {
    var a = document.getElementById('qty_sel_' + i).value;
    if (isNaN(a)) {
        document.getElementById('qty_sel_' + i).style.display = 'none';
        document.getElementById('qty_' + i).style.display = '';
        document.getElementById('qty_' + i).value = '21';
        showTotalPrice(i)
    } else {
        document.getElementById('qty_' + i).value = a;
        showTotalPrice(i)
    }
}
var Left = 0;
if (screen.width == 1088) {
    image_name = 1024;
    width = 600;
    Left = 538
} else if (screen.width == 1152) {
    image_name = 1024;
    width = 600;
    Left = 602
} else if (screen.width == 1280) {
    image_name = 1200;
    width = 864;
    Left = 731
} else if (screen.width >= 1300 && screen.width <= 1399) {
    image_name = 1400;
    width = 1024;
    Left = 800
} else if (screen.width >= 1400 && screen.width <= 1499) {
    image_name = 1400;
    width = 1024;
    Left = 900
} else if (screen.width >= 1600 && screen.width <= 1699) {
    image_name = 1400;
    width = 1024;
    Left = 900
} else if (screen.width >= 1700 && screen.width <= 1799) {
    image_name = 1400;
    Left = 1000;
    Left = 1000
} else {
    image_name = 1024;
    width = 600;
    Left = 473
}

function clearSearchField(a) {
    if (trimAll(a.value) == "Enter Product or Symptom") {
        a.value = ''
    } else if (trimAll(a.value) == "Enter medicine name here") {
        a.value = ''
    } else if (trimAll(a.value) == "Enter Email Address") {
        a.value = ''
    } else if (trimAll(a.value) == "Please Enter Your Name") {
        a.value = ''
    } else if (trimAll(a.value) == "Please Enter Your Email") {
        a.value = ''
    } else if (trimAll(a.value) == "Please Enter Your Review") {
        a.value = ''
    } else if (trimAll(a.value).substr(18, 8) == 'feedback') {
        a.value = ''
    } else if (trimAll(a.value) == "Keyword Search") {
        a.value = ''
    }
    a.select()
}

function defaultText(a, b) {
    if (isWhitespace(a.value) && b == 'search') {
        a.value = 'Enter Product or Symptom'
    } else if (isWhitespace(a.value) && b == 'newsletter') {
        a.value = 'Enter Email Address'
    } else if (isWhitespace(a.value) && b == 'suggestion') {
        a.value = 'Please enter your feedback here, we very much appreciate customer feedback. We may not be able to respond to all comments but we endeavor to reply to all suggestions.'
    } else if (isWhitespace(a.value) && b == 'fragrance') {
        a.value = 'Keyword Search'
    }
}

function doSearch(a, b) {
    theForm = document.getElementById(b);
    if (document.getElementById(a).value == 'Enter Product or Symptom') {
        theForm.q.value = ""
    }
    if (!isNaN(document.getElementById(a).value)) {
        alert("Please enter a product name or keyword");
        document.getElementById(a).value = 'Enter Product or Symptom';
        return false
    } else {
        theForm.submit()
    }
}

function HidedivCart(a) {
    document.getElementById(a).style.visibility = 'hidden'
}

function alertSize() {
    var a = new Array();
    var b = 0,
        myHeight = 0;
    if (typeof (window.innerWidth) == 'number') {
        b = window.innerWidth;
        myHeight = window.innerHeight
    } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
        b = document.documentElement.clientWidth;
        myHeight = document.documentElement.clientHeight
    } else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
        b = document.body.clientWidth;
        myHeight = document.body.clientHeight
    }
    a[0] = b;
    a[1] = myHeight;
    return a
}

function MM_preloadImages() {
    var d = document;
    if (d.images) {
        if (!d.MM_p) d.MM_p = new Array();
        var i, j = d.MM_p.length,
            a = MM_preloadImages.arguments;
        for (i = 0; i < a.length; i++) if (a[i].indexOf("#") != 0) {
            d.MM_p[j] = new Image;
            d.MM_p[j++].src = a[i]
        }
    }
}
MM_preloadImages('Loader.gif'/*tpa=http://assets.chemistdirect.co.uk/include/validationscript/images/Loader.gif*/, 'pop_up_bg.png'/*tpa=http://assets.chemistdirect.co.uk/include/validationscript/images/pop_up_bg.png*/, 'pop_up_bg.png'/*tpa=http://assets.chemistdirect.co.uk/include/validationscript/images/pop_up_bg.png*/);

function alertSize() {
    var a = new Array();
    var b = 0,
        myHeight = 0;
    if (typeof (window.innerWidth) == 'number') {
        b = window.innerWidth;
        myHeight = window.innerHeight
    } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
        b = document.documentElement.clientWidth;
        myHeight = document.documentElement.clientHeight
    } else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
        b = document.body.clientWidth;
        myHeight = document.body.clientHeight
    }
    a[0] = b;
    a[1] = myHeight;
    return a
}
eval(function (p, a, c, k, e, r) {
    e = function (c) {
        return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36))
    };
    if (!''.replace(/^/, String)) {
        while (c--) r[e(c)] = k[c] || e(c);
        k = [function (e) {
            return r[e]
        }];
        e = function () {
            return '\\w+'
        };
        c = 1
    };
    while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]);
    return p
}('j 1A=" \\t\\n\\r";m 1c(s){l((s==1d)||(s.o==0))}m 1B(s){j i;k(1c(s))l B;F(i=0;i<s.o;i++){j c=s.H(i);k(1A.x(c)==-1)l C}l B}m 2s(s,a){k(s.o>0)s=s+"\\n";s=s+a;l s}m 1e(s,a){j i;F(i=0;i<s.o;i++){j c=s.H(i);k(a.x(c)==-1)l C}l B}m 2t(a){j b="@";j c=".";j d=a.x(b);j e=a.o;j f=a.x(c);k(a.x(b)==-1){l B}k(a.x(b)==-1||a.x(b)==0||a.x(b)==e){l B}k(a.x(c)==-1||a.x(c)==0||a.x(c)==e){l B}k(a.x(b,(d+1))!=-1){l B}k(a.y(d-1,d)==c||a.y(d+1,d+2)==c){l B}k(a.x(c,(d+2))==-1){l B}k(a.x(" ")!=-1){l B}l C}m 2u(a){k(a.W(/^\\w+((-\\w+)|(\\.\\w+))*\\@[A-1f-1g-9]+((\\.|-)[A-1f-1g-9]+)*\\.[A-1f-1g-9]+$/)!=-1)l B;I l C}m 2v(a){k(!1e(a,"2w.-X")){l"1h 1i 2x 2y Y.\\n"}I k(a.o<3){l"1h 1i 2z 1j 3 1C 1k Y.\\n"}I{j b;F(b=0;b<a.o;b++){k(a.H(b)=="X"){k(a.H(b+1)=="X"){l"1h 1i 1l 1D 2A 1k 1E 2B 2C 2D.\\n"}}}}l""}m 2E(a){D=13;a=a.1m();1F(a){u"1G":D=1;v;u"1H":D=2;v;u"1I":D=3;v;u"1J":D=4;v;u"1l":D=5;v;u"1K":D=6;v;u"1L":D=7;v;u"1M":D=8;v;u"1N":D=9;v;u"1O":D=10;v;u"1P":D=11;v;u"1Q":D=12;v}l D}m 2F(a){E=13;a=a;1F(a){u"2G":E="1G";v;u"2H":E="1H";v;u"2I":E="1I";v;u"2J":E="1J";v;u"2K":E="1l";v;u"2L":E="1K";v;u"2M":E="1L";v;u"2N":E="1M";v;u"2O":E="1N";v;u"10":E="1O";v;u"11":E="1P";v;u"12":E="1Q";v}l E}m 2P(a,b){1n=a;k(1n!=""){Z=1n.14("-");1R=Z[0];1S=Z[1];1T=Z[2]}1o=b;k(1o!=""){15=1o.14("-");1U=15[0];1V=15[1];1W=15[2]}j c=K 1p(1T,1S,1R,0,0,0);j d=K 1p(1W,1V,1U,0,0,0);j e=K 1p();k(c.1X()-d.1X()>0){1q=0}I{1q=1}l 1q}m 2Q(a,b){j c=O.1Y(a*O.1Z(10,b))/O.1Z(10,b);l c}m 2R(a,b){k(b==16||b==1d)b=2;j c=a.2S(b);l c}m 2T(a,b){k(!1e(a,b)||1r(a)){17("21 1s 22 p");l C}}m 2U(a){k(1r(a)){17("21 1s 22 p \\n");P.23()}}m 2V(a){j b=1t(a);j c="";j d=K 18();d[0]="24";d[1]="25";d[2]="2W";j e=K 18();e=b.14(".");c=e[e.o-1];c=c.1m();j i;F(i=0;i<d.o;i++){k(d[i]==c){l B}}l C}m 2X(a){j b=1t(a);j c="";j d=K 18();d[0]="24";d[1]="25";d[2]="2Y";j e=K 18();e=b.14(".");c=e[e.o-1];c=c.1m();j i;F(i=0;i<d.o;i++){k(d[i]==c){l B}}l C}m 2Z(a,b,c){26(a,c);1u=20;k(a.p.o>b){j d=O.32(a.p.o/b);1u-=d;j e=19(d)*1u;a.1v.27=e+"33;";a.2a=d}I{a.1v.27="34;";a.2a=1}}m 26(a,b){k(a.p.o>b){17("35 36 1D 1s 1k 1E "+b+" Y");a.p=a.p.y(0,b)}}m 1t(a){k(!1c(a)){2b(a.y(0,1)==\' \'||a.y(0,1)==\'\\n\'||a.y(0,1)==\'\\r\'||a.y(0,1)==\'\\t\'){a=a.y(1,a.o)}2b(a.y(a.o-1,a.o)==\' \'||a.y(a.o-1,a.o)==\'\\n\'||a.y(a.o-1,a.o)==\'\\r\'||a.y(a.o-1,a.o)==\'\\t\'){a=a.y(0,a.o-1)}}l a}m 37(a,b){z.J.1a.p=a;b.Q()}m 38(){k(z.J.2c!=16)z.J.2c.p=\'\';k(z.J.1a!=16)z.J.1a.p=1;k(z.J.W!=16)k(z.J.W.p==\'2d 2e\'){z.J.W.p=\'\'}z.J.1a.p=1}m 39(a,b){3a(a,b,"3b/3c/3d")}m 3e(a,b){b.1b=\'2f\';b.Q()}m 3f(a){G=z.2g;G.1w.p=a.p;G.1b=\'2f\';G.Q()}m 3g(a,b){G=z.R(b);k(1r(a))j c=z.R(a).p;I j c=a;G.1w.p=c;G.1b=\'2h\';G.Q()}m 3h(a,b){G=z.2g;G.1w.p=z.R(a).p;G.3i.p=z.R(b).p;G.1b=\'2h\';G.Q()}m 3j(a){a.q.p=z.J(\'3k\').p;k(1B(a.q.p)||a.q.p=="2d 2e 1C 3l 3m"){a.q.p="";a.q.23()}l B}m 3n(a,b){F(i=0;i<1x(b).o;i++){k(1x(b).3o[i].p==a){1x(b).3p=i}}}m 3q(a){j b="3r"+"3s"+"3t"+"-X.!~*\'()";j c="3u";j d=a.p;j e="";F(j i=0;i<d.o;i++){j f=d.H(i);k(f==" "){e+="+"}I k(b.x(f)!=-1){e+=f}I{j g=f.3v(0);k(g>3w){17("3x 3y \'"+f+"\' 3z 1j 3A 3B 3C 2i 2j.\\n"+"(2i 2j 3D 3E 8-3F Y.)\\n"+"A 3G (+) 3H 1j 3I.");e+="+"}I{e+="%";e+=c.H((g>>4)&2k);e+=c.H(g&2k)}}}l e}j L="/";j 2l=3J;j 2m=3K;m 2n(s){j i;F(i=0;i<s.o;i++){j c=s.H(i);k(((c<"0")||(c>"9")))l C}l B}m 2o(s,a){j i;j b="";F(i=0;i<s.o;i++){j c=s.H(i);k(a.x(c)==-1)b+=c}l b}m 2p(a){l(((a%4==0)&&((!(a%M==0))||(a%3L==0)))?29:28)}m 2q(n){F(j i=1;i<=n;i++){P[i]=31;k(i==4||i==6||i==9||i==11){P[i]=30}k(i==2){P[i]=29}}l P}m 3M(a,b){j c=2q(12);k(b!=1d)k(b.o>0)L=b;j d=a.x(L);j e=a.x(L,d+1);j f=a.y(0,d);j g=a.y(d+1,e);j h=a.y(e+1);N=h;k(g.H(0)=="0"&&g.o>1)g=g.y(1);k(f.H(0)=="0"&&f.o>1)f=f.y(1);F(j i=1;i<=3;i++){k(N.H(0)=="0"&&N.o>1)N=N.y(1)}S=19(f);T=19(g);U=19(N);k(d==-1||e==-1){l C}k(f.o<1||S<1||S>12){l C}k(g.o<1||T<1||T>31||(S==2&&T>2p(U))||T>c[S]){l C}k(h.o!=4||U==0||U<2l||U>2m){l C}k(a.x(L,e+1)!=-1||2n(2o(a,L))==C){l C}l B}j V=0;m 1y(a,b,c,d){k(V==1){b=30;c=M}j e=O.1Y(d/M);j f=0;k(b>c){F(i=b;i>=c;i--){2r("1z("+i+",\'"+a+"\')",(f*e));f++}}I k(b<c){F(i=b;i<=c;i++){2r("1z("+i+",\'"+a+"\')",(f*e));f++}}V++;k(V==2)V=0}m 1z(a,b){j c=z.R(b).1v;c.1y=(a/M);c.3N=(a/M);c.3O=(a/M);c.3P="3Q(1y="+a+")"}', 62, 239, '|||||||||||||||||||var|if|return|function||length|value|||||case|break||indexOf|substring|document||true|false|getmonthno|getmonthname|for|theForm|charAt|else|all|new|dtCh|100|strYr|Math|this|submit|getElementById|month|day|year|zzz|search|_|characters|dt1_s|||||split|dt2_s|undefined|alert|Array|parseInt|page|method|isEmpty|null|isCharsInBag|Za|z0|Login|name|be|more|may|toLowerCase|dtfrom|dtto|Date|getvalno|isNaN|enter|trimAll|LineHeight|style|ps|eval|opacity|changeOpac|whitespace|isWhitespace|or|not|than|switch|jan|feb|mar|apr|jun|jul|aug|sep|oct|nov|dec|dt1_d|dt1_m|dt1_y|dt2_d|dt2_m|dt2_y|valueOf|round|pow||Please|numeric|focus|jpg|jpeg|textCounter|height|||rows|while|letter|Enter|Keyword|GET|form1|get|URL|encoding|0xF|minYear|maxYear|isInteger|stripCharsInBag|daysInFebruary|DaysArray|setTimeout|BuildStr|echeck|isEmail|validateUsername|abcdefghijklmnopqrstuvwxyz0123456789|has|invalid|must|contain|one|consecutive|underscore|monthno|monthname|01|02|03|04|05|06|07|08|09|checkDates|roundNumber|add_zeros|toFixed|checknumeric|checksort|checkImageType|png|checkLogoType|gif|textAreaRowsHeight|||ceil|px|20px|You|can|doAdminPost|doAdminSearch|showpopup|popUpCalendar|mm|dd|yyyy|doProductList|doPriceSort|doSearchFilter|ShowMeEverithingSearch|ps_filter|validateSearch|txtsearch|Product|Code|selectdatabasevalue|options|selectedIndex|URLEncode|0123456789|ABCDEFGHIJKLMNOPQRSTUVWXYZ|abcdefghijklmnopqrstuvwxyz|0123456789ABCDEF|charCodeAt|255|Unicode|Character|cannot|encoded|using|standard|only|supports|bit|space|will|substituted|1900|2100|400|isDate|MozOpacity|KhtmlOpacity|filter|alpha'.split('|'), 0, {}))
eval(function (p, a, c, k, e, r) {
    e = function (c) {
        return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36))
    };
    if (!''.replace(/^/, String)) {
        while (c--) r[e(c)] = k[c] || e(c);
        k = [function (e) {
            return r[e]
        }];
        e = function () {
            return '\\w+'
        };
        c = 1
    };
    while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]);
    return p
}('B I(b,c,d){D e=d;D f=G;y.z(c).J="<K W=\'X\'><Y Z=\'./10/11.12\'></K>";A(13.L){f=H L()}F{f=H 14("http://assets.chemistdirect.co.uk/include/validationscript/15.16")}A(f==G){17("18 19 1a\'t 1b 1c.");E 1d}F{f.1e("1f",b,1g);f.1h("1i-M","1j/x-1k-1l-1m");f.1n=B(){A(f.N==4||f.N=="1o"){D a=O(f.1p);a=O(a);A(f.1q==1r){D e=(/1s (\\d+\\.\\d+);/.1t(1u.1v));A(e){y.z(c).C.P=\'-Q\';y.z(c).C.R=\'1w\'}F{y.z(c).C.P=\'-Q\';y.z(c).C.R=\'1x\'}y.z(c).C.1y=\'1z\';y.z(c).C.S=\'1A\';y.z(c).J=a}}};f.1B(e)}}1C(B(p,a,c,k,e,r){e=B(c){E c.1D(a)};A(!\'\'.T(/^/,1E)){U(c--)r[e(c)]=k[c]||e(c);k=[B(e){E r[e]}];e=B(){E\'\\\\w+\'};c=1};U(c--)A(k[c])p=p.T(H 1F(\'\\\\b\'+e(c)+\'\\\\b\',\'g\'),k[c]);E p}(\'4 l(a){g(a==m)3=2;n 3=1;6 b="7="+0+"&3="+3;8(9+"d.e",\\\'5\\\',b)}4 o(i,a,b){g(a==h||a==j)a=\\\'k\\\';6 c="7="+i+"&3="+b+"&f="+a;8(9+"d.e",\\\'5\\\',c)}4 p(i,a,b){g(a==h||a==j)a=\\\'k\\\';6 c="7="+i+"&3="+b+"&f="+a;8(9+"d.e",\\\'5\\\',c)}4 q(){r.s(\\\'5\\\').t.u=\\\'v\\\'}4 w(a,b){6 c="7="+0+"&3="+b+"&f="+a;8(9+"d.e",\\\'5\\\',c)}4 x(a,b){6 c="7="+0+"&3="+a+"&f="+b;8(9+"d.e",\\\'5\\\',c)}\',V,V,\'|||M|B|1G|D|1H|I|1I||||1J|1K|1L|A|1M||G|1N|1O|1P|F|1Q|1R|1S|y|z|C|S|1T|1U|1V\'.1W(\'|\'),0,{}))', 62, 121, '||||||||||||||||||||||||||||||||||document|getElementById|if|function|style|var|return|else|null|new|DataByPost|innerHTML|div|XMLHttpRequest|type|readyState|trimAll|left|7px|top|visibility|replace|while|34|class|brandloader|img|src|images|Loader|gif|window|ActiveXObject|Microsoft|XMLHTTP|alert|Your|browser|doesn|support|AJAX|false|open|POST|true|setRequestHeader|Content|application|www|form|urlencoded|onreadystatechange|complete|responseText|status|200|MSIE|test|navigator|userAgent|0px|0px|width|500px|visible|send|eval|toString|String|RegExp|brand_div|opr|tmp_rootpath|ajaxbrand|php|letter|undefined|none|showbrand|3096|nextbrandlist|prevbrandlist|closediv|hidden|brandletter|brandtype|split'.split('|'), 0, {}))



/*eval(function (p, a, c, k, e, r) {
    e = function (c) {
        return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36))
    };
    if (!''.replace(/^/, String)) {
        while (c--) r[e(c)] = k[c] || e(c);
        k = [function (e) {
            return r[e]
        }];
        e = function () {
            return '\\w+'
        };
        c = 1
    };
    while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]);
    return p
}('F 1c(a,x,y,w,h,b,c,d){7=s.G(a);k e=(/1d (\\d+\\.\\d+);/.1e(1f.1g));k f=1h 1i(1j.$1);l(e&&f>5)7.6.m="1k";n 7.6.m="1l";7.6.Q=\'1m\';H=s.1n(\'4\');H.1o("1p",\'1q\');7.1r(H);l(o.R("I/")>0)k g=\'1s.r\';n k g=\'1t.r\';k i=o.1u("I/","");7.t=\'\';l(d==\'S\'){l(e&&f>5)7.6.p="1v";n 7.6.p="1w";7.t=c}n{7.6.m=y;l(e&&f>5)7.6.p="1x";n 7.6.p="1y";7.t=\'<4 T="1z" 6="8:1A;"><4 u="1B"><U 8="1C" J="0" 1D="0" 1E="0" T="1F" 1G="" 1H="#1I;" q="V"><v><j 8="12" K="m" >&L;</j><j 8="1J" K="m"><4 q="p" u="1K 1L"><a M="W:z();" u="1M">X</a><A B="\'+i+\'C/1N.r" D="1" 8="3"/><a M="W:z();"><A B="\'+i+\'C/1O.r" N="X" 8="13" D="12" 1P="2" J="0" q="1Q" /></a></4><4 q="O"></4><Y><Y><4 q="O" u="1R Z" 6="1S-m:1T;">\'+c+\'</4><4 q="O" u="Z"> <A B="\'+o+\'C/10/1U.r" 8="1V" D="19" J="0" N="1W 1X 1Y" 6="14:V;15: 16;" 17="18(\\\'\'+d+\'\\\');"><A B="\'+o+\'C/10/1Z.r" N="20 21" 6="14:p;15: 16;" 17="z()"></4></4></4></j><j 8="9" q="p" K="m" >&L;</j></v><v><j 22="3"  D="11">&L;</j></v> </U></4></4>\'}}F z(){k a=s.G(\'1a\');a.t=\'\';a.6.Q=\'23\'}F 18(a){l(o.R(\'I\')>0&&a==\'S\'){E="../1b.P"}n l(a==\'24\'){E=o+\'25.P\'}n{E=o+"1b.P"}k b=s.G(\'1a\');b.t=\'\';b.6.26=\'27\';s.28.M=E}', 62, 133, '||||div||style|holder|width|||||||||||td|var|if|top|else|tmp_rootpath|right|align|gif|document|innerHTML|class|tr||||closeIF|img|src|images|height|PageFrom|function|getElementById|IF|registration|border|valign|nbsp|href|alt|center|php|visibility|indexOf|normal|id|table|left|javascript|Close|BR|padt10|buttons||||float|cursor|pointer|onclick|closeCO||bubble_div|shopping_cart|putIF|MSIE|test|navigator|userAgent|new|Number|RegExp|145px|145px|visible|createElement|setAttribute|scrolling|no|appendChild|pop_up_bg1|pop_up_bg|replace|135px|875px|155px|525px|div_tab|380px|shopping_cart_background|300|cellspacing|cellpadding|popup|summary|background|00000|279|text11grey|padt8|botlink|tspacer|icon_close|hspace|absmiddle|text12|margin|20px|go_to_checkout|117|Go|to|Checkout|continue_shopping|Continue|Shopping|colspan|hidden|pres|shopping_cart_prescription|display|none|location'.split('|'), 0, {}))*/

function putIF(a, x, y, w, h, b, c, d) {	
	holder = document.getElementById(a);
	var e = (/MSIE (\d+\.\d+);/.test(navigator.userAgent));
	var f = new Number(RegExp.$1);
	if (e && f > 5) holder.style.top = "145px";
	else holder.style.top = "145px";
	holder.style.visibility = 'visible';
	IF = document.createElement('div');
	IF.setAttribute("scrolling", 'no');
	holder.appendChild(IF);
	if (tmp_rootpath.indexOf("registration/") > 0) var g = 'pop_up_bg1.gif'/*tpa=http://assets.chemistdirect.co.uk/include/validationscript/pop_up_bg1.gif*/;
	else var g = 'pop_up_bg-1.gif'/*tpa=http://assets.chemistdirect.co.uk/include/validationscript/pop_up_bg.gif*/;
	var i = tmp_rootpath.replace("registration/", "");
	holder.innerHTML = '';
	if (d == 'normal') {
		if (e && f > 5) holder.style.right = "135px";
		else holder.style.right = "875px";
		holder.innerHTML = c
	} else {
		/*
		holder.style.top = y;
		if (e && f > 5) holder.style.right = "155px";
		else holder.style.right = "525px";
		holder.innerHTML = '<div id="div_tab" style="width:380px;"><div class="shopping_cart_background"><table width="300" border="0" cellspacing="0" cellpadding="0" id="popup" summary="" background="#00000;" align="left"><tr><td width="12" valign="top" >&nbsp;</td><td width="279" valign="top"><div align="right" class="text11grey padt8"><a href="javascript:closeIF();" class="botlink">Close</a><img src="' + i + 'images/tspacer.gif" height="1" width="3"/><a href="javascript:closeIF();"><img src="' + i + 'images/icon_close.gif" alt="Close" width="13" height="12" hspace="2" border="0" align="absmiddle" /></a></div><div align="center"></div><BR><BR><div align="center" class="text12 padt10" style="margin-top:20px;">' + c + '</div><div align="center" class="padt10"> <img src="' + tmp_rootpath + 'images/buttons/go_to_checkout.gif" width="117" height="19" border="0" alt="Go to Checkout" style="float:left;cursor: pointer;" onclick="closeCO(\'' + d + '\');"><img src="' + tmp_rootpath + 'images/buttons/continue_shopping.gif" alt="Continue Shopping" style="float:right;cursor: pointer;" onclick="closeIF()"></div></div></div></td><td width="9" align="right" valign="top" >&nbsp;</td></tr><tr><td colspan="3"  height="11">&nbsp;</td></tr> </table></div></div>'
		*/
		if (e && f > 5) holder.style.right = "135px";
		else holder.style.right = "875px";
		holder.innerHTML = c				
	}
}

//[Start] Peerius cart popup reccommendation
function loadjscssfile(filename, filetype)
{
	if (filetype=="js") //if filename is a external JavaScript file
	{
		var fileref=document.createElement('script')
		fileref.setAttribute("type","text/javascript")
		fileref.setAttribute("src", filename)
	}
	else if (filetype=="css") //if filename is an external CSS file
	{
		var fileref=document.createElement("link")
		fileref.setAttribute("rel", "stylesheet")
		fileref.setAttribute("type", "text/css")
		fileref.setAttribute("href", filename)
	}
	if (typeof fileref!="undefined")
		document.getElementsByTagName("head")[0].appendChild(fileref)
}

function peeriusCartPopupRecs(peeriusBasketCallBack)
{
	window.PeeriusCallbacks	= {
			track:{
				   "type":"basket", 
				   "lang":"en-gb"
		},makePrice:function(price){
			if(price >= 1){
				price = "&pound;"+price;
				return price;
			} else {
				price = price * 100;
				price = price.toFixed(0);
				price += "p";
				return price;
			}		
		},product:function(json,j){
				//adding counter to don't overlap with existing recommendation products
				j	= parseInt(100+j)
              	var unitPrice = json.prices.GBP.unitPrice.toFixed(2);
               	var salePrice = json.prices.GBP.salePrice.toFixed(2);
			    unitPrice	= parseFloat(unitPrice);
				salePrice	= parseFloat(salePrice);
				
			   	var saleImgDiv = document.createElement("div");
				saleImgDiv.setAttribute("align","center");
				saleImgDiv.style.position = "relative";

				var saleImgDivContent = '<div align="center" style="position:relative;"><div style="position: absolute; width: 40px; z-index: 10; margin-left: 61%; *margin-left: 12%;  top: -10px;">';
				var saleImg="";
				var saleImgLink = "http://www.chemistdirect.co.uk/images/offertagimages/newseal/";
				var discPrice='';
				var percDisc='';
				if(unitPrice>salePrice){
					discPrice = unitPrice-salePrice;
					discPrice = discPrice.toFixed(2);
					//percDisc = parseInt((discPrice*100)/unitPrice);
					percDisc = Math.round((discPrice*100)/unitPrice)
					/*saleImg='<img width="55" height="55" border="0" alt="Save '+percDisc.toString()+' %" src="'+saleImgLink+'Save'+percDisc.toString()+'.png">';*/
					if(percDisc>=15)
						saleImg='<span class="commentag"><span class="twoline"><span>Save '+percDisc.toString()+'%</span></span></span>';
					else
						saleImg='<img hspace="3" height="20" border="0" alt="" src="tspacer-2.gif"/*tpa=http://assets.chemistdirect.co.uk/include/validationscript/images/tspacer.gif*/>';
				}else{
					saleImg='<img hspace="3" height="20" border="0" alt="" src="tspacer-2.gif"/*tpa=http://assets.chemistdirect.co.uk/include/validationscript/images/tspacer.gif*/>';
				}
				saleImgDivContent = saleImgDivContent+saleImg+'</div></div>';
				
               	var title=json.title;

				var pImgDiv ='<div class="h115px"><a href="'+json.url+'">';
				pImgDiv += '<img border="0" alt="'+title+'" title="'+title+'" src="'+json.img+'" />';
				pImgDiv += '</a></div>';

				var hiddenData = '<input type="hidden" value="01" id="qty_r'+j+'" name="qty_r'+j+'">';
				hiddenData += '<input type="hidden" value="'+json.refCode+'" id="pid_r'+j+'" name="pid_r'+j+'">';
				
				var prdDetailsDiv = '<div class="prd_detail">';
				prdDetailsDiv += '<h6><a class="proname" href="'+json.url+'">'+title+'</a></h6>';
				prdDetailsDiv += '<div align="center" class="text17barialblack"></div>';
				prdDetailsDiv += '</div>';
				
				var size = '';
				if(typeof(json.attributes)=="undefined" || typeof(json.attributes.size)=="undefined"){
					size = '';
				}else{
					size = json.attributes.size;
				}
				var prdSizeDiv = '<div class="prd_size">'+size+'</div>';
				var prdRatingDiv = '<div class="prd_ldt_rating">&nbsp;</div>';
				var prdUnitPriceDiv = '<div align="center" class="text17barialblack"> '+this.makePrice(salePrice)+'</div>';
				
				var showSalePriceVal = '&nbsp;';
				var showSavePriceVal = '&nbsp;';
				if(unitPrice>salePrice){
					showSalePriceVal = 'RRP:<a class="linethr"> '+this.makePrice(unitPrice)+'</a>';
					showSavePriceVal = 'YOU SAVE '+this.makePrice(discPrice);
				}
				var prdDiscDetailsDiv = '<div align="center" class="text11grey">';
				prdDiscDetailsDiv += showSalePriceVal;
				prdDiscDetailsDiv += '</div>';
				prdDiscDetailsDiv += '<div align="center" class="text12red">'+showSavePriceVal+'</div>';
				
				var prdBuyButtonDiv = '<div align="center" class="listing_butn">';
				title	= title.replace(/'/g,'');
    			prdBuyButtonDiv += '<a title="Buy Now" class="buybuttton" onclick="add_to_hidden_basket(\'0\',\''+title+'\');" href="javascript: doCart(\'ADD\',\'r'+j+'\')"></a>';
   				prdBuyButtonDiv += '</div>';
				
				var tmpExtraInfo	= "unitPrice>>"+unitPrice+">>salePrice>>"+salePrice+">>discPrice>>"+discPrice+">>percDisc>>"+percDisc+">>refCode>>"+json.refCode+">>size>>"+size;
				prdBuyButtonDiv	+= '<input type="hidden" value="'+tmpExtraInfo+'" id="tmpExtraInfo'+j+'" name="tmpExtraInfo'+j+'">';
				
				var h = saleImgDivContent+pImgDiv+hiddenData+prdDetailsDiv+prdSizeDiv+prdRatingDiv+prdUnitPriceDiv+prdDiscDetailsDiv+prdBuyButtonDiv;
				
               	var prdDiv=document.createElement("div");
			   
			   	prdDiv.className		= "product_wrapper";
			   	prdDiv.style.padding	= "12px 0px 0 10px";
			   
			   	prdDiv.innerHTML=h;
				
				/*
               	prdDiv.click(function(){
					//alert("Function >> prdDiv click >> json.id >> "+json.id);
               	    Peerius.smartRecsClick(json.id);
               	})
				*/
				//New onlick event is added for click on any product Div / Button, as last only click event was not working properly - 26March2013
				prdDiv.onclick = function(){
					//alert("Function >> prdDiv onClick >> json.id >> "+json.id);
					Peerius.smartRecsClick(json.id);
				}
               	return prdDiv;
		}, smartRecs:function(jsonArray) {
			var yourRecsContainer = document.getElementById("peeriusRecsCartPopup");
			yourRecsContainer.innerHTML	= '';
			yourRecsContainer.className = "category_header";
			
			var peeriusLoaderCartPopupDiv	= document.createElement("div");
			peeriusLoaderCartPopupDiv.setAttribute("id","peeriusLoaderCartPopupDiv");
			peeriusLoaderCartPopupDiv.innerHTML	= '<img src="ajax-loader.gif"/*tpa=http://assets.chemistdirect.co.uk/include/validationscript/images/ajax-loader.gif*/ />';
			yourRecsContainer.appendChild(peeriusLoaderCartPopupDiv);
			
			var headH2 = document.createElement("h2");
			headH2.innerHTML = "Customers who bought this item also bought";
			yourRecsContainer.appendChild(headH2);
			var hideYourContainer = 1;
			
			var cntRec	= 0
			for(i in jsonArray)
			{
					var widget=jsonArray[i];
					for(j in widget.recs)
					{
						hideYourContainer = 0;
						//alert("1 >> widget position >> "+widget.position) //basketjson_ip	baskettopseller
						if(widget.position == 'basketjson_ip' && cntRec < 4)
						{
							var p = widget.recs[j];
							//this.product(p).appendTo(yourRecsContainer);
							yourRecsContainer.appendChild(this.product(p,j));
							cntRec++;
						}//else
					}
			}  
			if(hideYourContainer==1){
				yourRecsContainer.style.display = "none";
			}
			//document.getElementById('peeriusLoaderCartPopupDiv').style.display = "none";
			peeriusLoaderCartPopupDiv.style.display = "none";
			
		}, error:function(code,msg) {
		}, debug:function(msg) {
		}
	}
	
	var peeriusJson	= eval('(' + peeriusBasketCallBack + ')');

	window.PeeriusCallbacks.track	= peeriusJson;
	//window.PeeriusCallbacks.track	= {"type":"basket","lang":"en-gb","basket":{"items":[{"refCode":"2351","qty":1,"price":1}],"currency":"GBP"}};//peeriusBasketCallBack;
	loadjscssfile("peerius.page.js"/*tpa=http://chemistdirect.peerius.com/tracker/peerius.page*/, "js") //dynamically load and add this .js file
}//function peeriusCartPopupRecs
//[End] Peerius cart popup reccommendation

function closeIF() {
	var a = document.getElementById('bubble_div');
	a.innerHTML = '';
	a.style.visibility = 'hidden'
}
function closeCO(a) {
	if (tmp_rootpath.indexOf('registration') > 0 && a == 'normal') {
		PageFrom = "../shopping_cart.php"
	} else if (a == 'pres') {
		PageFrom = tmp_rootpath + 'shopping_cart_prescription.php'
	} else {
		PageFrom = tmp_rootpath + "shopping_cart.php"
	}
	var b = document.getElementById('bubble_div');
	b.innerHTML = '';
	b.style.display = 'none';
	document.location.href = PageFrom
}

function openFAQ(url) {
    var j = window.open(url, 'kk', 'left=20, top=20, width=735,height=700,scrollbars=1')
}

function RemoveFromCart(a, b, c, d) {
    if (c == undefined || c == null) c = 'Normal';
    var d = tmp_rootpath.replace("registration/", "");
    var e = confirm("Do you really want to remove an item?");
    if (e) {
        document.frmcart1.hidn_item_count.value = b;
        document.frmcart1.hidn_cart_action.value = 'REMOVE';
        if (document.frmcart1.hidn_cart_type) document.frmcart1.hidn_cart_type.value = c;
        if (c == 'pres') document.frmcart1.action = tmp_rootpath + "shopping_cart_prescription.php";
        else document.frmcart1.action = tmp_rootpath + "shopping_cart.php";
        document.frmcart1.submit()
        if (d == undefined || d == null) {} else {
            _gaq.push(['_trackEvent', 'Shopping-basket', 'Remove-basket', d]);
        }
    }
}

function UpdateFromCart(a, b, c) {
    if (c == undefined || c == null) c = 'Normal';
    var d = tmp_rootpath.replace("registration/", "");
    var e = document.getElementById('qty_' + b).value;
	
    if (validateQty(e)) {
        document.frmcart1.hidn_item_count.value = b;
        document.frmcart1.hidn_cart_action.value = 'UPDATE';
        if (document.frmcart1.hidn_cart_type) document.frmcart1.hidn_cart_type.value = c;
        if (c == 'pres') document.frmcart1.action = tmp_rootpath + "shopping_cart_prescription.php";
        else document.frmcart1.action = tmp_rootpath + "shopping_cart.php";
        document.frmcart1.submit()
    }
}

/* These new functions are added for prescription products to update & delete from cart*/

function RemoveFromCartPres(a, b, c, d) {
    if (c == undefined || c == null) c = 'Normal';
    var d = tmp_rootpath.replace("registration/", "");
    var e = confirm("Do you really want to remove an item?");
    if (e) {
        document.pres_frmcart1.pres_hidn_item_count.value = b;
        document.pres_frmcart1.pres_hidn_cart_action.value = 'REMOVE';
        document.pres_frmcart1.action = tmp_rootpath + "shopping_cart.php";
        document.pres_frmcart1.submit()
        if (d == undefined || d == null) {} else {
            _gaq.push(['_trackEvent', 'Shopping-basket', 'Remove-basket', d]);
        }
    }
}

function UpdateFromCartPres(a, b, c) {
   
  if (c == undefined || c == null) c = 'Normal';
    var d = tmp_rootpath.replace("registration/", "");
    var e = document.getElementById('pres_qty_' + b).value;
	
    if (validateQty(e)) {
		
        document.pres_frmcart1.pres_hidn_item_count.value = b;
		document.pres_frmcart1.pres_hidn_cart_action.value = 'UPDATE';
        document.pres_frmcart1.action = tmp_rootpath + "shopping_cart.php";
        document.pres_frmcart1.submit()
    }
}


function RemoveFromCartNHS(a, b, c) {
    if (c == undefined || c == null) c = 'Normal';
    var e = confirm("Do you really want to remove an item?");
    if (e) {
        document.nhs_frmcart1.nhs_hidn_cart_action.value = 'REMOVE';
        document.nhs_frmcart1.action = tmp_rootpath + "shopping_cart.php";
        document.nhs_frmcart1.submit()
        if (d == undefined || d == null) {} else {
            _gaq.push(['_trackEvent', 'Shopping-basket', 'Remove-basket', d]);
        }
    }
}

function UpdateFromCartNHS(a, c) {
   
    if (c == undefined || c == null) c = 'Normal';
    var d = tmp_rootpath.replace("registration/", "");
    var e = document.getElementById('nhs_qty').value;
	
    if (validateQty(e)) {
		
        document.nhs_frmcart1.nhs_hidn_cart_action.value = 'UPDATE';
        document.nhs_frmcart1.action = tmp_rootpath + "shopping_cart.php";
        document.nhs_frmcart1.submit()
    }
}

/* End*/


function AddfromWishlist(a, b) {
    document.frmcart1.hidn_item_count.value = b;
    document.frmcart1.hidn_cart_action.value = 'ADD';
    document.frmcart1.action = tmp_rootpath + "my_favorites.php";
    document.frmcart1.submit()
}

function doCart(e, f, g) {
    if (document.getElementById('shopping_cart_div')) {
        runEffect();
        document.getElementById("id_loader").style.display = "block";
    }
    var h = 1;
    var i = tmp_rootpath.replace("registration/", "");
    var j;
    var k = document.getElementById('qty_' + f).value;
    var l = document.getElementById('pid_' + f).value;
    if (screen.width == 1024) var resolution = 3;
    else var resolution = 4;
    if (g == null || g.length == 0) var m = "";
    else var m = g;
    if (m == "Books") pro_type_books = "Books";
    else pro_type_books = "";
    if (e != 'REMOVE') {
        if (!validateQty(k)) {
            h = 0
        }
    }
    if (e == 'REMOVE') {
        var n = document.getElementById('to_id_' + f).value;
        var o = i + 'do_cart.php?cart_action=' + e + '&product_id=' + l + '&quantity=' + k + '&temp_order_id=' + n + '&pro_type_books=' + pro_type_books + '&resolution=' + resolution
    } else {
        var o = i + 'do_cart.php?cart_action=' + e + '&product_id=' + l + '&quantity=' + k + '&pro_type_books=' + pro_type_books + '&resolution=' + resolution
    }
    if (h == 1) {
        j = GetXmlHttpObject();
        if (j == null) {
            alert("Browser does not support HTTP Request");
            return
        }
        j.onreadystatechange = stateChanged;
        j.open('GET', o, true);
        j.send(null)
    }

    function stateChanged() {
        window.scrollTo(0, 0);
        if (e != 'REMOVE') {
            document.getElementById("bubble_div").style.right = window.screen.width / 2;
            document.getElementById("bubble_div").style.top = window.screen.height / 2;
            document.getElementById("bubble_div").style.visibility = 'visible';
            if (document.getElementById('shopping_cart_div')) {} else {
                //document.getElementById("bubble_div").innerHTML = "";
				 //alert(a);
				 document.getElementById("bubble_div").innerHTML = "<img src='Loader.gif'/*tpa=http://assets.chemistdirect.co.uk/include/validationscript/images/Loader.gif*//>";
            }
        }
        if (j.readyState == 4 || j.readyState == "complete") {
            var a = j.responseText;
            if (a == 4445) {
                window.location = i + "shopping_cart.php?msg=2";
                return false;
            }
            if (a == 4444) {
                window.location = i + "shopping_cart.php?ppr=yes";
                return false;
            }
            if (j.status == 200) {
                if (trimAll(a) != 'Negative Product') {
                    var b = a.split('##~~##');
                    if (document.getElementById('basket')) {
                        document.getElementById('basket').innerHTML = '';
                        document.getElementById('basket').innerHTML = b[0];
                    }
                    var c = b[1];
                    var d = b[2];
                    var c = b[3];
					var sb = b[6];
					//[Start] Peerius cart popup reccommendation
					var peeriusBasketCallBack	= b[7];
					//[End] Peerius cart popup reccommendation
					 
					if (document.getElementById('shopping_cart_new_data')) {
						 document.getElementById('shopping_cart_new_data').innerHTML = b[6];
					}
					 
					
                    if (document.getElementById('shopping_cart_div')) {window.location.href="http://assets.chemistdirect.co.uk/include/validationscript/shopping_cart.php";return false;}
                    if (c == 1 && !isNaN(c)) {
                        window.location = i + 'registration/shopping_list.php';
                        return false
                    }
                    if (d.length > 1) alert(d);
                    if (document.getElementById('shopping_cart_div')) {} else {
                        putIF('bubble_div', Left, '150px', '350px', '100px', '', c, 'normal');
                    }
					//[Start] Peerius cart popup reccommendation
					if(peeriusBasketCallBack != '')
					{
						peeriusCartPopupRecs(peeriusBasketCallBack);
					}
					//[End] Peerius cart popup reccommendation
                    setTimeout('HidedivCart("bubble_div")', 30000)
                } else if (trimAll(a) == 'Negative Product') {
                    window.location = 'http://assets.chemistdirect.co.uk/include/validationscript/shopping_cart.php?neg=yes';
                    return false
                } else {
                    window.location = 'http://assets.chemistdirect.co.uk/include/validationscript/shopping_cart.php?neg=un';
                    return false
                }
            }
        }
    }

    function GetXmlHttpObject() {
        var a = null;
        if (window.XMLHttpRequest) {
            a = new XMLHttpRequest()
        } else if (window.ActiveXObject) {
            a = new ActiveXObject("Microsoft.XMLHTTP")
        }
        return a
    }
}

function pres_doCart(f, g) {
    var h = 1;
    var i = tmp_rootpath.replace("registration/", "");
    var j;
    var k = document.getElementById('qty_' + g).value;
    var l = document.getElementById('pid_' + g).value;
    if (f != 'REMOVE') {
        if (!validateQty(k)) {
            h = 0
        }
    }
    if (f == 'REMOVE') {
        var m = document.getElementById('to_id_' + g).value;
        var n = i + 'pres_do_cart.php?cart_action=' + f + '&product_id=' + l + '&quantity=' + k + '&temp_order_id=' + m
    } else {
        var n = i + 'pres_do_cart.php?cart_action=' + f + '&product_id=' + l + '&quantity=' + k
    }
    if (h == 1) {
        j = GetXmlHttpObject();
        if (j == null) {
            alert("Browser does not support HTTP Request");
            return
        }
        j.onreadystatechange = stateChanged;
        j.open('GET', n, true);
        j.send(null)
    }

    function stateChanged() {
        if (j.readyState == 4 || j.readyState == "complete") {
            var a = j.responseText;
			//alert(a);

            if (j.status == 200) {
                var b 		= a.split('##~~##');
                var c 		= b[1];
				var sb 		= b[2];  // top part div with price and items
				var popdiv 	= b[3]; // pop div
				//alert(sb);							
				//alert(popdiv);
					
				if (document.getElementById('shopping_cart_new_data')) {
					 document.getElementById('shopping_cart_new_data').innerHTML = b[2];
				}					
				
                if (c == 2 && !isNaN(c)) {
                    window.location = i + 'shopping_cart.php?m=2';
                    return false
                } else if (c == 1 && !isNaN(c)) {
                    window.location = i + 'shopping_cart.php?m=1';
                    return false
                } else if (c == 3 && !isNaN(c)) {
                    window.location = i + 'shopping_cart.php?m=3';
                    return false
                }
               /* document.getElementById('pres_basket').innerHTML = b[0];
                document.getElementById('pres_basket').className = 'clear padb10';*/
                if (document.getElementById('basket')) {
                    var d = document.getElementById('basket').offsetHeight;
                    var e = parseInt(d) + parseInt(140);
                } else {
                    var e = parseInt(140);
                }
				//alert(e);		
                //putIF('bubble_div', Left, e + 'px', '350px', '100px', '', c, 'pres');
				putIF('bubble_div', Left, e + 'px', '350px', '100px', '', popdiv, 'pres');
				setTimeout('HidedivCart("bubble_div")', 30000)
				
               //window.scrollTo(0, 0);
                //setTimeout('HidedivCart("bubble_div")', 5000)
            }
        }
    }

    function GetXmlHttpObject() {
        var a = null;
        if (window.XMLHttpRequest) {
            a = new XMLHttpRequest()
        } else if (window.ActiveXObject) {
            a = new ActiveXObject("Microsoft.XMLHTTP")
        }
        return a
    }
}

function pres_doCartnew(a, b) {
    var c = 1;
    if ((a == 'ADD') && (b > 0)) {
        cart_form = document.frmcart;
        var d = document.getElementById('pid_' + b).value;
        var e = document.getElementById('qty_' + b).value;
        var f = 0;
        if (document.getElementById('to_id_' + b)) {
            f = document.getElementById('to_id_' + b).value
        }
        if (a != 'REMOVE') {
            if (!validateQty(e)) {
                c = 0
            }
        }
        if (c == 1) {
            cart_form.action = "http://assets.chemistdirect.co.uk/include/validationscript/pres_do_cart.php";
            cart_form.cart_action.value = a;
            cart_form.cart_pid.value = d;
            cart_form.cart_qty.value = e;
            cart_form.to_id.value = f;
            cart_form.submit()
        }
    }
}

function validateQty(a) {
    if (isWhitespace(a)) {
        alert("Please Enter Quantity");
        return false
    } else if (a == 0) {
        alert("Product Quantity can not be 0");
        return false
    } else if (!isCharsInBag(a, "0123456789")) {
        alert("Enter Only Numeric Value for Quantity");
        return false
    }
    return true
}

function remove_wl(a) {
    if (confirm('Do you really want to remove this product?')) {
        var b = document.getElementById('pid_' + a).value;
        document.frmremovewl.wl_pid.value = b;
        document.frmremovewl.action = "http://assets.chemistdirect.co.uk/include/validationscript/do_wishlist.php";
        document.frmremovewl.submit()
    }
}

function negvalue() {
    var a = document.getElementById('qty_1').value;
    if (isNaN(a)) {
        alert("Enter Only Numeric Value for Quantity")
    }
}

function check_pet_practitioner() {
    if (document.getElementById('uk_pet_practitioner')) {
        if (document.getElementById('uk_pet_practitioner').checked != true) {
            alert("Please confirm you have or intend to obtain a prescription signed by a Vet. We cannot supply prescription medicine without one.");
            document.getElementById('uk_pet_practitioner').focus();
            return false
        } else {
            document.pet_forms.submit();
            return true
        }
    } else {
        document.pet_forms.submit();
        return true
    }
}
eval(function (p, a, c, k, e, r) {
    e = function (c) {
        return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36))
    };
    if (!''.replace(/^/, String)) {
        while (c--) r[e(c)] = k[c] || e(c);
        k = [function (e) {
            return r[e]
        }];
        e = function () {
            return '\\w+'
        };
        c = 1
    };
    while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]);
    return p
}('1(8 2=="6")9 2=4 5();1(8 2.k=="6")2.k=4 5();1(8 2.l=="6")2.l=4 5();2.m=v(a,b,w,h,d,c,e,f,g,i){1(!n.x){y}i="6";0.o=i?i:\'z\';0.A=2.k.B(0.o);0.C=4 5();0.D=4 5();0.E=4 F();1(a){0.3(\'G\',a)}1(b){0.3(\'H\',b)}1(w){0.3(\'I\',w)}1(h){0.3(\'J\',h)}1(d){0.3(\'K\',4 2.L(d.M().N(".")))}0.p=2.l.O();1(!r.P&&n.Q&&0.p.R>7){2.m.S=T}1(c){0.s(\'U\',c)}9 q=e?e:\'V\';0.s(\'W\',q);0.3(\'X\',t);0.3(\'Y\',t);9 j=(f)?f:r.Z;0.3(\'10\',j);0.3(\'u\',\'\');1(g){0.3(\'u\',g)}};', 62, 63, 'this|if|deconcept|setAttribute|new|Object|undefined||typeof|var|||||||||||util|SWFObjectUtil|SWFObject|document|DETECT_KEY|installedVer||window|addParam|false|redirectUrl|function||getElementById|return|detectflash|skipDetect|getRequestParameter|params|variables|attributes|Array|swf|id|width|height|version|PlayerVersion|toString|split|getPlayerVersion|opera|all|major|doPrepUnload|true|bgcolor|high|quality|useExpressInstall|doExpressInstall|location|xiRedirectUrl'.split('|'), 0, {}))
eval(function (p, a, c, k, e, r) {
    e = function (c) {
        return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36))
    };
    if (!''.replace(/^/, String)) {
        while (c--) r[e(c)] = k[c] || e(c);
        k = [function (e) {
            return r[e]
        }];
        e = function () {
            return '\\w+'
        };
        c = 1
    };
    while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]);
    return p
}('D.R.S={o:4(a){1.p=!a?"T.8":a;1.9(\'o\',q)},9:4(a,b){1.E[a]=b},2:4(a){7 1.E[a]},U:4(a,b){1.F[a]=b},r:4(){7 1.F},e:4(a,b){1.s[a]=b},V:4(a){7 1.s[a]},G:4(){7 1.s},t:4(){3 a=H W();3 b;3 c=1.G();u(b v c){a[a.h]=b+"="+c[b]}7 a},I:4(){3 a="";5(w.X&&w.J&&w.J.h){5(1.2("i")){1.e("K","Y");1.9(\'8\',1.p)}a=\'<Z 10="11/x-12-13" 14="\'+1.2(\'8\')+\'" j="\'+1.2(\'j\')+\'" k="\'+1.2(\'k\')+\'" l="\'+1.2(\'l\')+\'"\';a+=\' f="\'+1.2(\'f\')+\'" m="\'+1.2(\'f\')+\'" \';3 b=1.r();u(3 c v b){a+=[c]+\'="\'+b[c]+\'" \'}3 d=1.t().L("&");5(d.h>0){a+=\'M="\'+d+\'"\'}a+=\'/>\'}N{5(1.2("i")){1.e("K","15");1.9(\'8\',1.p)}a=\'<O f="\'+1.2(\'f\')+\'" 16="17:18-19-1a-1b-1c" j="\'+1.2(\'j\')+\'" k="\'+1.2(\'k\')+\'" l="\'+1.2(\'l\')+\'">\';a+=\'<y m="1d" z="\'+1.2(\'8\')+\'" />\';3 b=1.r();u(3 c v b){a+=\'<y m="\'+c+\'" z="\'+b[c]+\'" />\'}3 d=1.t().L("&");5(d.h>0){a+=\'<y m="M" z="\'+d+\'" />\'}a+="</O>"}7 a},1e:4(a){5(1.2(\'o\')){3 b=H D.1f([6,0,1g]);5(1.A.B(b)&&!1.A.B(1.2(\'P\'))){1.9(\'i\',q);1.e("1h",1i(1.2(\'1j\')));g.C=g.C.1k(0,1l)+" - 1m 1n 1o";1.e("1p",g.C)}}5(1.1q||1.2(\'i\')||1.A.B(1.2(\'P\'))){3 n=(1r a==\'1s\')?g.1t(a):a;n.1u=1.I();7 q}N{5(1.2(\'Q\')!=""){g.1v.1w(1.2(\'Q\'))}}7 1x}};', 62, 96, '|this|getAttribute|var|function|if||return|swf|setAttribute|||||addVariable|id|document|length|doExpressInstall|width|height|style|name||useExpressInstall|xiSWFPath|true|getParams|variables|getVariablePairs|for|in|navigator||param|value|installedVer|versionIsValid|title|deconcept|attributes|params|getVariables|new|getSWFHTML|mimeTypes|MMplayerType|join|flashvars|else|object|version|redirectUrl|SWFObject|prototype|expressinstall|addParam|getVariable|Array|plugins|PlugIn|embed|type|application|shockwave|flash|src|ActiveX|classid|clsid|D27CDB6E|AE6D|11cf|96B8|444553540000|movie|write|PlayerVersion|65|MMredirectURL|escape|xiRedirectUrl|slice|47|Flash|Player|Installation|MMdoctitle|skipDetect|typeof|string|getElementById|innerHTML|location|replace|false'.split('|'), 0, {}))
eval(function (p, a, c, k, e, r) {
    e = function (c) {
        return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36))
    };
    if (!''.replace(/^/, String)) {
        while (c--) r[e(c)] = k[c] || e(c);
        k = [function (e) {
            return r[e]
        }];
        e = function () {
            return '\\w+'
        };
        c = 1
    };
    while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]);
    return p
}('8.E.F=q(){i a=5 8.h([0,0,0]);4(k.z&&k.G.H){i x=k.z["I J"];4(x&&x.A){a=5 8.h(x.A.B(/([a-K-L]|\\s)+/,"").B(/(\\s+r|\\s+b[0-9]+)/,".").t("."))}}C 4(k.D&&k.D.M("N O")>=0){i b=1;i c=3;P(b){n{c++;b=5 o("d.d."+c);a=5 8.h([c,0,0])}p(e){b=l}}}C{n{i b=5 o("d.d.7")}p(e){n{i b=5 o("d.d.6");a=5 8.h([6,0,Q]);b.R="S"}p(e){4(a.j==6){f a}}n{b=5 o("d.d")}p(e){}}4(b!=l){a=5 8.h(b.T("$U").t(" ")[1].t(","))}}f a};8.h=q(a){g.j=a[0]!=l?u(a[0]):0;g.m=a[1]!=l?u(a[1]):0;g.v=a[2]!=l?u(a[2]):0};8.h.V.W=q(a){4(g.j<a.j)f w;4(g.j>a.j)f y;4(g.m<a.m)f w;4(g.m>a.m)f y;4(g.v<a.v)f w;f y};', 59, 59, '||||if|new|||deconcept|||||ShockwaveFlash||return|this|PlayerVersion|var|major|navigator|null|minor|try|ActiveXObject|catch|function|||split|parseInt|rev|false||true|plugins|description|replace|else|userAgent|SWFObjectUtil|getPlayerVersion|mimeTypes|length|Shockwave|Flash|zA|Z|indexOf|Windows|CE|while|21|AllowScriptAccess|always|GetVariable|version|prototype|versionIsValid'.split('|'), 0, {}))
eval(function (p, a, c, k, e, r) {
    e = function (c) {
        return c.toString(a)
    };
    if (!''.replace(/^/, String)) {
        while (c--) r[e(c)] = k[c] || e(c);
        k = [function (e) {
            return r[e]
        }];
        e = function () {
            return '\\w+'
        };
        c = 1
    };
    while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]);
    return p
}('c.g={h:3(a){2 q=5.d.j||5.d.k;4(a==l){6 q}4(q){2 b=q.7(1).m("&");8(2 i=0;i<b.e;i++){4(b[i].7(0,b[i].f("="))==a){6 b[i].7((b[i].f("=")+1))}}}6""}};c.n.o=3(){2 a=5.p("r");8(2 i=a.e-1;i>=0;i--){a[i].s.t=\'u\';8(2 9 v a[i]){4(w a[i][9]==\'3\'){a[i][9]=3(){}}}}};', 33, 33, '||var|function|if|document|return|substring|for|x|||deconcept|location|length|indexOf|util|getRequestParameter||search|hash|null|split|SWFObjectUtil|cleanupSWFs|getElementsByTagName||OBJECT|style|display|none|in|typeof'.split('|'), 0, {}))
eval(function (p, a, c, k, e, r) {
    e = function (c) {
        return c.toString(a)
    };
    if (!''.replace(/^/, String)) {
        while (c--) r[e(c)] = k[c] || e(c);
        k = [function (e) {
            return r[e]
        }];
        e = function () {
            return '\\w+'
        };
        c = 1
    };
    while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]);
    return p
}('4(0.1.e){4(!0.7){0.5.8=2(){f=2(){};g=2(){};9.b("h",0.5.i)};9.b("j",0.5.8);0.7=k}}4(!3.c&&3.d){3.c=2(a){l 3.d[a]}}6 m=0.n.o;6 p=0.1;6 1=0.1;', 26, 26, 'deconcept|SWFObject|function|document|if|SWFObjectUtil|var|unloadSet|prepUnload|window||attachEvent|getElementById|all|doPrepUnload|__flash_unloadHandler|__flash_savedUnloadHandler|onunload|cleanupSWFs|onbeforeunload|true|return|getQueryParamValue|util|getRequestParameter|FlashObject'.split('|'), 0, {}))
eval(function (p, a, c, k, e, r) {
    e = function (c) {
        return c.toString(a)
    };
    if (!''.replace(/^/, String)) {
        while (c--) r[e(c)] = k[c] || e(c);
        k = [function (e) {
            return r[e]
        }];
        e = function () {
            return '\\w+'
        };
        c = 1
    };
    while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]);
    return p
}('j k(a){i a;i b=l.m;n(a){8\'1\':0.4(\'9\').5.6=\'\';0.4(\'c\').5.6=\'7\';0.4(\'d\').5.6=\'7\';0.4(\'e\').5.6=\'\';0.4(\'f\').5.6=\'7\';0.4(\'g\').5.6=\'\';h;8\'2\':0.4(\'9\').5.6=\'7\';0.4(\'c\').5.6=\'\';0.4(\'d\').5.6=\'\';0.4(\'e\').5.6=\'7\';0.4(\'f\').5.6=\'7\';0.4(\'g\').5.6=\'\';h;8\'3\':0.4(\'9\').5.6=\'7\';0.4(\'c\').5.6=\'\';0.4(\'d\').5.6=\'7\';0.4(\'e\').5.6=\'\';0.4(\'f\').5.6=\'\';0.4(\'g\').5.6=\'7\';h}o(\'p.q\',a,b)}', 27, 27, 'document||||getElementById|style|display|none|case|offer_week1|||offer_week2|offer_week3|offer_week4|offer_week5|offer_week6|break|var|function|funDoActiveNew|screen|width|switch|getTabValue|ajex_tabcontent|php'.split('|'), 0, {}))
eval(function (p, a, c, k, e, r) {
    e = function (c) {
        return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36))
    };
    if (!''.replace(/^/, String)) {
        while (c--) r[e(c)] = k[c] || e(c);
        k = [function (e) {
            return r[e]
        }];
        e = function () {
            return '\\w+'
        };
        c = 1
    };
    while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]);
    return p
}('g u(b,c,d){3{0=5 v()}6(e){3{0=5 h("w.i")}6(e){3{0=5 h("y.i")}6(e){z("A B C!");j k}}}l.m(\'n\').o="<p D=\'7:E;\' F=\'G\' H=\'I\'><J K=\'L/M.N\'></p>";8 b="2/O/P.Q?q="+c+\'&r=\'+d;8 f="q="+c+\'&r=\'+d;0.R(\'S\',b,T);0.U=g(){9(0.V==4){8 a=0.W;9(a!=X){l.m(\'n\').o=a;Y(\'#Z\').2({10:4});9(c!=1){$(".2-11-12").s("7","t");$(".2-13").s("7","t")}}}};0.14(\'15-16\',\'17/x-18-19-1a\');0.1b(f);j k}', 62, 74, 'xmlhttp||jcarousel|try||new|catch|height|var|if|||||||function|ActiveXObject|XMLHTTP|return|false|document|getElementById|getContent|innerHTML|div|offer_type|screenwidth|css|250px|getTabValue|XMLHttpRequest|Msxml2||Microsoft|alert|Your|browser|broke|style|125px|align|center|class|padt90|img|src|images|Loader|gif|lib|ajex_tabcontent|php|open|GET|true|onreadystatechange|readyState|responseText|null|jQuery|mycarousel|visible|clip|horizontal|item|setRequestHeader|Content|Type|application|www|form|urlencoded|send'.split('|'), 0, {}))

function getTabValue1(b, c, d, a) {
    try {
        xmlhttp = new XMLHttpRequest()
    } catch (e) {
        try {
            xmlhttp = new ActiveXObject("Msxml2.XMLHTTP")
        } catch (e) {
            try {
                xmlhttp = new ActiveXObject("Microsoft.XMLHTTP")
            } catch (e) {
                alert("Your browser broke!");
                return false
            }
        }
    }
    document.getElementById('getContent').innerHTML = "<div style='height:125px;' align='center' class='padt90'><img src='Loader.gif'/*tpa=http://assets.chemistdirect.co.uk/include/validationscript/images/Loader.gif*/></div>";
    var b = "jcarousel/lib/ajex_tabcontent1.php?offer_type=" + c + '&screenwidth=' + a + '&category_id=' + d;
    var f = "offer_type=" + c + '&screenwidth=' + a + '&category_id=' + d;
    xmlhttp.open('GET', b, true);
    xmlhttp.onreadystatechange = function () {
        if (xmlhttp.readyState == 4) {
            var a = xmlhttp.responseText;
            if (a != null) {
                document.getElementById('getContent').innerHTML = a;
                jQuery('#mycarousel').jcarousel({
                    visible: 4
                });
                if (c != 1) {
                    $(".jcarousel-skin-tango1 .jcarousel-clip-horizontal").css("height", "250px");
                    $(".jcarousel-item").css("height", "250px")
                }
            }
        }
    };
    xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    xmlhttp.send(f);
    return false
}
eval(function (p, a, c, k, e, r) {
    e = function (c) {
        return c.toString(a)
    };
    if (!''.replace(/^/, String)) {
        while (c--) r[e(c)] = k[c] || e(c);
        k = [function (e) {
            return r[e]
        }];
        e = function () {
            return '\\w+'
        };
        c = 1
    };
    while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]);
    return p
}('n o(a,d){m a;m d;m b=p.q;r(a){9\'1\':0.5(\'c\').6.7=\'\';0.5(\'e\').6.7=\'8\';0.5(\'f\').6.7=\'8\';0.5(\'g\').6.7=\'\';0.5(\'h\').6.7=\'8\';0.5(\'i\').6.7=\'\';0.5(\'j\').6.7=\'8\';0.5(\'k\').6.7=\'\';l;9\'2\':0.5(\'c\').6.7=\'8\';0.5(\'e\').6.7=\'\';0.5(\'f\').6.7=\'\';0.5(\'g\').6.7=\'8\';0.5(\'h\').6.7=\'8\';0.5(\'i\').6.7=\'\';0.5(\'j\').6.7=\'8\';0.5(\'k\').6.7=\'\';l;9\'3\':0.5(\'c\').6.7=\'8\';0.5(\'e\').6.7=\'\';0.5(\'f\').6.7=\'8\';0.5(\'g\').6.7=\'\';0.5(\'h\').6.7=\'\';0.5(\'i\').6.7=\'8\';0.5(\'j\').6.7=\'8\';0.5(\'k\').6.7=\'\';l;9\'4\':0.5(\'c\').6.7=\'8\';0.5(\'e\').6.7=\'\';0.5(\'f\').6.7=\'8\';0.5(\'g\').6.7=\'\';0.5(\'h\').6.7=\'8\';0.5(\'i\').6.7=\'\';0.5(\'j\').6.7=\'\';0.5(\'k\').6.7=\'8\';l}s(\'t.u\',a,d,b)}', 31, 31, 'document|||||getElementById|style|display|none|case|||offer_week1||offer_week2|offer_week3|offer_week4|offer_week5|offer_week6|offer_week7|offer_week8|break|var|function|funDoActiveNew1|screen|width|switch|getTabValue1|ajex_tabcontent1|php'.split('|'), 0, {}))

function doCartNew(e, f, g, promo_code, prod_id) {
    var new_url = document.getElementById("new_url").value;
    if (document.getElementById('shopping_cart_div')) {
        runEffect();
        document.getElementById("id_loader").style.display = "block";
    }
    var h = 1;
    var i = tmp_rootpath.replace("registration/", "");
    var j;
    var k = document.getElementById('qty_' + f).value;
    var l = document.getElementById('pid_' + f).value;
    if (screen.width == 1024) var resolution = 3;
    else var resolution = 4;
    if (g == null || g.length == 0) var m = "";
    else var m = g;
    if (e == 'ADD') {
        if (g == 'bioconcept') {
            promotion_code = promo_code;
            var o = i + 'do_cart.php?cart_action=' + e + '&product_id=' + l + '&quantity=' + k + '&promotion_code=' + promotion_code + '&pro_id=' + prod_id
        }
    }
    if (h == 1) {
        j = GetXmlHttpObject();
        if (j == null) {
            alert("Browser does not support HTTP Request");
            return
        }
        j.onreadystatechange = stateChanged;
        j.open('GET', o, true);
        j.send(null)
    }

    function stateChanged() {
        window.scrollTo(0, 0);
        if (j.readyState == 4 || j.readyState == "complete") {
            var a = j.responseText;
            if (g == 'bioconcept') {
                window.location = new_url;
                return false;
            }
            if (a == 4445) {
                window.location = i + "shopping_cart.php?msg=2";
                return false;
            }
            if (a == 4444) {
                window.location = i + "shopping_cart.php?ppr=yes";
                return false;
            }
            if (j.status == 200) {
                if (trimAll(a) != 'Negative Product') {
                    var b = a.split('##~~##');
                    var cc = b[1];
                    var d = b[2];
                    var c = b[3];
                    if (document.getElementById('basket')) {
                        document.getElementById('basket').innerHTML = "";
                        document.getElementById('basket').innerHTML = b[0];
                        document.getElementById("id_loader").style.display = "none";
                        runEffect();
                        if (e == 'ADD' && !cc) testFade('id_' + l);
                    }
                    if (document.getElementById('shopping_cart_div')) {
                        document.getElementById('shopping_cart_div').innerHTML = b[4];
                        if (document.getElementById('normal_shopping_cart_buttons')) {
                            document.getElementById('normal_shopping_cart_buttons').style.display = "none";
                        }
                        if (b[5] == "") {
                            document.getElementById('id_away_price').innerHTML = "";
                        } else {
                            document.getElementById('id_away_price').innerHTML = "<strong>Add " + b[5] + " to your order to qualify for <a href='http://assets.chemistdirect.co.uk/include/validationscript/delivery_information.php'>Free Standard Shipping</a></strong>";
                        }
                        document.getElementById("id_loader").style.display = "none";
                        runEffect();
                    }
                    if (c == 1 && !isNaN(c)) {
                        window.location = i + 'registration/shopping_list.php';
                        return false
                    }
                    if (d.length > 1) alert(d);
                    if (cc) {
                        putIF('bubble_div', Left, '150px', '350px', '100px', '', cc, '');
                        setTimeout('HidedivCart("bubble_div")', 30000)
                    }
                    if (document.getElementById('shopping_cart_div')) {} else {}
                } else if (trimAll(a) == 'Negative Product') {
                    window.location = 'http://assets.chemistdirect.co.uk/include/validationscript/shopping_cart.php?neg=yes';
                    return false
                } else {
                    window.location = 'http://assets.chemistdirect.co.uk/include/validationscript/shopping_cart.php?neg=un';
                    return false
                }
            }
        }
    }

    function GetXmlHttpObject() {
        var a = null;
        if (window.XMLHttpRequest) {
            a = new XMLHttpRequest()
        } else if (window.ActiveXObject) {
            a = new ActiveXObject("Microsoft.XMLHTTP")
        }
        return a
    }
}
