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();
    });
};

// bookmark
function bookmark(url, description)
{
if (document.all)
		window.external.AddFavorite(url, description);
	else if (window.sidebar)
		window.sidebar.addPanel(description, url, "");
}

jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
        auto: 2,
        wrap: 'last',
        initCallback: mycarousel_initCallback,
		scroll: 1
    });
});


function charge_depts(region_id){
	agent.call('','charge_depts','depts_return',region_id);
	
}

function depts_return(str)
{	
	var depts = str.substr(0,20);
	depts = parseInt(depts);
	document.getElementById('depts').innerHTML = str.substr(20,str.length-20);
	/* agent.call('','charge_villes','villes_return',depts); */
}


function charge_depts2(dept_id){

	agent.call('','charge_depts2','depts_return2',dept_id);

}

function depts_return2(str)
{	
	var depts = str.substr(0,20);
	depts = parseInt(depts);
	document.getElementById('depts').innerHTML = "&nbsp;&nbsp;"+str.substr(20,str.length-20);
}

function charge_villes(dept_id){
	
	agent.call('','charge_villes','villes_return',dept_id);
}

function villes_return(str){
	var villes = str.substr(0,20);
	villes = parseInt(villes);
	document.quick_find.C_65.innerHTML = str.substr(20,str.length-20);
}





