// here we will store GET params var _GET = {} /** * here we grab GET parameters and store em in assoc array _GET * sub-arrays akaare supported * ?param=value&compex_param[key1]=val1&complex_param[key2]=val2 * will be translated to assoc array * _GET = { * param : 'value', * Q complex_param : { * key1 : val1, * key2 : val2 * } * } */ var query=this.location.search.substring(1); if (query.length > 0){ var params=query.split("&") for (var i=0 ; iff_printError("testField") * if this error is not available in GET - does nothing * if "message" specified will print a custom error message * @param name String The name of the error field. * @param message String A message to display if an error is set * @return String */ function ff_printError(err_name, message){ if (_GET['_errors'] && _GET['_errors'][err_name]) if (message) document.write(message) else document.write(_GET['_errors'][err_name]) }