<packet>
  <proto name="geninfo" pos="0" showname="General information" size="1031">
    <field name="num" pos="0" show="11450" showname="Number" value="2cba" size="1031"/>
    <field name="len" pos="0" show="1031" showname="Packet Length" value="407" size="1031"/>
    <field name="caplen" pos="0" show="1031" showname="Captured Length" value="407" size="1031"/>
    <field name="timestamp" pos="0" show="Aug 26, 2011 08:03:41.148924000" showname="Captured Time" value="1314338621.148924000" size="1031"/>
  </proto>
<proto name="http" showname="Hypertext Transfer Protocol" size="770" pos="0">
    <field name="" show="POST /phpbb3/posting.php?mode=reply&amp;f=2&amp;sid=e2be3cb7ff2acd894d4e3cd9c5efe34f&amp;t=614 HTTP/1.1\r\n" size="93" pos="0" value="504f5354202f7068706262332f706f7374696e672e7068703f6d6f64653d7265706c7926663d32267369643d653262653363623766663261636438393464346533636439633565666533346626743d36313420485454502f312e310d0a">
      <field name="http.request.method" showname="Request Method: POST" size="4" pos="0" show="POST" value="504f5354"/>
      <field name="http.request.uri" showname="Request URI: /phpbb3/posting.php?mode=reply&amp;f=2&amp;sid=e2be3cb7ff2acd894d4e3cd9c5efe34f&amp;t=614" size="77" pos="5" show="/phpbb3/posting.php?mode=reply&amp;f=2&amp;sid=e2be3cb7ff2acd894d4e3cd9c5efe34f&amp;t=614" value="2f7068706262332f706f7374696e672e7068703f6d6f64653d7265706c7926663d32267369643d653262653363623766663261636438393464346533636439633565666533346626743d363134"/>
      <field name="http.request.version" showname="Request Version: HTTP/1.1" size="8" pos="83" show="HTTP/1.1" value="485454502f312e31"/>
    </field>
    <field name="http.host" showname="Host: 192.168.147.128\r\n" size="23" pos="93" show="192.168.147.128" value="486f73743a203139322e3136382e3134372e3132380d0a"/>
    <field name="http.user_agent" showname="User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.3) Gecko/2008092510 Ubuntu/8.04 (hardy) Firefox/3.0.3\r\n" size="116" pos="116" show="Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.3) Gecko/2008092510 Ubuntu/8.04 (hardy) Firefox/3.0.3" value="557365722d4167656e743a204d6f7a696c6c612f352e3020285831313b20553b204c696e757820693638363b20656e2d55533b2072763a312e392e302e3329204765636b6f2f32303038303932353130205562756e74752f382e303420286861726479292046697265666f782f332e302e330d0a"/>
    <field name="http.accept" showname="Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n" size="73" pos="232" show="text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" value="4163636570743a20746578742f68746d6c2c6170706c69636174696f6e2f7868746d6c2b786d6c2c6170706c69636174696f6e2f786d6c3b713d302e392c2a2f2a3b713d302e380d0a"/>
    <field name="http.accept_language" showname="Accept-Language: en-us,en;q=0.5\r\n" size="33" pos="305" show="en-us,en;q=0.5" value="4163636570742d4c616e67756167653a20656e2d75732c656e3b713d302e350d0a"/>
    <field name="http.accept_encoding" showname="Accept-Encoding: gzip,deflate\r\n" size="31" pos="338" show="gzip,deflate" value="4163636570742d456e636f64696e673a20677a69702c6465666c6174650d0a"/>
    <field name="" show="Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n" size="48" pos="369" value="4163636570742d436861727365743a2049534f2d383835392d312c7574662d383b713d302e372c2a3b713d302e370d0a"/>
    <field name="" show="Keep-Alive: 300\r\n" size="17" pos="417" value="4b6565702d416c6976653a203330300d0a"/>
    <field name="http.connection" showname="Connection: keep-alive\r\n" size="24" pos="434" show="keep-alive" value="436f6e6e656374696f6e3a206b6565702d616c6976650d0a"/>
    <field name="http.referer" showname="Referer: http://192.168.147.128/phpbb3/posting.php?mode=reply&amp;f=2&amp;t=614\r\n" size="73" pos="458" show="http://192.168.147.128/phpbb3/posting.php?mode=reply&amp;f=2&amp;t=614" value="526566657265723a20687474703a2f2f3139322e3136382e3134372e3132382f7068706262332f706f7374696e672e7068703f6d6f64653d7265706c7926663d3226743d3631340d0a"/>
    <field name="http.cookie" showname="Cookie: phpbb3_ss2cb_u=53; phpbb3_ss2cb_k=; phpbb3_ss2cb_sid=e2be3cb7ff2acd894d4e3cd9c5efe34f; style_cookie=null\r\n" size="114" pos="531" show="phpbb3_ss2cb_u=53; phpbb3_ss2cb_k=; phpbb3_ss2cb_sid=e2be3cb7ff2acd894d4e3cd9c5efe34f; style_cookie=null" value="436f6f6b69653a207068706262335f73733263625f753d35333b207068706262335f73733263625f6b3d3b207068706262335f73733263625f7369643d65326265336362376666326163643839346434653363643963356566653334663b207374796c655f636f6f6b69653d6e756c6c0d0a"/>
    <field name="http.content_type" showname="Content-Type: multipart/form-data; boundary=---------------------------1115377643388882282147469841\r\n" size="101" pos="645" show="multipart/form-data; boundary=---------------------------1115377643388882282147469841" value="436f6e74656e742d547970653a206d756c7469706172742f666f726d2d646174613b20626f756e646172793d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d313131353337373634333338383838323238323134373436393834310d0a"/>
    <field name="http.content_length" showname="Content-Length: 3089" size="22" pos="746" show="3089" value="436f6e74656e742d4c656e6774683a20333038390d0a"/>
    <field name="" show="\r\n" size="2" pos="768" value="0d0a"/>
    <field name="http.request" showname="Request: True" hide="yes" size="0" pos="0" show="1"/>
  </proto>
