Location: PHPKode > projects > Content*Builder > contentbuilder/plugins/article2/editor_v2/selcolor.htm
<HTML>
<HEAD>
<!--
Pass a argument to this window from Contentbilder now
hide@address.com

//

This dialog box was created by Jonathan Snook.
http://www.snook.ca/

Description:
This is a colour picker dialog box created for use within the DHTML
Editing Component but could theoretically be used with anything.

It has been designed for use in Internet Explorer using the showModalDialog
function and the code is provided as-is. If your machine blows up after
using this code, chances are it wasn't my code. :)

This code is based on the selcolor dialog box that comes with the DEC
Samples from Microsoft.

-->
<TITLE>Select Color</TITLE>

<STYLE TYPE="text/css">
 .selcolor  {cursor:hand}
 TD     {height:15px; width:15px;}
</STYLE>

<SCRIPT LANGUAGE=JavaScript FOR=window EVENT=onload>
  for ( elem in window.dialogArguments )
  {
    switch( elem )
    {
    case "Color":
      selcolor.value = window.dialogArguments["Color"];
      break;
    }
  }
</SCRIPT>

<SCRIPT LANGUAGE=JavaScript FOR=ColorTable EVENT=onclick>
  selhicolor.style.backgroundColor = event.srcElement.title;
  //selhicolortext.innerText = event.srcElement.title;
  selcolor.value = event.srcElement.title;
</SCRIPT>

<SCRIPT LANGUAGE=JavaScript FOR=ColorTable EVENT=onmouseover>
  hicolortext.innerText = event.srcElement.title;
  hicolor.style.backgroundColor = event.srcElement.title;
</SCRIPT>
<SCRIPT LANGUAGE=JavaScript FOR=ColorTable EVENT=onmouseout>
  hicolortext.innerText = "";
  hicolor.style.backgroundColor = "";
</SCRIPT>
<SCRIPT LANGUAGE=JavaScript FOR=btnOK EVENT=onclick>
  window.returnValue = selcolor.value;
  window.close();
</SCRIPT>
<SCRIPT LANGUAGE=JavaScript FOR=btnClear EVENT=onclick>
  selhicolor.style.backgroundColor = '';
  //selhicolortext.innerText='';
  selcolor.value='';
</SCRIPT>
<SCRIPT LANGUAGE=JavaScript FOR=selcolor EVENT=onpropertychange>
  try{selhicolor.style.backgroundColor = selcolor.value;}
  catch(e) {}
</SCRIPT>

