but then bump window will be opened instantly the page loads which i dont prefer. I want to call it within the function launchs. like some form's onSubmit
and another fix solition is put it out of function as you said and close it right again which is not professional...
You should try to avoid using popups as some systems and newer systems which are upto date with latest patches will block popups. Most firewalls will also block pop-ups, cookies and other methods of delivery of advertising.
IF you must advertise, your better off delivering banners to your web site page that rotate or change with eash page click, etc.
Using .setTimeout() for a task that is going to repeat, use the .setInterval() as this only needs setting once and if you use currentID=window.setInterval(myfunc,60000); will setup a reference to the event, this can be used to stop the interval with clearInterval(currentID); so you can call a routine and it will be called (in this case every 60 seconds) every 60000 milliseconds.
I built a banner script that used a system of set & clearInterval to alter the display length of the images so that slideshows can be made up where several images can be played at varying rates or held for as log as required.