Fix ActiveX. Use ERB for Javascript detection code.