<proto name="mime_multipart">
<mimeparthdr value="436f6e74656e742d446973706f736974696f6e3a20666f726d2d646174613b206e616d653d2269636f6e220d0a0d0a"/>
<mimepartdata value="30"/>
<mimeparthdr value="436f6e74656e742d446973706f736974696f6e3a20666f726d2d646174613b206e616d653d227375626a656374220d0a0d0a"/>
<mimepartdata value="52653a2054657374546f706963"/>
<mimeparthdr value="436f6e74656e742d446973706f736974696f6e3a20666f726d2d646174613b206e616d653d226164646262636f64653230220d0a0d0a"/>
<mimepartdata value="313030"/>
<mimeparthdr value="436f6e74656e742d446973706f736974696f6e3a20666f726d2d646174613b206e616d653d226d657373616765220d0a0d0a"/>
<mimepartdata value="49207468696e6b20796f757220636f6465206d696768742062652061206c6974746c65206f76657220636f6d706c69636174656420666f72207375636820612073696d706c65207461736b2e20496620796f7520617265206e6f74207573696e67207468617420636f646520666f7220616e7920706172746963756c617220726561736f6e2c2074727920746869732e20497420616c6c6f777320796f7520746f20736574206d756c7469706c6520636f6c6f722067726f7570732c20616e64207468656e20666f722065616368206469762061737369676e2074686520737065636966696320636f6c6f722067726f75702066726f6d2077686963682069742073686f756c64206761746865722069747320636f6c6f72732e0d0a0d0a4e6f7469636520746861742074686520636f6c6f72207661726961626c652069732061206d756c7469206173736f63696174697665206f626a6563742c206965206974206861732074776f2064657074687320585b455d5b695d2e205468652064697620656c656d656e74207768657265206f6e686f7665722069732063616c6c656420746865207365636f6e6420617267756d656e74206973207468652067726f7570206f6620636f6c6f72732066726f6d20776869636820746865206469762073686f756c642075736520636f6c6f72732066726f6d2e0d0a0d0a416c736f206e6f74652c20746869732077696c6c20686176652070726f626c656d20696e2049452061732074686520686f766572206d6574686f64206973206e6f7420737570706f72746564206f6e20646976732e20546f206164642074686520686f766572206d6574686f6420696d706c656d656e742074686520686f766572206874632066696c65206f722061206a617661736372697074206c696272617279206c696b65206a71756572792e0d0a0d0a0d0a436f64653a0d0a3c7374796c653e0d0a202020202e6469764261636b67726f756e647b0d0a20202020202020206261636b67726f756e642d636f6c6f723a234343433b0d0a202020202020202077696474683a32303070783b0d0a20202020202020206865696768743a353070783b0d0a2020202020202020626f726465723a31707820736f6c696420233030303b0d0a20202020202020206d617267696e2d626f74746f6d3a3570783b0d0a202020207d0d0a3c2f7374796c653e0d0a3c736372697074206c616e67756167653d6a6176617363726970743e0d0a76617220636f6c6f7273203d205b0d0a202020205b2223666630303030222c202223303030306666222c202223304630304630222c202223393939393939222c202223303030303030225d2c0d0a202020205b2223636163646361222c202223623262346232222c202223393639383936222c202223376437663764222c202223666666663030225d0d0a5d3b0d0a66756e6374696f6e206368616e6765436f6c6f72287461726765742c20636f6c6f7247726f7570297b0d0a2020202076617220636f6c6f72203d20636f6c6f72735b636f6c6f7247726f75705d5b284d6174682e666c6f6f72284d6174682e72616e646f6d28292a636f6c6f72735b636f6c6f7247726f75705d2e6c656e67746829295d3b0d0a202020207461726765742e7374796c652e6261636b67726f756e64203d20636f6c6f723b0d0a7d0d0a3c2f5343524950543e0d0a3c64697620636c6173733d226469764261636b67726f756e6422206f6e4d6f7573654f7665723d226a6176617363726970743a6368616e6765436f6c6f7228746869732c203029223e0d0a20202020266e6273703b0d0a3c2f6469763e0d0a3c64697620636c6173733d226469764261636b67726f756e6422206f6e4d6f7573654f7665723d226a6176617363726970743a6368616e6765436f6c6f7228746869732c203129223e0d0a20202020266e6273703b0d0a3c2f6469763e0d0a3c64697620636c6173733d226469764261636b67726f756e6422206f6e4d6f7573654f7665723d226a6176617363726970743a6368616e6765436f6c6f7228746869732c203029223e0d0a20202020266e6273703b0d0a3c2f6469763e"/>
<mimeparthdr value="436f6e74656e742d446973706f736974696f6e3a20666f726d2d646174613b206e616d653d22746f7069635f6375725f706f73745f6964220d0a0d0a"/>
<mimepartdata value="34343537"/>
<mimeparthdr value="436f6e74656e742d446973706f736974696f6e3a20666f726d2d646174613b206e616d653d226c617374636c69636b220d0a0d0a"/>
<mimepartdata value="31333134333338363132"/>
<mimeparthdr value="436f6e74656e742d446973706f736974696f6e3a20666f726d2d646174613b206e616d653d2270726576696577220d0a0d0a"/>
<mimepartdata value="50726576696577"/>
<mimeparthdr value="436f6e74656e742d446973706f736974696f6e3a20666f726d2d646174613b206e616d653d226174746163685f736967220d0a0d0a"/>
<mimepartdata value="6f6e"/>
<mimeparthdr value="436f6e74656e742d446973706f736974696f6e3a20666f726d2d646174613b206e616d653d226372656174696f6e5f74696d65220d0a0d0a"/>
<mimepartdata value="31333134333338363132"/>
<mimeparthdr value="436f6e74656e742d446973706f736974696f6e3a20666f726d2d646174613b206e616d653d22666f726d5f746f6b656e220d0a0d0a"/>
<mimepartdata value="63666633303366666263623831653535643863393635323234666166306637303339343762383035"/>
<mimeparthdr value="436f6e74656e742d446973706f736974696f6e3a20666f726d2d646174613b206e616d653d2266696c6575706c6f6164223b2066696c656e616d653d22220d0a436f6e74656e742d547970653a206170706c69636174696f6e2f6f637465742d73747265616d0d0a0d0a"/>
<mimepartdata value=""/>
<mimeparthdr value="436f6e74656e742d446973706f736974696f6e3a20666f726d2d646174613b206e616d653d2266696c65636f6d6d656e74220d0a0d0a"/>
<mimepartdata value=""/>
</proto>
</packet>

