
        function addToCard(productID, prodType, prodPrice)
        {   
          advAJAX.post(
          {
            url : ( baseUrl+'index.php?m=Order&a=Add&prodType='+prodType+'&cp_main_id='+productID+'&prodPrice='+prodPrice
                ) ,
            parameters : {
            },
            onInitialization : function() {

            },
            onError : function() {
                 alert(addToCardErrorInfo);
            },
            onSuccess : function(obj) {
    	        if (obj.responseText == "<br />") {
    			}
                else {
                    alert(obj.responseText);
    			}
            }
          });
        }

		function getPageScroll()
		{
			var yScroll;

			if (self.pageYOffset) {
				yScroll = self.pageYOffset;
			} else if (document.documentElement && document.documentElement.scrollTop){	 // Explorer 6 Strict
				yScroll = document.documentElement.scrollTop;
			} else if (document.body) {// all other Explorers
				yScroll = document.body.scrollTop;
			}

			arrayPageScroll = new Array('',yScroll)
			return arrayPageScroll;
		}

		function actualise()
		{
			var scrollPos = getPageScroll();
			jQuery('div#basketInfoBox').css('top', scrollPos[1] + 200 + 'px');
		}

		jQuery(document).ready(function(){

			//$('a').bind('click', function() {
			jQuery('a').click(function(){

                if ( (jQuery(this).attr('id'))==('addToCart_'+(jQuery(this).attr('name'))) ) {
                

                    jQuery('div#basketInfoBox').removeClass('invisible');

                    actualise();

                    prodSize = jQuery('#addToCartSize_'+(jQuery(this).attr('name'))).attr('value');
                    if (prodSize!='noSize')
                    {
                        prodPrice = productSizes2Prices[jQuery(this).attr('name')][prodSize];
                        jQuery('#whatAdded').html( jQuery(this).attr('title') + ' '+sizeLangWord+' ' +prodSize );
                    }
                    else
                    {
                        prodPrice = jQuery('#addToCartPrice_'+(jQuery(this).attr('name'))).attr('name');
                        jQuery('#whatAdded').html( jQuery(this).attr('title') );
                    }

				    addToCard( jQuery(this).attr('name'), prodSize, prodPrice);
				    
				    jQuery('#cartBox').css('visibility', 'visible');
				    jQuery('#basketProductCount').html( parseInt(jQuery('#basketProductCount').html())+1 );
				}
			});

			jQuery('span#closeBasketInfoBox').click(function(){
				jQuery('div#basketInfoBox').addClass('invisible');
			});

		});