
function stopInterval(ival) {
	if (ival != undefined) {
		clearInterval(ival);
		ival = undefined;
	}
}
function efPicInterval(tid) {
	var tag = document.getElementById(tid);
	if (tag.efPicTotalOfs-tag.efPicOperation < -5 || tag.efPicTotalOfs-tag.efPicOperation > 0) {
		stopInterval(tag.efPicInterval);
		return;
	}
	tag.efPicTotalOfs -= tag.efPicOperation;
	//tag.style.left = tag.efPicTotalOfs + 'px';
	tag.style.top = tag.efPicTotalOfs + 'px';
	tag.width += tag.efPicOperation;
		tag.width += tag.efPicOperation;
	tag.height += tag.efPicOperation;
		tag.height += tag.efPicOperation;
}
function efPicResize(tid, op) {
	var tag = document.getElementById(tid);
	if (tag.efPicTotalOfs == undefined) tag.efPicTotalOfs = 0;
	tag.efPicOperation = op;
	stopInterval(tag.efPicInterval);
	tag.efPicInterval = setInterval('efPicInterval("' + tid + '")', 10);
}

//---------------
function efPicEmergeInterval(tid) {
	var tag = document.getElementById(tid);
	if (tag.efPicTotalOfs+tag.efPicOperation > 100 || tag.efPicTotalOfs+tag.efPicOperation < 0) {
		stopInterval(tag.efPicInterval);
		return;
	}
	tag.efPicTotalOfs += tag.efPicOperation;
	tag.style.opacity = Number(tag.efPicTotalOfs/100);
	tag.style.filter = 'alpha(opacity=' + tag.efPicTotalOfs + ')';
	//tag.style.filter = '"alpha(opacity=' + tag.efPicTotalOfs + ')"';
	//alert(tag.style.filter);
	
	/*//tag.style.left = tag.efPicTotalOfs + 'px';
	tag.style.top = tag.efPicTotalOfs + 'px';
	tag.width += tag.efPicOperation;
		tag.width += tag.efPicOperation;
	tag.height += tag.efPicOperation;
		tag.height += tag.efPicOperation;*/
}
function efPicEmerge(tid, incr) {
	//if ("\v"!="v") incr /= 100;
	var tag = document.getElementById(tid);
	//tag.style.filter = 'alpha(opacity=50)';

	//var mitem1 = document.getElementById('mitem1');
	//mitem1.style.opacity = 0;
	//mitem1.style.filter = "alpha(opacity=" + 0 + ")";
	if (tag.efPicTotalOfs == undefined) tag.efPicTotalOfs = 0;
	//alert(incr);
	tag.efPicOperation = incr;
	stopInterval(tag.efPicInterval);
	tag.efPicInterval = setInterval('efPicEmergeInterval("' + tid + '")', 20);
}

