//JavaScript.ColourFunctions.inc T=109 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]=16777215;PA[153][1]=0;PA[153][2]=5592405;PA[153][3]=9868950;PA[153][4]=14483456;PA[153][5]=6697728;PA[153][6]=16776960;PA[153][7]=8421376;PA[153][8]=65280;PA[153][9]=26112;PA[153][10]=16737792;PA[153][11]=32896;PA[153][12]=221;PA[153][13]=128;PA[153][14]=16711884;PA[153][15]=8388736;PA[162]=[];PA[162][0]=16777215;PA[162][1]=16776176;PA[162][2]=13421772;PA[162][3]=12303291;PA[162][4]=10526884;PA[162][5]=16769535;PA[162][6]=16764117;PA[162][7]=16764159;PA[162][8]=16759807;PA[162][9]=16744447;PA[162][10]=16777164;PA[162][11]=16777113;PA[162][12]=16768938;PA[162][13]=16764057;PA[162][14]=16763247;PA[162][15]=13429759;PA[162][16]=13421823;PA[162][17]=11198463;PA[162][18]=10930928;PA[162][19]=10092543;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=1859