added chkElementIdValidity to common.js