searchA = new Image();
searchB = new Image();
searchA.src = '/img/search0.gif';
searchB.src = '/img/search1.gif';


function changeImg(dest, source)
{
	dest.src = source.src;
}

function colorSize(cstr, cstd, color, size) 
{

    var colorsize = document.getElementById('colorsize');
    document.getElementById('color').value = color;
    document.getElementById('size').value = size;
    
    var arr = colorsize.value.split(',');
    if(arr[0] != '')  {
        for(var i=0; i<=7; i++) {
            document.getElementById(arr[0]+'_cstd'+i).style.background = '';
        }     
    }
           
    for(var i=0; i<=7; i++) {
        document.getElementById(cstr+'_cstd'+i).style.background = '#DEDEDE';
    }
    
    document.getElementById(cstr+'_'+cstd).style.background = '#DEA800';    
    colorsize.value = cstr+','+cstr+'_'+cstd;
                
}


function addBasket(idproduct) {
   
   var count = document.product.count.value;
   var size = document.product.size.value;
   var color = document.product.color.value;
   
   location.href = '/basket.php?id='+idproduct+'&count='+count+'&size='+size+'&color='+color;

}