CSubmenu = {
	
	iCurrentViewed 	: null,
	sSelectedOfNext	: null,
	lastNextSubmenu : null,
	oFullSubmenu 	: null,
	
	init : function() {
		this.hideMenu
		
		if ( this.destrictTimeout > 0 ) clearTimeout( this.destrictTimeout );
		for ( menuID in this.oFullSubmenu ) {
			if ( window.location.href.indexOf( this.oFullSubmenu[menuID].link ) != -1 ) {
				this.showArrow( menuID, 1 );
			}
			Support.gevent( $$( menuID + 'topMenuImage' ), 'mouseover', this.show.bind( $$( menuID + 'topMenuImage' ) ) );
		}
		
	},
		
	
	showArrow : function( menuID, isInit ){
		
		if ( menuID == this.iCurrentViewed ) this.iCurrentViewed = null;
		
		$$( 'topMenuArrow' + menuID ).style.display = '';
		if ( !isInit && $$( 'submenu' + menuID ) != null ) {
			$$( 'submenu' + menuID ).style.display = 'block';
		}
				
		if ( this.iCurrentViewed ) {
			$$( 'topMenuArrow' + this.iCurrentViewed ).style.display = 'none';
			if ( !isInit && $$( 'submenu' + this.iCurrentViewed ) != null ) {
				$$( 'submenu' + this.iCurrentViewed ).style.display = 'none';
			}
		}
		this.iCurrentViewed = menuID;
	},
	
	
	
	show : function() {
		iCurrent = parseInt( this.id );
		CSubmenu.showArrow( iCurrent );
	},
	
	showNext : function( iID ) {
		subNext = parseInt( iID );
		
		if ( $$( 'subNext' + CSubmenu.sSelectedOfNext ) != null ) {
			$$( 'subNext' + CSubmenu.sSelectedOfNext ).style.display = 'none';
		}
		if ( $$( 'subNext' + subNext ) != null ) {
			CSubmenu.sSelectedOfNext = subNext;
			$$( 'subNext' + subNext ).style.display = 'block';
		} else {
			CSubmenu.sSelectedOfNext= null
		}
		
	},
	
	hideNext : function( iID ) {
		
		subNext = parseInt( iID );
		if ( $$( 'subNext' + subNext )!= null && CSubmenu.lastNextSubmenu + '' != ''+subNext ) {
			$$( 'subNext' + subNext ).style.display = 'none';
		}
		CSubmenu.lastNextSubmenu = subNext;
	},
	
	hideCurrent : function() {
		if ( $$( 'topMenuArrow' + this.iCurrentViewed ) != null ){
			$$( 'topMenuArrow' + this.iCurrentViewed ).style.display = 'none';
		}
		if ( $$( 'submenu' + this.iCurrentViewed ) != null ) {
			$$( 'submenu' + this.iCurrentViewed ).style.display = 'none';
			this.iCurrentViewed = null;
			return;
		}
	}
	
}