function isSelected(pIndex, pMatchwith) {
  if (pIndex == pMatchwith) {
    return " selected ";
  } else {
    return " ";
  }
}

function generateOptionChangeStyle() {
  var theStyle = getStyle();

  document.write("<select name=\"select\" onchange=\"changeStyle(this.value)\" size=1>");
  document.write("<option" + isSelected(0, theStyle) + "value=0>none</option>");
  document.write("<option" + isSelected(1, theStyle) + "value=1>default</option>");
  document.write("<option" + isSelected(2, theStyle) + "value=2>bamboo</option>");
  document.write("</select>");
}

generateOptionChangeStyle();

