/* Functions used in every page for text size/colour switching
 *
 * 16-Aug-2005 [Mike Ford] Extract into separate file 
 */

function emit_custom_css_links() {
  // if init_custom() function has not been defined (which must mean JavaScript <1.3),
  // define a null function
  if (!init_customize) init_customize = function() {};

  // initialize with defaults
  var size = 'standard';
  var colour = '1';

  // if required features detected, substitute cookie values (if any)
  if (_js_1_3 && _cookies) {
    if (lssSettings.size) size = lssSettings.size;
	if (lssSettings.colour) colour = lssSettings.colour;
  }

  // and output stylesheet links (must be absolute as this file is also loaded from pages on port :8082)
  document.writeln('<link rel="stylesheet" href="http://'+location.hostname+'/lis/lss/css/text-size-'+size+'.css" type="text/css" id="css-text-size" />');
  document.writeln('<link rel="stylesheet" href="http://'+location.hostname+'/lis/lss/css/text-colour-'+colour+'.css" type="text/css" id="css-text-colour" />');
  }
