var tabs=new Array('services','solutions','news');
var tabs_tit=new Array;
var tabs_block=new Array;
for(i=0; i<tabs.length; i++)
{
	tabs_tit[i]=tabs[i]+'_tit';
	tabs_block[i]=tabs[i]+'_block';
}

function indextabs(){
	for(i=0; i<tabs_tit.length; i++)
	{
		document.getElementById(tabs_tit[i]).onclick=function()
		{
			for(l=0; l<tabs.length; l++)
			{
				if(this.id==tabs[l]+'_tit'){k=l;}				
			}
			for(l=0; l<tabs.length; l++)
			{
				if(l==k) 
				{
					if(document.getElementById(tabs_block[l]).style.display=='none'){document.getElementById(tabs_block[l]).style.display='block';}
					else{document.getElementById(tabs_block[l]).style.display='none';}
				}
				else {document.getElementById(tabs_block[l]).style.display='none';}
			}			
		}
	}
}
	if (window.addEventListener)
	window.addEventListener("load", indextabs, false)
	else if (window.attachEvent)
	window.attachEvent("onload", indextabs)