//alert(document.paths);
var t,t2,obj,op;
		var cm;		// для отображения процентов
		function appear(x)   // x - конечное значение прозрачности
		{
			obj = document.getElementById('specz');
			op = (obj.style.opacity)?parseFloat(obj.style.opacity):parseInt(obj.style.filter)/100;
			if(op < x) {
				
				clearTimeout(t2);
				op += 0.02;
				obj.style.opacity = op;
				obj.style.filter='alpha(opacity='+op*100+')';
				t=setTimeout('appear('+x+')',20);
			}
		}

		function disappear(x) {
			obj = document.getElementById('specz')
			op = (obj.style.opacity)?parseFloat(obj.style.opacity):parseInt(obj.style.filter)/100;
			if(op > x) {
				clearTimeout(t);
				op -= 0.02;
				obj.style.opacity = op;
				obj.style.filter='alpha(opacity='+op*100+')';
				t2=setTimeout('disappear('+x+')',20);
			}
			else
			{
				appear(1);
				nb = Math.floor(Math.random()*paths.length);
				document.getElementById('specimg').src = paths[nb];
				document.getElementById('newlink').href = links[nb];
				
				
			}
		}
	setInterval('disappear(0.0);', 5000); 
