JavaLikeCalc.JavaScript
if(!pDscr.isEVal())
	tipTool = pDscr + ((!pErr.isEVal()&&pErr.toInt())?"\n"+tr("Error")+": "+pErr:"");
name_text = pName.isEVal() ? tr("No data") : pName;
val_arg0val = pVal;
val_font = "Arial 24 1 0 0 0";
if(!pPrec.isEVal()) val_arg0cfg = ((pPrec>=0)?";f;":";g;")+abs(pPrec);
if(pVal.isEVal()) {
	val_color = name_color = "grey";
	val_font = "Arial 24 0 1 0 1";
	alarm = "";
	pErrCode = 0;
	bordColor = "grey", bordWidth = 1;
	return;
}

//Notification create
if(!pErr.isEVal() && pErrCode != pErr) {
	pErrCode = pErr;
	alTp = (!spName.isEVal() && spName.length) ? 7 : 3;
	if(pErrCode == 1 || pErrCode == 2)	alarm = (redEVAL == true) ? "100|"+pName+"|"+spName+" - "+tr("reject")+".|7" : "100|"+pName+"||1";
	else if(pErrCode == 3)	alarm = "50|"+pName+"|"+spName+" "+tr("above alarm border")+".|"+alTp;
	else if(pErrCode == 4)	alarm = "50|"+pName+"|"+spName+" "+tr("bellow alarm border")+".|"+alTp;
	else if(pErrCode == 5)	alarm = "10|"+pName+"|"+spName+" "+tr("above warning border")+".|"+alTp;
	else if(pErrCode == 6)	alarm = "10|"+pName+"|"+spName+" "+tr("bellow warning border")+".|"+alTp;
	else if(pErrCode == 10) alarm = "10|"+pName+"|"+pErr.parse(1,":")+".|"+alTp;
	else if(pErrCode == 11) alarm = "50|"+pName+"|"+pErr.parse(1,":")+".|"+alTp;
	else if(alarmSt&0x100)	alarm = "1|"+pName+"||1";
}
if(!pErrCode && alarmSt&0x100 && !(alarmSt&0x10000)) alarm = "";

//Notification color change
alarmLev = alarmSt&0xFF;
if(alarmLev && alarmSt&0x100) {
	blinkPr = true;
	if(!pErrCode || alarmLev <= 1)	wColor = labColorGood;
	else if(alarmLev < 30)	wColor = labColorWarning;
	else if(alarmLev < 75)	wColor = labColorAlarm;
	else { wColor = "grey"; blinkPr = false; }
	if(blinkPr) name_color = val_color = (alarmSt&0x10000 && name_color == wColor) ? "grey" : wColor;
	else { 
		if(pErrCode == 1 || pErrCode == 2)	{ val_color = wColor; val_font = "Arial 24 0 1 0 1"; name_color = (redEVAL==true) ? labColorAlarm : wColor; }
		else name_color = val_color = wColor;
	}
}
else name_color = val_color = labColorGood;

//Blink focused or linked with ElCadr
if(this.attr("focus") ||
	(!pName.isEVal() && pName.length && this.wdgAt("/s/pg_control/pg_ElCadr",true).attr("pgOpen") && this.wdgAt("/s/pg_control/pg_ElCadr",true).attr("prmShifr") == pName))
{
  bordColor = (bordColor == "silver") ? "grey" : "silver";
  bordWidth = 2;
}
else { bordColor = "grey"; bordWidth = 1; }

//Check the regulator mode
if(pModeC == true) mode_text = tr("C");
else mode_text = pModeA.isEVal() ? "" : ((pModeA) ? tr("A") : tr("M"));