﻿function alpha(co){
    var mark=100;
	var id;
	var id2;
	
	function AlfaColor()
	{
		mark+=5;
		co.style.filter='alpha(opacity='+mark+')';
		co.style.MozOpacity=(mark/100);
		if(mark==100) clearInterval(id2);
	}
	
	function AlfaBialy()
	{
		mark-=5;
		co.style.filter='alpha(opacity='+mark+')';
		co.style.MozOpacity=(mark/100);
			if(mark==0) 
			{
				clearInterval(id);
				id2=setInterval(AlfaColor,1);				
			}
	}
	id=setInterval(AlfaBialy,1);	
}