</HEAD>
<BODY bgcolor="ThreeDFace" leftmargin="7" topmargin="7">
<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr><td VALIGN="top" align="left" nowrap style="font-family:Arial; font-size:11px;">
<TABLE ID=ColorTable BORDER=0 CELLSPACING=0 CELLPADDING=0 width="270" class="selcolor">
<tr>
<TD BGCOLOR=#000000 TITLE=#000000></td>
<TD BGCOLOR=#003300 TITLE=#003300></td>
<TD BGCOLOR=#006600 TITLE=#006600></td>
<TD BGCOLOR=#009900 TITLE=#009900></td>
<TD BGCOLOR=#00CC00 TITLE=#00CC00></td>
<TD BGCOLOR=#00FF00 TITLE=#00FF00></td>
<TD BGCOLOR=#330000 TITLE=#330000></td>
<TD BGCOLOR=#333300 TITLE=#333300></td>
<TD BGCOLOR=#336600 TITLE=#336600></td>
<TD BGCOLOR=#339900 TITLE=#339900></td>
<TD BGCOLOR=#33CC00 TITLE=#33CC00></td>
<TD BGCOLOR=#33FF00 TITLE=#33FF00></td>
<TD BGCOLOR=#660000 TITLE=#660000></td>
<TD BGCOLOR=#663300 TITLE=#663300></td>
<TD BGCOLOR=#666600 TITLE=#666600></td>
<TD BGCOLOR=#669900 TITLE=#669900></td>
<TD BGCOLOR=#66CC00 TITLE=#66CC00></td>
<TD BGCOLOR=#66FF00 TITLE=#66FF00></td>
</tr>
<tr>
<TD BGCOLOR=#000033 TITLE=#000033></td>
<TD BGCOLOR=#003333 TITLE=#003333></td>
<TD BGCOLOR=#006633 TITLE=#006633></td>
<TD BGCOLOR=#009933 TITLE=#009933></td>
<TD BGCOLOR=#00CC33 TITLE=#00CC33></td>
<TD BGCOLOR=#00FF33 TITLE=#00FF33></td>
<TD BGCOLOR=#330033 TITLE=#330033></td>
<TD BGCOLOR=#333333 TITLE=#333333></td>
<TD BGCOLOR=#336633 TITLE=#336633></td>
<TD BGCOLOR=#339933 TITLE=#339933></td>
<TD BGCOLOR=#33CC33 TITLE=#33CC33></td>
<TD BGCOLOR=#33FF33 TITLE=#33FF33></td>
<TD BGCOLOR=#660033 TITLE=#660033></td>
<TD BGCOLOR=#663333 TITLE=#663333></td>
<TD BGCOLOR=#666633 TITLE=#666633></td>
<TD BGCOLOR=#669933 TITLE=#669933></td>
<TD BGCOLOR=#66CC33 TITLE=#66CC33></td>
<TD BGCOLOR=#66FF33 TITLE=#66FF33></td>
</tr>
<tr>
<TD BGCOLOR=#000066 TITLE=#000066></td>
<TD BGCOLOR=#003366 TITLE=#003366></td>
<TD BGCOLOR=#006666 TITLE=#006666></td>
<TD BGCOLOR=#009966 TITLE=#009966></td>
<TD BGCOLOR=#00CC66 TITLE=#00CC66></td>
<TD BGCOLOR=#00FF66 TITLE=#00FF66></td>
<TD BGCOLOR=#330066 TITLE=#330066></td>
<TD BGCOLOR=#333366 TITLE=#333366></td>
<TD BGCOLOR=#336666 TITLE=#336666></td>
<TD BGCOLOR=#339966 TITLE=#339966></td>
<TD BGCOLOR=#33CC66 TITLE=#33CC66></td>
<TD BGCOLOR=#33FF66 TITLE=#33FF66></td>
<TD BGCOLOR=#660066 TITLE=#660066></td>
<TD BGCOLOR=#663366 TITLE=#663366></td>
<TD BGCOLOR=#666666 TITLE=#666666></td>
<TD BGCOLOR=#669966 TITLE=#669966></td>
<TD BGCOLOR=#66CC66 TITLE=#66CC66></td>
<TD BGCOLOR=#66FF66 TITLE=#66FF66></td>
</tr>
<tr>
<TD BGCOLOR=#000099 TITLE=#000099></td>
<TD BGCOLOR=#003399 TITLE=#003399></td>
<TD BGCOLOR=#006699 TITLE=#006699></td>
<TD BGCOLOR=#009999 TITLE=#009999></td>
<TD BGCOLOR=#00CC99 TITLE=#00CC99></td>
<TD BGCOLOR=#00FF99 TITLE=#00FF99></td>
<TD BGCOLOR=#330099 TITLE=#330099></td>
<TD BGCOLOR=#333399 TITLE=#333399></td>
<TD BGCOLOR=#336699 TITLE=#336699></td>
<TD BGCOLOR=#339999 TITLE=#339999></td>
<TD BGCOLOR=#33CC99 TITLE=#33CC99></td>
<TD BGCOLOR=#33FF99 TITLE=#33FF99></td>
<TD BGCOLOR=#660099 TITLE=#660099></td>
<TD BGCOLOR=#663399 TITLE=#663399></td>
<TD BGCOLOR=#666699 TITLE=#666699></td>
<TD BGCOLOR=#669999 TITLE=#669999></td>
<TD BGCOLOR=#66CC99 TITLE=#66CC99></td>
<TD BGCOLOR=#66FF99 TITLE=#66FF99></td>
</tr>
<tr>
<TD BGCOLOR=#0000CC TITLE=#0000CC></td>
<TD BGCOLOR=#0033CC TITLE=#0033CC></td>
<TD BGCOLOR=#0066CC TITLE=#0066CC></td>
<TD BGCOLOR=#0099CC TITLE=#0099CC></td>
<TD BGCOLOR=#00CCCC TITLE=#00CCCC></td>
<TD BGCOLOR=#00FFCC TITLE=#00FFCC></td>
<TD BGCOLOR=#3300CC TITLE=#3300CC></td>
<TD BGCOLOR=#3333CC TITLE=#3333CC></td>
<TD BGCOLOR=#3366CC TITLE=#3366CC></td>
<TD BGCOLOR=#3399CC TITLE=#3399CC></td>
<TD BGCOLOR=#33CCCC TITLE=#33CCCC></td>
<TD BGCOLOR=#33FFCC TITLE=#33FFCC></td>
<TD BGCOLOR=#6600CC TITLE=#6600CC></td>
<TD BGCOLOR=#6633CC TITLE=#6633CC></td>
<TD BGCOLOR=#6666CC TITLE=#6666CC></td>
<TD BGCOLOR=#6699CC TITLE=#6699CC></td>
<TD BGCOLOR=#66CCCC TITLE=#66CCCC></td>
<TD BGCOLOR=#66FFCC TITLE=#66FFCC></td>
</tr>
<tr>
<TD BGCOLOR=#0000FF TITLE=#0000FF></td>
<TD BGCOLOR=#0033FF TITLE=#0033FF></td>
<TD BGCOLOR=#0066FF TITLE=#0066FF></td>
<TD BGCOLOR=#0099FF TITLE=#0099FF></td>
<TD BGCOLOR=#00CCFF TITLE=#00CCFF></td>
<TD BGCOLOR=#00FFFF TITLE=#00FFFF></td>
<TD BGCOLOR=#3300FF TITLE=#3300FF></td>
<TD BGCOLOR=#3333FF TITLE=#3333FF></td>
<TD BGCOLOR=#3366FF TITLE=#3366FF></td>
<TD BGCOLOR=#3399FF TITLE=#3399FF></td>
<TD BGCOLOR=#33CCFF TITLE=#33CCFF></td>
<TD BGCOLOR=#33FFFF TITLE=#33FFFF></td>
<TD BGCOLOR=#6600FF TITLE=#6600FF></td>
<TD BGCOLOR=#6633FF TITLE=#6633FF></td>
<TD BGCOLOR=#6666FF TITLE=#6666FF></td>
<TD BGCOLOR=#6699FF TITLE=#6699FF></td>
<TD BGCOLOR=#66CCFF TITLE=#66CCFF></td>
<TD BGCOLOR=#66FFFF TITLE=#66FFFF></td>
</tr>


