//JavaScript.ColourFunctions.inc T=123 function SC(f,i,F){if(typeof(F)=="undefined"){F="MainForm";}var E=document.forms[F].elements;var id=f+(i>-1?("."+i):"");var eR=E["R:"+id];var eG=E["G:"+id];var eB=E["B:"+id];var R=parseInt(eR.value);var G=parseInt(eG.value);var B=parseInt(eB.value);if(isNaN(B)||isNaN(G)||isNaN(R)||R<0||B<0||G<0||R>255||B>255||G>255){alert("Error: Color values must be integers between 0 and 255");SCC(f,parseInt(E["FieldID:"+id+"=RGB"].value.substring(1,7),16));}else{var V=hb(R)+hb(G)+hb(B);eR.value=R;eG.value=G;eB.value=B;document.getElementById("Colour:"+id).style.backgroundColor="#"+V;E["FieldID:"+id+"=RGB"].value="#"+V;}}function SCC(f,i,v,F){if(typeof(F)=="undefined"){F="MainForm";}var E=document.forms[F].elements;var id=f+(i>-1?("."+i):"");E["R:"+id].value=((v&0xFF0000) >> 16);E["G:"+id].value=((v&0x00FF00) >> 8);E["B:"+id].value=(v&0x0000FF);SC(f,i,F);return false;}function hb(n){var hd=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"];return (hd[(n&0xF0)>>4]+hd[n&0x0F]);}var PA=[];PA[153]=[];PA[153][0]=-1;PA[153][1]=0;PA[153][2]=5592405;PA[153][3]=-6908266;PA[153][4]=-2293760;PA[153][5]=6697728;PA[153][6]=-256;PA[153][7]=-8355840;PA[153][8]=65280;PA[153][9]=26112;PA[153][10]=-39423;PA[153][11]=32896;PA[153][12]=221;PA[153][13]=128;PA[153][14]=-65332;PA[153][15]=-8388480;PA[162]=[];PA[162][0]=-1;PA[162][1]=-1040;PA[162][2]=-3355444;PA[162][3]=-4473925;PA[162][4]=-6250331;PA[162][5]=-7681;PA[162][6]=-13099;PA[162][7]=-13057;PA[162][8]=-17409;PA[162][9]=-32769;PA[162][10]=-52;PA[162][11]=-103;PA[162][12]=-8277;PA[162][13]=-13159;PA[162][14]=-13969;PA[162][15]=-3347457;PA[162][16]=-3355393;PA[162][17]=-5578753;PA[162][18]=-5846288;PA[162][19]=-6684673;function fcv(v){var R=(v>>16)&0xFF;var G=(v>>8)&0xFF;var B=v&0xFF;return hb(R)+hb(G)+hb(B);}function DCP(f,i,v,p,ecc,fn){ecc=ecc||"";var CPH="
<\/div><\/td>";if(p&&PA[p]){var bc=(PA[p].length%2?1:0);CPH+="
";for(var pc=0;pc
<\/div><\/td>";}CPH+="<\/tr>
";for(var pc=Math.floor(PA[p].length/2)+bc;pc
<\/div><\/td>";}CPH+="<\/tr><\/table>";}CPH+="
R<\/td>>16)&0xFF)+"\" onchange=\""+ecc+"SC("+f+","+i+(fn?",'"+fn+"'":"")+");\"\/><\/td>G<\/td>>8)&0xFF)+"\" onchange=\""+ecc+"SC("+f+","+i+(fn?",'"+fn+"'":"")+");\"\/><\/td>B<\/td><\/td><\/tr><\/table>";document.write(CPH);} //*ColourFunctions T=130