function element_dim_down(element_id, property, timeout, steps, r, g, b, rd, gd, bd, call_back) {
	element_change_property_color(document.getElementById(element_id), property, r, g, b);
	r += rd; g += gd; b += bd;
	if (steps-- > 0) {
		setTimeout(
			"element_dim_down('" 
				+ element_id + "', '" 
				+ property + "', " 
				+ timeout + ", " 
				+ steps + ", "
				+ r + ", "
				+ g + ", "
				+ b + ", "
				+ rd + ", "
				+ gd + ", "
				+ bd + ", '"
				+ call_back + "');",
			timeout
		)
	}
	else {
		setTimeout(call_back, timeout);
	}
} 

function element_change_property_color(element, property, r, g, b) {
	if (!element) return;
	var style = element.style;
	var color = "rgb(" + r + ", " + g + ", " + b + ")";
	switch (property) {
		case 'text' 	: style.color = color; 			break; 
		case 'border' 	: style.borderColor = color; 	break; 
	}
}


function content_copy_typing(src_id, dst_id, call_back, timeout, i) {
	var src = document.getElementById(src_id);
	var dst = document.getElementById(dst_id);
	if (src && dst) {
		if (!i) i = 0;
		dst.innerHTML = dst.innerHTML + src.innerHTML.charAt(i++);
		if (i >= src.innerHTML.length) i = 0;
		if (i > 0) {
			setTimeout(
				"content_copy_typing('"
					+ src_id + "', '"
					+ dst_id + "', '"
					+ call_back + "', "
					+ timeout + ", "
					+ i
					+ ");",
				timeout
			);
		}
		else {
			setTimeout(call_back, timeout);
		}
	}
}