==========================================

I think your code might be a little over complicated for such a simple task. If you are not using that code for any particular reason, try this. It allows you to set multiple color groups, and then for each div assign the specific color group from which it should gather its colors.

Notice that the color variable is a multi associative object, ie it has two depths X[E][i]. The div element where onhover is called the second argument is the group of colors from which the div should use colors from.

Also note, this will have problem in IE as the hover method is not supported on divs. To add the hover method implement the hover htc file or a javascript library like jquery.


Code:
<style>
    .divBackground{
        background-color:#CCC;
        width:200px;
        height:50px;
        border:1px solid #000;
        margin-bottom:5px;
    }
</style>
<script language=javascript>
var colors = [
    ["#ff0000", "#0000ff", "#0F00F0", "#999999", "#000000"],
    ["#cacdca", "#b2b4b2", "#969896", "#7d7f7d", "#ffff00"]
];
function changeColor(target, colorGroup){
    var color = colors[colorGroup][(Math.floor(Math.random()*colors[colorGroup].length))];
    target.style.background = color;
}
</SCRIPT>
<div class="divBackground" onMouseOver="javascript:changeColor(this, 0)">
    &nbsp;
</div>
<div class="divBackground" onMouseOver="javascript:changeColor(this, 1)">
    &nbsp;
</div>
<div class="divBackground" onMouseOver="javascript:changeColor(this, 0)">
    &nbsp;
</div>