Not sure if I understand what you mean by “how do I launch another window automatically?”
If I take it at face value It say your looking for a simple pop-up or pop-under when your main page loads.
If this is correct the script below should work fine for you …
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
var popunder=new Array()
popunder[0]=" name of HTML file you want in the new window "
// Specify the width and height of new popunder window (in pixels).
var width = '250';
var height = '250';
var p = 'scrollbars=no,resizable=no,toolbar=no,' + //these are obvious variables. set "yes" or "no".
'menubar=no,status=no,location=no,left=85,top=20,height=' + //the location on the user's screen
height + ',width=' + width;
// Specifying 1 below will load pop window only once per session 0 = it will load everytime main page is loaded.
var one_time=0
// Nothing below this comment should be edited
function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { // if the cookie exists
offset += search.length
end = document.cookie.indexOf(";", offset); // set the index of beginning value
if (end == -1) // set the index of the end of cookie value
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}
function loadornot(){
if (get_cookie('popunder')==''){
load_pop_power()
document.cookie="popunder=yes"
}
}
function load_pop_power(){
win2=window.open(popunder[Math.floor(Math.random()*(popunder.length))],"bw",p)
win2.blur()
window.focus()
}
if (one_time==0)
load_pop_power()
else
loadornot()
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Id recommend saving the actual script (between the script tags) to a .js file and loading it on the mainpage via a script call as such …
This script utilizes cookies so that the window does not automatically popup every time and annoy the hell out of your site(s) visitors …
If thats not what you were looking for let me know …