<tr>
<TD BGCOLOR=#990000 TITLE=#990000></td>
<TD BGCOLOR=#993300 TITLE=#993300></td>
<TD BGCOLOR=#996600 TITLE=#996600></td>
<TD BGCOLOR=#999900 TITLE=#999900></td>
<TD BGCOLOR=#99CC00 TITLE=#99CC00></td>
<TD BGCOLOR=#99FF00 TITLE=#99FF00></td>
<TD BGCOLOR=#CC0000 TITLE=#CC0000></td>
<TD BGCOLOR=#CC3300 TITLE=#CC3300></td>
<TD BGCOLOR=#CC6600 TITLE=#CC6600></td>
<TD BGCOLOR=#CC9900 TITLE=#CC9900></td>
<TD BGCOLOR=#CCCC00 TITLE=#CCCC00></td>
<TD BGCOLOR=#CCFF00 TITLE=#CCFF00></td>
<TD BGCOLOR=#FF0000 TITLE=#FF0000></td>
<TD BGCOLOR=#FF3300 TITLE=#FF3300></td>
<TD BGCOLOR=#FF6600 TITLE=#FF6600></td>
<TD BGCOLOR=#FF9900 TITLE=#FF9900></td>
<TD BGCOLOR=#FFCC00 TITLE=#FFCC00></td>
<TD BGCOLOR=#FFFF00 TITLE=#FFFF00></td>
</tr>
<tr>
<TD BGCOLOR=#990033 TITLE=#990033></td>
<TD BGCOLOR=#993333 TITLE=#993333></td>
<TD BGCOLOR=#996633 TITLE=#996633></td>
<TD BGCOLOR=#999933 TITLE=#999933></td>
<TD BGCOLOR=#99CC33 TITLE=#99CC33></td>
<TD BGCOLOR=#99FF33 TITLE=#99FF33></td>
<TD BGCOLOR=#CC0033 TITLE=#CC0033></td>
<TD BGCOLOR=#CC3333 TITLE=#CC3333></td>
<TD BGCOLOR=#CC6633 TITLE=#CC6633></td>
<TD BGCOLOR=#CC9933 TITLE=#CC9933></td>
<TD BGCOLOR=#CCCC33 TITLE=#CCCC33></td>
<TD BGCOLOR=#CCFF33 TITLE=#CCFF33></td>
<TD BGCOLOR=#FF0033 TITLE=#FF0033></td>
<TD BGCOLOR=#FF3333 TITLE=#FF3333></td>
<TD BGCOLOR=#FF6633 TITLE=#FF6633></td>
<TD BGCOLOR=#FF9933 TITLE=#FF9933></td>
<TD BGCOLOR=#FFCC33 TITLE=#FFCC33></td>
<TD BGCOLOR=#FFFF33 TITLE=#FFFF33></td>
</tr>
<tr>
<TD BGCOLOR=#990066 TITLE=#990066></td>
<TD BGCOLOR=#993366 TITLE=#993366></td>
<TD BGCOLOR=#996666 TITLE=#996666></td>
<TD BGCOLOR=#999966 TITLE=#999966></td>
<TD BGCOLOR=#99CC66 TITLE=#99CC66></td>
<TD BGCOLOR=#99FF66 TITLE=#99FF66></td>
<TD BGCOLOR=#CC0066 TITLE=#CC0066></td>
<TD BGCOLOR=#CC3366 TITLE=#CC3366></td>
<TD BGCOLOR=#CC6666 TITLE=#CC6666></td>
<TD BGCOLOR=#CC9966 TITLE=#CC9966></td>
<TD BGCOLOR=#CCCC66 TITLE=#CCCC66></td>
<TD BGCOLOR=#CCFF66 TITLE=#CCFF66></td>
<TD BGCOLOR=#FF0066 TITLE=#FF0066></td>
<TD BGCOLOR=#FF3366 TITLE=#FF3366></td>
<TD BGCOLOR=#FF6666 TITLE=#FF6666></td>
<TD BGCOLOR=#FF9966 TITLE=#FF9966></td>
<TD BGCOLOR=#FFCC66 TITLE=#FFCC66></td>
<TD BGCOLOR=#FFFF66 TITLE=#FFFF66></td>
</tr>
<tr>
<TD BGCOLOR=#990099 TITLE=#990099></td>
<TD BGCOLOR=#993399 TITLE=#993399></td>
<TD BGCOLOR=#996699 TITLE=#996699></td>
<TD BGCOLOR=#999999 TITLE=#999999></td>
<TD BGCOLOR=#99CC99 TITLE=#99CC99></td>
<TD BGCOLOR=#99FF99 TITLE=#99FF99></td>
<TD BGCOLOR=#CC0099 TITLE=#CC0099></td>
<TD BGCOLOR=#CC3399 TITLE=#CC3399></td>
<TD BGCOLOR=#CC6699 TITLE=#CC6699></td>
<TD BGCOLOR=#CC9999 TITLE=#CC9999></td>
<TD BGCOLOR=#CCCC99 TITLE=#CCCC99></td>
<TD BGCOLOR=#CCFF99 TITLE=#CCFF99></td>
<TD BGCOLOR=#FF0099 TITLE=#FF0099></td>
<TD BGCOLOR=#FF3399 TITLE=#FF3399></td>
<TD BGCOLOR=#FF6699 TITLE=#FF6699></td>
<TD BGCOLOR=#FF9999 TITLE=#FF9999></td>
<TD BGCOLOR=#FFCC99 TITLE=#FFCC99></td>
<TD BGCOLOR=#FFFF99 TITLE=#FFFF99></td>
</tr>
<tr>
<TD BGCOLOR=#9900CC TITLE=#9900CC></td>
<TD BGCOLOR=#9933CC TITLE=#9933CC></td>
<TD BGCOLOR=#9966CC TITLE=#9966CC></td>
<TD BGCOLOR=#9999CC TITLE=#9999CC></td>
<TD BGCOLOR=#99CCCC TITLE=#99CCCC></td>
<TD BGCOLOR=#99FFCC TITLE=#99FFCC></td>
<TD BGCOLOR=#CC00CC TITLE=#CC00CC></td>
<TD BGCOLOR=#CC33CC TITLE=#CC33CC></td>
<TD BGCOLOR=#CC66CC TITLE=#CC66CC></td>
<TD BGCOLOR=#CC99CC TITLE=#CC99CC></td>
<TD BGCOLOR=#CCCCCC TITLE=#CCCCCC></td>
<TD BGCOLOR=#CCFFCC TITLE=#CCFFCC></td>
<TD BGCOLOR=#FF00CC TITLE=#FF00CC></td>
<TD BGCOLOR=#FF33CC TITLE=#FF33CC></td>
<TD BGCOLOR=#FF66CC TITLE=#FF66CC></td>
<TD BGCOLOR=#FF99CC TITLE=#FF99CC></td>
<TD BGCOLOR=#FFCCCC TITLE=#FFCCCC></td>
<TD BGCOLOR=#FFFFCC TITLE=#FFFFCC></td>
</tr>
<tr>
<TD BGCOLOR=#9900FF TITLE=#9900FF></td>
<TD BGCOLOR=#9933FF TITLE=#9933FF></td>
<TD BGCOLOR=#9966FF TITLE=#9966FF></td>
<TD BGCOLOR=#9999FF TITLE=#9999FF></td>
<TD BGCOLOR=#99CCFF TITLE=#99CCFF></td>
<TD BGCOLOR=#99FFFF TITLE=#99FFFF></td>
<TD BGCOLOR=#CC00FF TITLE=#CC00FF></td>
<TD BGCOLOR=#CC33FF TITLE=#CC33FF></td>
<TD BGCOLOR=#CC66FF TITLE=#CC66FF></td>
<TD BGCOLOR=#CC99FF TITLE=#CC99FF></td>
<TD BGCOLOR=#CCCCFF TITLE=#CCCCFF></td>
<TD BGCOLOR=#CCFFFF TITLE=#CCFFFF></td>
<TD BGCOLOR=#FF00FF TITLE=#FF00FF></td>
<TD BGCOLOR=#FF33FF TITLE=#FF33FF></td>
<TD BGCOLOR=#FF66FF TITLE=#FF66FF></td>
<TD BGCOLOR=#FF99FF TITLE=#FF99FF></td>
<TD BGCOLOR=#FFCCFF TITLE=#FFCCFF></td>
<TD BGCOLOR=#FFFFFF TITLE=#FFFFFF></td>
</tr>
<tr>
<TD BGCOLOR=#000000 TITLE=#000000></td>
<TD BGCOLOR=#333333 TITLE=#333333></td>
<TD BGCOLOR=#666666 TITLE=#666666></td>
<TD BGCOLOR=#999999 TITLE=#999999></td>
<TD BGCOLOR=#CCCCCC TITLE=#CCCCCC></td>
<TD BGCOLOR=#FFFFFF TITLE=#FFFFFF></td>
<TD BGCOLOR=#000000 TITLE=#000000></td>
<TD BGCOLOR=#000000 TITLE=#000000></td>
<TD BGCOLOR=#000000 TITLE=#000000></td>
<TD BGCOLOR=#000000 TITLE=#000000></td>
<TD BGCOLOR=#000000 TITLE=#000000></td>
<TD BGCOLOR=#000000 TITLE=#000000></td>
<TD BGCOLOR=#000000 TITLE=#000000></td>
<TD BGCOLOR=#000000 TITLE=#000000></td>
<TD BGCOLOR=#000000 TITLE=#000000></td>
<TD BGCOLOR=#000000 TITLE=#000000></td>
<TD BGCOLOR=#000000 TITLE=#000000></td>
<TD BGCOLOR=#000000 TITLE=#000000></td>
</tr>
</table>
</td>
<td></td>
<td VALIGN="top" align="left" nowrap style="font-family:Arial; font-size:11px;">
    <button name="btnOK" style="width:75px; height:22px; font-family:Tahoma; font-size:11px; margin-top:0px" accesskey="o"><u>O</u>K</button><br>
    <button name="btnCancel" style="width:75px; height:22px; font-family:Tahoma; font-size:11px; margin-top:7px" onClick="window.close();">Close</button><br>
    <button name="btnClear" style="width:75px; height:22px; font-family:Tahoma; font-size:11px; margin-top:7px; margin-bottom:7px" onClick="">Clear</button><br>
    Highlight:
    <div style="height:20px; width:74px; border-width:1px; border-style:solid;" id="hicolor"></div>
    <div style="width:75px; text-align:right; margin-bottom:7px;" id="hicolortext"></div>
    Selected:
    <div style="height:20px; width:74px; border-width:1px; border-style:solid;" id="selhicolor"></div>
    <INPUT TYPE=text ID=selcolor style="width:75px; height:20px; font-family:Tahoma; font-size:11px; margin-top:0px; margin-bottom:7px;" maxlength=20>
</td></tr>
</BODY>
</HTML>
Return current item: Content*Builder