-
-function checkForJavascript($reset = FALSE)
-{
- global $data_dir, $username, $javascript_on, $javascript_setting;
-
- if ( !$reset && sqGetGlobalVar('javascript_on', $javascript_on, SQ_SESSION) )
- return $javascript_on;
-
- if ( $reset || !isset($javascript_setting) )
- $javascript_setting = getPref($data_dir, $username, 'javascript_setting', SMPREF_JS_AUTODETECT);
-
- if ( !sqGetGlobalVar('new_js_autodetect_results', $js_autodetect_results) &&
- !sqGetGlobalVar('js_autodetect_results', $js_autodetect_results) )
- $js_autodetect_results = SMPREF_JS_OFF;
-
- if ( $javascript_setting == SMPREF_JS_AUTODETECT )
- $javascript_on = $js_autodetect_results;
- else
- $javascript_on = $javascript_setting;
-
- sqsession_register($javascript_on, 'javascript_on');
- return $javascript_on;
-}
-
-?>