How to make popup dialog box

I have a custom javascript for shows a popup box when user come on website. But the problem where to add these script code on cscart to shows better specially on homepage. Any advice will be appreciated. :cool:

Insert your code between To

in “index.tpl” Located at skins[YOUR_SKIN]\customer