/** * defaultHints v0.3 * Date: 2010-09-15 11:00:00 * * function setDefaultHints([[elementId, elementHint, showAsterisk], ...]) * * Example of using setDefaultHints in JavaScript * var defvalues = [ * ['name', 'Your Name:', true], * ['email', 'Your Email:', false], * ['comment', 'Your Comment:', true] * ]; * setDefaultHints(defvalues); * * Example of using setDefaultHints in QSF2 * $params = array( * array('name', 'Name:', true), * array('emailOrPhone', 'Email:', false), * array('comments', 'Your Message:', true), * ); * $this->doc->addScript('js/app/defaultHints'); * $this->doc->addInitFunction('setDefaultHints', array($params)); */ function setDefaultHints(elements) { if (typeof elements == 'object' && elements != null) { len = elements.length; for (i=0; i