<Raj>Used the function CreateWith to append the script in dom
- commented getPageName function and used the first value from array