//JavaScript.ColourFunctions.inc T=139 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("");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[162]=[];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+="
<\/td>>16)&0xFF)+"\" onchange=\""+ecc+"SC("+f+","+i+(fn?",'"+fn+"'":"")+");\"\/><\/td><\/td>>8)&0xFF)+"\" onchange=\""+ecc+"SC("+f+","+i+(fn?",'"+fn+"'":"")+");\"\/><\/td><\/td><\/td><\/tr><\/table>";document.write(CPH);} //*ColourFunctions T=143