var config1 = {
   slideshowGroup: 'group1',
   transitions: ['expand', 'crossfade']
};

var config2 = {
   slideshowGroup: 'group2',
   transitions: ['expand', 'crossfade']
};	


	hs.graphicsDir = 'scripts/highslide/graphics/';
	hs.align = 'center';
	hs.transitions = ['expand', 'crossfade'];
	hs.outlineType = 'rounded-white';
	hs.fadeInOut = true;
	hs.numberPosition = 'caption';
	hs.creditsHref = '';	
	hs.lang = {
		loadingText :     'Chargement...',
		loadingTitle :    'Cliquer pour annuler',
		focusTitle :      'Cliquer pour amener au premier plan',
		fullExpandTitle : 'Afficher à la taille réelle',
		fullExpandText :  'Taille réelle',
		creditsText : '',
		creditsTitle : 'Retour à la page d\'accueil',
		previousText :    'Précédent',
		previousTitle :   'Précédent (flèche gauche)',
		nextText :        'Suivant',
		nextTitle :       'Suivant (flèche droite)',
		moveTitle :       'Déplacer',
		moveText :        'Déplacer',
		closeText :       'Fermer',
		closeTitle :      'Fermer (esc ou Echap)',
		resizeTitle :     'Redimensionner',
		playText :        'Lancer',
		playTitle :       'Lancer le diaporama (barre d\'espace)',
		pauseText :       'Pause',
		pauseTitle :      'Suspendre le diaporama (barre d\'espace)',
		number :          'N° %1/%2',
		restoreTitle :    'Cliquer pour fermer l\'image, cliquer et faire glisser pour déplacer, utiliser les touches flèches droite et gauche pour suivant et précédent.'
	};	

function open_div () 
{

}

	function carte_handler () {
		if (document.getElementById('map_polygone').value!='') 
			document.getElementById('rech_carte').src = '../office/pietrapolis/catalog/images/bt_carte_actif.gif';
		else
			document.getElementById('rech_carte').src = '../office/pietrapolis/catalog/images/bt_carte.gif';
	}

function change_val (cid , val) {
	
	for ( var i = 0 ; i <  document.quick_find[cid.name].length ; i++){
		var c_length = document.quick_find[cid.name][i].name.length;
		var c = document.quick_find[cid.name][i].name.substring ( 0, (c_length-8));
	
		if (document.quick_find[cid.name][i].value != val){
			document.quick_find[cid.name][i].checked = false;
		}else {
			if (document.quick_find[cid.name][i].checked == true){
				document.quick_find[c].value = val;
			}else{
				document.quick_find[cid.name][i].checked = false;
				document.quick_find[c].value = '';
			}			
		}
	}
}

	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();
		});
	};

	jQuery().ready(function(){


		if (document.getElementById("mycarousel_1")!=null)
		{
			jQuery('#mycarousel_1').jcarousel({
				auto: 3,
				wrap: 'last',
				initCallback: mycarousel_initCallback,
				scroll: 1
			});	
		}
		if (document.getElementById("mycarousel_2")!=null)
		{
			jQuery('#mycarousel_2').jcarousel({
				auto: 2,
				wrap: 'last',
				initCallback: mycarousel_initCallback,
				scroll: 1
			});	
		}

		if (document.getElementById("mycarousel_10")!=null)
		{
			jQuery('#mycarousel_10').jcarousel({
				auto: 2,
				wrap: 'last',
				initCallback: mycarousel_initCallback,
				scroll: 1
			});	
		}

		if (document.getElementById("gallery")!=null)
		{
			jQuery('#gallery a').lightBox({
				overlayBgColor: '#000',
				overlayOpacity: 0.6,
				imageLoading: 	'includes/languages/french/images/loading.gif>',
				imageBtnClose: 	'includes/languages/french/images/lightbox-btn-close.gif',
				imageBtnPrev: 	'includes/languages/french/images/lightbox-btn-prev.gif',
				imageBtnNext: 	'includes/languages/french/images/lightbox-btn-next.gif',			
				containerResizeSpeed: 350
			});
		}
		
	});
	
	
	
		function select_val2(val, cont)
	{		
		if(val.value == 'PN' && cont.name == 'C_27')
		{
			if (val.checked)
			{
				document.quick_find.C_211.value='Neuf';
			}
			else
			{
				document.quick_find.C_211.value='';
			}
		}
		else
		{
			if (val.checked)
			{
				cont.value += val.value + ",";
			}
			if (!val.checked)
			{
				cont.value = cont.value.replace(val.value+',','');
			}
		}
	}

