function SlideShow()
{
/*HTMLElement*/
var list = [];
/*HTMLElement*/
var slides = [];
/*HTMLElement*/
var tabs = [];
/*int*/
var tabIndex = 0;
/*int*/
var slideTime = 3000;
/*timer*/
var t;

	this.mount = function( id, ns )
	{
	var t = document.getElementById(id);
	getElementsList( ns, t );
	
	slides = getList(ns, 'slide');
	tabs = getList(ns, 'tab');
	
		if( slides.length < 1 && tabs.length < 1 )
		alert('null');
		
		for( var i = 0, l = tabs.length; i < l; i++ )
		{
		tabs[i].onmouseover = onOver;
		tabs[i].onmouseout = onOut;
		}
		
	//t = setTimeout( rotate, slideTime);
	}
	
	function onOver()
	{
	clearTimeout(t);
		for( var i = 0, l = tabs.length; i < l; i++ )
		{
		tabs[i].className = 'tab';
		slides[i].style.display = 'none';
		}
		
	this.className = 'active';
		for( var i = 0, l = tabs.length; i < l; i++ )
			if( tabs[i].className == 'active' )
			{
			tabIndex = i;
			break;
			}
	slides[tabIndex].style.display = 'block';
	}
	
	function onOut()
	{
	//t = setTimeout( rotate, (slideTime*3));
	}
	
	function rotate()
	{
		for( var i = 0, l = tabs.length; i < l; i++ )
		{
		tabs[i].className = 'tab';
		slides[i].style.display = 'none';
		}
	
	tabIndex = (tabIndex+1)%tabs.length;
	tabs[tabIndex].className = 'active';
	slides[tabIndex].style.display = 'block';		
	clearTimeout(t);
	t = setTimeout( rotate, slideTime);
	}

	function getElementsList( ns, target )
	{
		if( target.nodeType != 1 )
		return;
		
	var c = target.childNodes;
		if( c.length > 0 )
			for( var i = 0, l = c.length; i < l; i++ )
				if( c[i].nodeType == 1 )
				{
					if( c[i].getAttribute(ns + ':elem') != null )
					list[list.length] = c[i];
					else
					getElementsList( ns, c[i] );
				}
	}
	
	function getList( ns, n )
	{
	var c = [];
		if( list.length > 0 )
			for( var i = 0, l = list.length; i < l; i++ )
				if( list[i].getAttribute(ns + ':elem') == n )
				c[c.length] = list[i];
	return c;
	}
}

function hideMenu( )
{
var childs = [];
var anhors = [];
var drops = [];
var isShown = true;
var shown = [];
var index = 0;

	this.mount = function( id )
	{
	var cont = document.getElementById( id );
	childs = cont.childNodes;
		for( var i = 0; i < childs.length ; i++ )
		{
			if( childs[i].tagName == 'LI' )
			{
			anhors[anhors.length] = childs[i];	
			anhors[anhors.length-1].oldClass = anhors[anhors.length-1].className;
			}
		}
		for( var i = 0; i < anhors.length ; i++ )
		{
		anhors[i].onmouseover = showBlock;
		anhors[i].onmouseout = hideBlock;
		}
	}
	
	function hideBlock()
	{
	shown[index] = false;
	setTimeout(_hideBlock, 300);
	}
	
	function _hideBlock()
	{
	if( shown[index] == false )
		for( var i = 0; i < anhors.length; i++ )
		anhors[i].className = anhors[i].oldClass;
	}
	
	function _showBlock()
	{
	shown[index] = true;
	}
	
	function showBlock()
	{
		for( var i = 0; i < anhors.length ; i++ )
		anhors[i].className = anhors[i].oldClass;

	this.className = this.className + ' current';
	
		for( var i = 0; i < anhors.length ; i++ )
		{
		var sp = anhors[i].className.split(' ');
			if( sp.length > 2 && sp[2] == 'current' )
			{
			index = i;
			break;
			}
		}
		
		for( var i = 0; i < shown.length ; i++ )
		shown[i] = false;
		
	shown[index] = true;
	}
}
