function get_element(name) {if(!document.all) {var obj=document.getElementById(name);} else {eval('var obj=document.all.'+name+';');}return obj;} 

fade_timer=null;

act_fld_id=-1;
next_act_fld_id=0;

function _colorfadein_(obj,color) {
	obj.style.color="rgb(255,"+color+","+color+")";
	color-=2;
	if(color>2) {
		fade_timer=setTimeout("_colorfadein_(obj,"+color+")",1);
	} else {
		obj.style.display="none";
		fade_timer=setTimeout("colorfadeout('fld"+next_act_fld_id+"')",1);
	}
}

function colorfadein(obj_id) {
	obj=get_element(obj_id);
	_colorfadein_(obj,255);
}

function _colorfadeout_(obj,color) {
	obj.style.color="rgb(255,"+color+","+color+")";
	color+=2;
	if(color<255) {
		fade_timer=setTimeout("_colorfadeout_(obj,"+color+")",1);
	} else {
		next_act_fld_id++;
		if(next_act_fld_id==fade_texts.length) next_act_fld_id=0;
	
		act_fld_id++;
		if(act_fld_id==fade_texts.length) act_fld_id=0;
		
		fade_timer=setTimeout("colorfadein('fld"+act_fld_id+"')",fade_texts[next_act_fld_id][2]);
	}
}

function colorfadeout(obj_id) {
	obj=get_element(obj_id);
	obj.style.display="block";
	_colorfadeout_(obj,2);
}

function show_fade_texts() {
	for(c=0;c<fade_texts.length;c++) {
		document.write('<a href="'+fade_texts[c][1]+'" style="color:rgb(200,200,200);display:none;" id="fld'+c+'"><b>+++</b> '+fade_texts[c][0]+' <b>+++</b></a>');
	}
}

function fade_text_start() {
	colorfadein("fld0");
}

