/*basket confirmation */
    var baskFintv=50;
    var bopac=0;
    var basketInterval;
    var fadeinout=0;
    var resArr;
    var resArr=new Array();
    var dontAdd=0;
    var baskDelay=2000;   
/*basket confirmation */
    function doBag(obj,pCodeIn,pCol,pSize){var URL;
        //alert(pCode);
        var pCode;
        pCode=pCodeIn.replace("&","%26")
        URL="/abasket.asp?";
        URL+="pCode="+pCode;
        URL+="&pCol="+pCol;
        URL+="&pSize="+pSize; 
        //alert(URL);      
        if(!dontAdd){
            var xmlHttp=createxmlHttp();            
            xmlHttp.onreadystatechange=function(){         
                if(xmlHttp.readyState==4 && xmlHttp.status==200){
                    bagConfirm(obj,xmlHttp.responseText);}};	
            xmlHttp.open("GET",URL,true);
            xmlHttp.send(null);}}   
    function bagConfirm(obj,responseIn){try{       
        if(!fadeinout){dontAdd=1;       
        resArr=responseIn.split("~");       
        if(resArr[1]!=""){
        document.getElementById('menu_basket_info').innerHTML=resArr[1];
        }   
            if(resArr[0]!=""){document.getElementById(obj+"text").innerHTML=resArr[0];}
            basketInterval=setInterval("fadeInBasket('"+obj+"')",baskFintv);}
        else{basketInterval=setInterval("fadeOutBasket('"+obj+"')",baskFintv);}}catch(e){}}   
    function fadeInBasket(obj){    
        var basket=document.getElementById(obj);
        basket.style.display="block";
        if(bopac<10){bopac+=1;
            basket.style.filter='progid:DXImageTransform.Microsoft.Alpha(opacity='+bopac*10+')';
            basket.style.filter='alpha(opacity='+bopac*10+')';
            basket.style.opacity=bopac/10;
        }else{basketInterval=window.clearInterval(basketInterval);        
        fadeinout=1;
        setTimeout("bagConfirm('"+obj+"')",baskDelay);}}    
    function fadeOutBasket(obj){
        var basket=document.getElementById(obj);    
        if(bopac>0){bopac-=1;
            basket.style.filter='progid:DXImageTransform.Microsoft.Alpha(opacity='+bopac*10+')';
            basket.style.filter='alpha(opacity='+bopac*10+')';
            basket.style.opacity=bopac/10;
        }else{basketInterval=window.clearInterval(basketInterval);fadeinout=0;basket.style.display="none";dontAdd=0;}}
    function handle_keypress(e,bagCin,pCodeIn,pColourIn,pSizeIn){
        e=e||window.event;
        var unicode=e.charCode?e.charCode:e.keyCode?e.keyCode:0;
        if(unicode==13){doBag(bagCin,pCodeIn,pColourIn,pSizeIn);}}
