function transparenter(id,start)
{ 
	dist = 0.1;
	int = 50;
	
	currO = parseFloat(id.style.opacity);
	if(currO>0)
	{	
		newO = currO-dist;
		newF = newO*100;
		id.style.opacity = newO;
		id.style.filter = 'alpha(opacity='+newF+')';
		setTimeout (function(){transparenter(id)},int);
	}
	else {
		id.style.display = 'none';
	}
}

function unTransparenter(id,start)
{ 
	dist = 0.1;
	int = 50;
	
	if(start==1){id.style.opacity = 0;}
	currO = parseFloat(id.style.opacity);
	if(currO<1)
	{	
		newO = currO+dist;
		newF = newO*100;
		id.style.opacity = newO;
		id.style.filter = 'alpha(opacity='+newF+')';
		setTimeout (function(){unTransparenter(id)},int);
	}
	else {
		id.style.display = 'block';
	}
}

function switchTab(id,id_parent)
{
	var tab = document.getElementById(id_parent).getElementsByTagName('div'); 
	for (i = 0; i < tab.length; i++) {
		if(tab[i].className=='tab') {
			if(tab[i].id!=id){
				transparenter(tab[i],1); 
			}
		}
	}
	unTransparenter(document.getElementById(id),1);
}