// JavaScript Document
window.addEvent('domready', init);



function init(){
	var menu = new DropMenu('menud',{ mode:'vertical' });

	/*
		Radius settings:
			radius
			topleft
			topright
			bottomleft
			bottomright
	*/
	
	GoodCorners.round( $$('.round'), {radius: "15px",bottomleft:'',bottomright:'',topright:''});
	
	if( $('exampleIV-B') ) { new vlaDatePicker('exampleIV-B', { style: 'apple_widget', offset: { x: 3, y: 1 }, filePath:jsPath+'inc/' }); }
		
	$$('.vlaCalendarPicker apple_widget').setStyle({ 
	  display: 'block',
	  opacity: '100',
	  visibility: 'visible'
	});
	
	//lightbox reservation dans l'article
	SqueezeBox.assign($$('.box'),{ parse:'rel' });
	
}	


function checkForm(){
// on charge les valeurs des sélect
	$$('select').each(function(el){
		val = $(el).getAttribute('title')!=''?$(el).getAttribute('title'):$(el).getAttribute('value');
		$(el).getElements('option').each(function(op){
			if(val && $(op).getAttribute('value')==val){
				$(op).set('selected', 'selected');
			}
		})
	});
	// on charge les valeurs des boutons modifier
	$$('input[type=checkbox], input[type=radio]').each(function(el){
		if($(el).getAttribute('value')==$(el).getAttribute('check_value')){
			$(el).setAttribute('checked', 'checked');
		}
	});	
}


function sel(date){ 
	$('dateChange').set('html',date);
	$('datedebcentrale').set('value',date);
	return false;
}





