function fav()
{
  if ( navigator.appName != 'Microsoft Internet Explorer' )
	{
		window.sidebar.addPanel("Shop And City","http://www.shopandcity.com","");
	}
	else
	{
		window.external.AddFavorite("http://www.shopandcity.com","Shop And City");
	}
  
}

function montre(id,div,i) {
    
    //var menuWidth = parseInt(document.getElementById("menu").offsetLeft);
    var menuWidth = document.getElementById("container").offsetLeft;
    if (document.getElementById) {
        document.getElementById(id).style.display="block";
        document.getElementById(id).style.left= menuWidth +2 + "px";
        //document.getElementById(id).style.width=1000-div.offsetLeft+"px";
        if(div.id == "")
            div.style.backgroundImage = "url('newImages/btn_bg_over_"+i+".jpg')";

        //alert(menuWidth+' 1');
    } else if (document.all) {
        document.all[id].style.display="block";
        //alert(menuWidth+' 2');
    } else if (document.layers) {
        document.layers[id].display="block";
        //alert(menuWidth+' 3');
    }
}


function cache(id,div) {
    if (document.getElementById) {
        document.getElementById(id).style.display="none";
        if(div.id == "")
            div.style.backgroundImage = "url('newImages/btn_bg.jpg')";
    } else if (document.all) {
        document.all[id].style.display="none";
    } else if (document.layers) {
        document.layers[id].display="none";
    }
}


function plus(id,td) {
    
    var maFenetre = null;
    if (document.getElementById)
        maFenetre = document.getElementById(id);
    else if (document.all[id])
        maFenetre = document.all[id];
    else if (document.layers)
        maFenetre = document.layers[id]
    
    var img = td.getElementsByTagName("img")[0];
    newSrc =  '/newImages/' +id + '_over.png';
    img.src = newSrc;
    
    
    if(maFenetre != null)
    {
        var decalage =  0;
        if (maFenetre.currentStyle)
        {
                var y = maFenetre.currentStyle.width;
                decalage = 27;
        }
        else if (window.getComputedStyle)
                var y = document.defaultView.getComputedStyle(maFenetre,null).getPropertyValue('Width');
        
        maFenetre.style.display="block";
        var cont = document.getElementById("container").offsetLeft
        maFenetre.style.left = cont + parseInt(td.offsetLeft) + td.offsetWidth - parseInt(y) - 10 + decalage + "px";
    }
}

function moins(id,div) {
    if (document.getElementById) {
        document.getElementById(id).style.display="none";
    } else if (document.all) {
        document.all[id].style.display="none";
    } else if (document.layers) {
        document.layers[id].display="none";
    }
    var img = div.getElementsByTagName("img")[0];
    newSrc =  '/newImages/' +id + '.png';
    img.src = newSrc;
}

function rollOverOn(td){
    var image = td.getElementsByTagName("img")[0];
    var derCar = td.id.substring(td.id.length-1,td.id.length);
    var theId = td.id;
		if(derCar > 0)
		{
		  theId = td.id.substring(0,td.id.length-1);
		}
		
    
    var source = 'newImages/' + theId + '_over.png';
    if (document.getElementById) {
        image.src = source;
    } else if (document.all) {
        document.all[id].style.display="block";
    } else if (document.layers) {
        document.layers[id].display="block";
    }
}

function rollOverOff(td){
      var derCar = td.id.substring(td.id.length-1,td.id.length);
    var theId = td.id;
		if(derCar > 0)
		{
		  theId = td.id.substring(0,td.id.length-1);
		}

    var source = 'newImages/' +theId + '.png';
    var image = td.getElementsByTagName("img")[0];
    if (document.getElementById) {
        image.src = source;
    } else if (document.all) {
        document.all[id].style.display="block";
    } else if (document.layers) {
        document.layers[id].display="block";
    }
}

function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};





