function createOpacity(parentName, menuToCloneName)
{
	var parent = document.getElementById(parentName);
	var menu = document.getElementById(menuToCloneName);
	if(parent==null || menu==null) return;
	
	var menuClone = menu.cloneNode(true);	
	
	var menuContent = menu.getElementsByTagName('div');
	if(menuContent.length>0)
	{
		menuContent[0].style.visibility="hidden";
		menu.className+=" opacity8";
	}
	
	menuClone.style.background="none";
		
	parent.appendChild(menuClone);
}

/* REPEATER CLASS */
/* 
	Inside parent this code is searching for divs with class name >>item<<
	And then show/hide items in specific delay
*/
function repeator(itemId, delay)
	{
		this.parentNode = null;
		this.items = new Array();		
		this.delay = delay;
		this.currentItem = 0;
		this.init  = function(){
			window.customObj = this;
			
			this.parentNode = document.getElementById(itemId);
			if(this.parentNode==null) return;			
			
			for(var i=0; i<this.parentNode.childNodes.length; i++)
			{
				if(this.parentNode.childNodes[i].className=="item")
					this.items.push(this.parentNode.childNodes[i]);
			}
			this.change();
		};
		this.change = function()
		{			
			for(var i=0; i<window.customObj.items.length; i++)
			{
				window.customObj.items[i].style.display = i!=window.customObj.currentItem ? "none" : "block";
			}
			window.customObj.currentItem++;
			if(window.customObj.currentItem>=window.customObj.items.length)
				window.customObj.currentItem=0;
		};
		this.start = function()
		{			
			setInterval(this.change, this.delay);
		}		
	}
