var num_menu = 3;
//ironframboise.js by 33xiT, 10/23/2007

/**
*	loadSubMenu
*	@desc		This function shows IronFramboise top sub menus
*	@author		33xiT <admin@33xiT.fr>
*	@copyright	(c) Copyright 2008 33xiT. All Rights Reserved.
*	@version	1.0
*	@uses		void loadSubMenu(void);
*/
function loadSubMenu(menu_name) {
	for (var i=0; i<num_menu; i++) {
		document.getElementById('submenu_'+i).style.display="none";
	}
	document.getElementById(menu_name).style.display="block";
}

window.addEvents({
	'domready':function() {
		/**
		* SmoothScroll implementation
		*/
		
		new SmoothScroll({duration: 800});
		
		/**
		* Submenu slide effet implementation
		*/
		
		var subSlide = new Fx.Slide('submenu', {duration: 400}).hide();
		for (var i=0; i<num_menu; i++) {
			$('sub'+i).addEvent('click', function(e) {
				e = new Event(e);
				subSlide.slideIn();
				e.stop();
			});
		}
		
		/**
		* Footer menu slide effect implementation
		*/
		
		var slideFMenu = new Fx.Slide('fmenu').hide();
		$('dpfmenu').addEvent('click', function(e) {
			e = new Event(e);
			slideFMenu.toggle();
			e.stop();
		});	
	}
});

/**
*	iClear
*	@desc		This function compares the value of an object form with a default value previously declared
*	@author		33xiT <admin@33xit.fr>
*	@copyright	(c) Copyright 2007 33xiT. All Rights Reserved.
*	@version	1.0
*	@uses		void iClear(string thisinput, string thisvalue);
*	@param		string thisinput	The form object id (if it is for the current object, use "this.id")
*	@param		string thisvalue	The form object default value
*/
function iClear(thisinput, thisvalue) {
	var i = document.getElementById(thisinput);
	i.value == thisvalue ? i.value = null : null;
}

/**
*	accessStyle
*	@desc		This function switchs style sheets according to the accessibility mod is called
*	@author		33xiT <admin@33xit.fr>
*	@copyright	(c) Copyright 2008 33xiT. All Rights Reserved.
*	@version	1.0
*	@uses		void accessStyle(void);
*/

function accessStyle() {
	var link = document.getElementById('jsAmod').value;
	if(getActiveStyleSheet() == 'Default') {
		applyCSS('AccessMod');
	} else {
		applyCSS('Default');
	}
}
