<!--
prefs = new cookieObject("svppcprefs", 366, "/", "Style", "FontSize", "PreviewFontSize");

var sitestyle = '-';
var stylesheet = 'svppc-classic.css';
var sitefontsize = '-';
var fontsizeindex = 0;

function styleString() {
  if (prefs.found)
     sitestyle = prefs.get("Style");

  switch (sitestyle) {
// Classic
  case '0':
  default:
    stylesheet = 'svppc-classic.css';
    break;
// Cool
  case '1':
    stylesheet = 'svppc-cool.css';
    break;
// Clean
  case '2':
    stylesheet = 'svppc-clean.css';
    break;
  } // switch    

  return stylesheet;
} // End styleString function

function writeFontInfo(preview) {
  if (prefs.found)
     if (preview)
        sitefontsize = prefs.get("PreviewFontSize");
     else
        sitefontsize = prefs.get("FontSize");

//  alert("In writeFontInfo, preview = " + preview + " sitefontsize = " + sitefontsize);
  if (sitefontsize == '-')
     sitefontsize = '0';

  switch (sitefontsize) {
  case '0':
  default:
    fontsize = 0;
    break;
  case '1':
    fontsize = 8;
    break;
  case '2':
    fontsize = 9;
    break;
  case '3':
    fontsize = 10;
    break;
  case '4':
    fontsize = 12;
    break;
  case '5':
    fontsize = 14;
    break;
  case '6':
    fontsize = 16;
    break;
  case '7':
    fontsize = 18;
    break;
  case '8':
    fontsize = 20;
    break;
  case '9':
    fontsize = 22;
    break;
  case '10':
    fontsize = 24;
    break;
  } // switch    

  // If something other than the browser default is wanted, use it
  if (fontsize > 0) {
     stylestart = '<STYLE TYPE="text/css">';
     stylefontsize = '  font-size: ' + fontsize + 'pt;';
     styleend = '</STYLE>';

     document.writeln(stylestart);
     document.writeln('<!--');
     document.writeln('BODY, TD, SELECT, INPUT');
     document.writeln('{');
     document.writeln(stylefontsize);
     document.writeln('}');
     document.writeln('-->');
     document.writeln(styleend);
  } // if (fontsize != 0)
} // End writeFontInfo function

function writeTheme(prefix) {
  stylesheetstart = '<LINK REL="STYLESHEET" TYPE="text/css" HREF="';
  stylesheetend = '">';

  stylesheet = styleString();
//  alert("In writeTheme, prefix = " + prefix + " stylesheet = " + stylesheet);

  if (prefix != null)
     stylesheet = prefix + stylesheet;

  document.writeln(stylesheetstart + stylesheet + stylesheetend);
} // End writeTheme function

function writeStyle(prefix) {
  writeTheme(prefix);
  writeFontInfo(0);
} // End writeStyle function

function writeInput() {
  inputstart = '<INPUT TYPE="hidden" NAME="Style" VALUE="';
  inputend = '">';

  document.writeln(inputstart + styleString() + inputend);
} // End writeInput function

function testStyle() {
  document.writeln('<P><B>Checking script</B>');
  document.writeln('<P>Style cookie = ' + sitestyle + ' Stylesheet = ' + stylesheet);
  document.writeln('<P>Font size cookie = ' + sitefontsize + ' Font size index = ' + fontsizeindex + ' Font size = ' + fontsize);
} // End testStyle function

function displaySearchImage() {
  if (prefs.found)
     sitestyle = prefs.get("Style");

  imagestart = '<IMG SRC="http://www.google.com/logos/Logo_40';
  imageend = '.gif" border=0 ALT=Google align=middle>';

  switch (sitestyle) {
// Classic
  case '0':
  default:
    imagecolor = 'gry';
    break;
// Cool
  case '1':
    imagecolor = 'blk';
    break;
// Clean
  case '2':
    imagecolor = 'wht';
    break;
  }

  document.writeln(imagestart + imagecolor + imageend);
} // End displaySearchImage function

function setSearchStyle() {
  if (prefs.found)
     sitestyle = prefs.get("Style");

  searchstylestart = '<INPUT type=hidden name=cof VALUE="';
  searchstyleend = 'AWFID:694d7d8f83fde99d;">';

//  1. GALT = Alt Text Color
//  2. S= Site URL
//  3. GL = Google Logo Box?
//  4. VLC = Visited Link Color
//  5. AH = Logo Alignment
//  6. BGC = Background Color
//  7. LH = Logo Height
//  8. LC = Link Color
//  9. GFONT = Faint Text Color
// 10. AH = Logo Alignment
// 11. L = Logo URL
// 12. ALC = Active Link Color
// 13. BIMG = Background URL
// 14. LW = Logo Width
// 15. T = Text Color
// 16. GIMP = Important Text Color
// 17. AWFID = Affiliate ID?

  switch (sitestyle) {
// Classic
  case '0':
  default:
    searchstyle = 'GALT:#404040;S:http://www.svpocketpc.com;GL:1;VLC:#800080;AH:center;BGC:gray;LH:240;LC:#0000FF;GFNT:#000080;L:http://root.svpocketpc.com/svppc-logo.jpg;ALC:#FF0000;BIMG:http://root.svpocketpc.com/svppc-bkgd.gif;LW:320;T:#000000;GIMP:#FFFFFF;';
    break;
// Cool
  case '1':
    searchstyle = 'GALT:#FFFFFF;S:http://www.svpocketpc.com;GL:2;VLC:#C0C000;AH:center;BGC:black;LH:240;LC:#D0D000;GFNT:#A0A000;L:http://root.svpocketpc.com/svppc-logo.jpg;ALC:#FFFF00;BIMG:http://root.svpocketpc.com/svppc-bkgd-inv.gif;LW:320;T:#FFFF00;GIMP:#0000FF;';
    break;
// Clean
  case '2':
    searchstyle = 'GALT:#404040;S:http://www.svpocketpc.com;GL:0;VLC:#800080;AH:center;BGC:white;LH:240;LC:#0000FF;GFNT:#000080;L:http://root.svpocketpc.com/svppc-logo.jpg;ALC:#FF0000;LW:320;T:#000000;GIMP:#FF0000;';
    break;
  }

  document.writeln(searchstylestart + searchstyle + searchstyleend);
} // End setSearchStyle function

// -->