added cross browser supported javascript ajax functions