if(!SMM) {var SMM = {};}

SMM = {
	/*handleInputsText : function(inputId){
  	if($(inputId)){
  		$(inputId).value = I18N._('inputValues', inputId);
  	}
  	
  	Event.observe(
  		$(inputId), 
  		'focus', 
  		function(){
  			if($(inputId).value==I18N._('inputValues', inputId) || $(inputId).value==''){
  				$(inputId).value='';
  			}
  		}
  	);
  	
  	Event.observe(
  		$(inputId), 
  		'blur', 
  		function(){
  			if($(inputId).value==''){
  				$(inputId).value=I18N._('inputValues', inputId);
  			}
  		}
  	);
  },*/
  attachDivPopupUpLinks : function(){
    	var popup_links = new Array();
	    //get links from main document
	    var main_document = $('content');
	    if(main_document) 
	    {
	      popup_links = $('content').select('a.divpopup');
	    }
	    popup_links.each(
	      function(element)
	      {
	        if (element!=null)
		        Event.observe(
		          element,
		          'click',
		          function(e) {
		          	Event.stop(e);
		          	DivPopup.openPopup('rates_sales_policies', 500, 400, null, element.href); }
		        );
	      }.bind(this)
	    );
    },
  
  manageNav : function(){
  	var currentPage = document.body.className;
  	if($('nav-'+currentPage)){
  		$('nav-'+currentPage).addClassName("on");
  	}
  }
	  
};

Event.observe(
	document,
	"dom:loaded",
	function(){
		SMM.manageNav();
		SMM.attachDivPopupUpLinks();
	}
);

//Highlight du sous menu
if (this.PRO && this.PRO.activateMenuItem) {
	this.PRO.activateMenuItem({'main': 'mCherchezReservez'});
}