JavaLikeCalc.JavaScript
if(f_start) {
	//Init the avialable parameters
	colors = new Array("#ae77c3", "orange", "blue", "#199696", "#3264C8", "tomato", "magenta", "#B6B600", "#69695C", "darkcyan");
	params = new Array();
	dtPeriod = 1;
	for(iP = 1; iP <= 10; iP++) {
		pO = new Object();
		pO.name = this.doc.attr("p"+iP+"name");
		pO.var = this.doc.attr("p"+iP+"var");
		pO.ed = this.doc.attr("p"+iP+"ed");
		if(pO.ed.isEVal())	pO.ed = "";
		pO.prec = this.doc.attr("p"+iP+"prec");
		pO.min = this.doc.attr("p"+iP+"min");
		pO.max = this.doc.attr("p"+iP+"max");
		pO.color = colors[iP-1];
		if(pO.prec.isEVal())	pO.prec = 0;
		if(!pO.name.isEVal() && pO.name.length && !pO.var.isEVal() && (aO=SYS.nodeAt(pO.var).arch())) {
			params.push(pO);
			dtPeriod = max(dtPeriod, ceil(1e-6*aO.period()));
		}
	}
	doc_tmpl = doc_tmpl.replace("@@valPer@@", dtPeriod.toString());
	this.doc.attrSet("params", params);

	doc_doc = ""; doc_time = SYS.time(); doc_bTime = doc_time-120;

	cnt = 0;
	toCalcCycles = cnt_ = max(3, 2000/this.ownerSess().period());
}
cnt++;
if(cnt == cnt_ && !this.attr("pgNoOpenProc"))	event = "ws_FocusIn:/doc";

if(f_stop)	return;

//Updating cycles processing for big processing periods of that page 
if(toCalcCycles > 0.1) {
	this.attrSet("event", this.attr("event")+"usr_calc\n");	//!!!! Just to calc in the next session cycle for update
	toCalcCycles = max(0, toCalcCycles-1);
}