Improve onchange trigger in tmplvars.inc.php