<!--
var PcjsDestObject;
var PcjsDestProperty;

function PcjsColorChooser(destobject, destproperty)
{
  PcjsDestObject = destobject;
  if (destproperty == "")
    PcjsDestProperty = "value";
  else
    PcjsDestProperty = destproperty;

  eval("PcjsInternalSelectColor(PcjsDestObject."+PcjsDestProperty+")");

  var obj = document.all['PcjsPopup'];

  obj.style.left = document.body.scrollLeft+event.clientX;
  obj.style.top  = document.body.scrollTop+event.clientY;

  obj.style.visibility = "visible";
}

function PcjsInternalClosePopup()
{
  var obj = document.all['PcjsPopup'];

  obj.style.visibility = "hidden";
}

function PcjsInternalSelectClose()
{
  var obj = document.all['PcjsPopup'];

  PcjsDestObject.value = document.forms.pcjsform.color.value;

  eval("PcjsDestObject."+PcjsDestProperty+" = document.forms.pcjsform.color.value");

  obj.style.visibility = "hidden";
}

function PcjsInternalSelectColor(color)
{
  // ----- Paste the color value
  document.forms.pcjsform.color.value = color;

  // ----- Change the color viewer
  document.all.pcjscell.bgColor = color;
}

function PcjsGeneratePopup()
{
  document.write("<div id=PcjsPopup style='position:absolute; left:118px; top:214px; width:212px; height:112px; z-index:1; visibility:hidden; background-color: #FFFFFF; layer-background-color: #FFFFFF; border: 1px none #000000'>");
  document.write("<table width=100% border=0 cellspacing=0 bgcolor=D2D7DE>");
  document.write("<tr><td height=13 width=5></td><td height=13>");
  document.write("<div align=right><font face='Verdana, Arial, Helvetica, sans-serif' color=#FFFFFF size=2><b><a onClick='PcjsInternalClosePopup()'>x</a></b></font></div>");
  document.write("</td><td height=13 width=5> </td></tr>");
  document.write("<tr> <td height=71 width=5></td><td height=71 bgcolor=#FFFFFF>");
  document.write("<form name=pcjsform method=post>");
  document.write("<table border=1 cellspacing=0 align=center bordercolor=#FFFFFF>");
  document.write("<tr><td align=center colspan=18><font face='Verdana, Arial, Helvetica, sans-serif' color=#0000CC size=3><b>Selecciona color:</b></font><br>");
  document.write("</td></tr>");

  for (i=0;i<6;i++)
  {
    document.write("<tr>");
    if (i==0) v_color_i="00";
    if (i==1) v_color_i="33";
    if (i==2) v_color_i="66";
    if (i==3) v_color_i="99";
    if (i==4) v_color_i="CC";
    if (i==5) v_color_i="FF";
    for (j=0;j<6;j++)
    {
      if (j==0) v_color_j="00";
      if (j==1) v_color_j="33";
      if (j==2) v_color_j="66";
      if (j==3) {v_color_j="99"; document.write("<tr>");}
      if (j==4) v_color_j="CC";
      if (j==5) v_color_j="FF";
      for (k=0;k<6;k++)
      {
        if (k==0) v_color_k="00";
        if (k==1) v_color_k="33";
        if (k==2) v_color_k="66";
        if (k==3) v_color_k="99";
        if (k==4) v_color_k="CC";
        if (k==5) v_color_k="FF";
        document.write("<td bgcolor=#"+v_color_i+v_color_j+v_color_k+" onClick=PcjsInternalSelectColor('#"+v_color_i+v_color_j+v_color_k+"') width=10 height=10></td>");
      }
      if (j==5) {v_color_j="99"; document.write("<tr>");}
    }
    document.write("</tr>");
  }

  document.write("<tr><td colspan=18></td><td>");
  document.write("<tr><td colspan=3></td>");
  document.write("<td bgcolor=#000000 onClick=PcjsInternalSelectColor('#000000') width=10 height=10></td>");
  document.write("<td bgcolor=#333333 onClick=PcjsInternalSelectColor('#333333') width=10 height=10></td>");
  document.write("<td bgcolor=#666666 onClick=PcjsInternalSelectColor('#666666') width=10 height=10></td>");
  document.write("<td bgcolor=#999999 onClick=PcjsInternalSelectColor('#999999') width=10 height=10></td>");
  document.write("<td bgcolor=#CCCCCC onClick=PcjsInternalSelectColor('#CCCCCC') width=10 height=10></td>");
  document.write("<td bgcolor=#FFFFFF onClick=PcjsInternalSelectColor('#FFFFFF') width=10 height=10></td>");
  document.write("<td bgcolor=#FF0000 onClick=PcjsInternalSelectColor('#FF0000') width=10 height=10></td>");
  document.write("<td bgcolor=#00FF00 onClick=PcjsInternalSelectColor('#00FF00') width=10 height=10></td>");
  document.write("<td bgcolor=#0000FF onClick=PcjsInternalSelectColor('#0000FF') width=10 height=10></td>");
  document.write("<td bgcolor=#FFFF00 onClick=PcjsInternalSelectColor('#FFFF00') width=10 height=10></td>");
  document.write("<td bgcolor=#00FFFF onClick=PcjsInternalSelectColor('#00FFFF') width=10 height=10></td>");
  document.write("<td bgcolor=#FF00FF onClick=PcjsInternalSelectColor('#FF00FF') width=10 height=10></td>");
  document.write("<td colspan=3></td></tr>");

  document.write("<tr><td colspan=12 align=center>");
  document.write("<font face='Verdana, Arial, Helvetica, sans-serif' size=2 color=#0000CC>Color : </font>");
  document.write("<input type=text name=color size=8 maxlength=8></td>");
  document.write("<td colspan=6 align=center valign=middle> ");
  document.write("<table name=tableau border=0 cellspacing=0 align=center >");
  document.write("<tr>");
  document.write("<td id=pcjscell width=20 height=20 align=center valign=middle>&nbsp;</td>");
  document.write("</tr>");
  document.write("</table>");
  document.write("</td></tr>");
  document.write("<tr><td colspan=18 align=center>");
  document.write("<input type=button name=select value=Seleccionar onClick='PcjsInternalSelectClose()'>");
  document.write("</td></tr></table>");


  document.write("</form></td><td height=71 width=5></td></tr>");
  document.write("<tr height=5><td height=5 width=5></td><td height=5></td><td height=5 width=5></td></tr>");
  document.write("</table></div>");
}

PcjsGeneratePopup();
-->