Multi-element-amorphous-silicon-detector-array for real-time imaging and dosimetry of megavoltage photons and diagnostic x-rays