/* Use this with the color animation      *
 * -------------------------------------  *
 * to convert the elements current        *
 * -------------------------------------  *
 * color for use with the transformations *
 * -------------------------------------- */
 
function RGBtoHex(R,G,B) {return toHex(R)+toHex(G)+toHex(B)}
function toHex(N) {
 if (N==null) return "00";
 N=parseInt(N); if (N==0 || isNaN(N)) return "00";
 N=Math.max(0,N); N=Math.min(N,255); N=Math.round(N);
 return "0123456789ABCDEF".charAt((N-N%16)/16)
      + "0123456789ABCDEF".charAt(N%16);
}

function splitRGB( n )
{
	var s1 = n.split("rgb")[1];
	var s2 = s1.split("(")[1];
	var s3 = s2.split(")")[0];
	
	return s3;
}
