/*
* Fadeid Fadeout functions>>>>
*/
var fade = { // Namespace
	ids	: {},
	step	: 0.05,
	delay	: 20, // ms
	timer	: null,
	setOpacity : function(elem, nOpacity) {
		if (typeof elem == 'string') elem = document.getElementById(elem);
		var props = ['MozOpacity', 'KhtmlOpacity', 'opacity'];
		for (var i in props) {
			if (typeof elem.style[props[i]] == 'string') {
				elem.style[props[i]] = nOpacity;
				return;
			}
		}
		// IE 6+
		try {
			nOpacity = 100 * parseFloat(nOpacity);
			if ((oAlpha = elem.filters['DXImageTransform.Microsoft.alpha'] || elem.filters.alpha)) oAlpha.opacity = nOpacity;
			else elem.style.filter += "progid:DXImageTransform.Microsoft.Alpha(opacity="+nOpacity+");";
		} catch (e) {
			// IE <= 5.5 OR Opera < 9 OR another browser. Do nothing
		}
	},
	_out : function(id, from, to, callback) {
		from -= this.step;
		from = from <= to ? to : from;
		if (this.doit(id, from, to, callback)) 
			this.timer = setTimeout("fade._out('"+id+"', "+from+", "+to+", '"+(callback ? callback : '')+"')", this.delay);
	},
	_in : function(id, from, to, callback) {
		from += this.step;
		from = from >= to ? to : from;
		if (this.doit(id, from, to, callback)) 
			this.timer = setTimeout("fade._in('"+id+"', "+from+", "+to+", '"+(callback ? callback : '')+"')", this.delay);
	},
	doit : function(id, from, to, callback) {
		this.setOpacity(id, from);
		clearTimeout(this.timer);
		if (from == to) {
			if (callback) eval(callback+'()');
		} else return true;
	}
}
	// Колбэки
	function clearInvite()
	{
		var friend_id = getValue('_inviteclicked');
		var el = document.getElementById('container_invite_' + friend_id);
		//el.style.display = 'none';
		hide('td_invite_' + friend_id);
		//alert(friend_id);
	}
	/*
	function stopHide() {
		var button = document.getElementById('buttonId');
		document.getElementById('buttonId').value = "Вернуть лого фасткодера";
		button.onclick = function() {
			fade._in('imgId', 0, 1, 'showHide');
		}
	}
	
	function showHide() {
		var button = document.getElementById('buttonId');
		document.getElementById('buttonId').value = "Убрать лого фасткодера";
		button.onclick = function() {
			fade._out('imgId', 1, 0, 'stopHide');
		}
	}
	*/
/*
* Fadeid Fadeout functions<<<<
*/