X-Ray absorption studies of boron-carbon-nitrogen (BxCyNz) ternary alloys