/*
 * launcher.js
 *
 * Copyright (c) 2002 WebNetwork.com. All Rights Reserved.
 *
 */

var win = null;

function new_window(mypage,myname,w,h,pos,infocus,scrollbars){
	if(pos=="top"){
		myleft=20;
		mytop=20;
	}
	if(pos=="random"){
		myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;
		mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h))):100;
	}
	if(pos=="center"){
		myleft=(screen.width)?(screen.width-w)/2:100;
		mytop=(screen.height)?(screen.height-h)/2:100;
		}
		else if((pos!="center" && pos!="random" && pos!="top") || pos == null){
		myleft=0;
		mytop=20;
	}
	scrollbars=(scrollbars)?",scrollbars=yes":",scrollbars=no"
	sPosition=",top=" + mytop + ',left=' + myleft;
	if ((navigator.appVersion.indexOf('Mac')>0) || (navigator.appVersion.indexOf('AOL')>0)) sPosition='';
	features="width=" + w + ",height=" + h + sPosition + scrollbars + ",location=no,directories=no,status=yes,menubar=no,toolbar=no,resizable=yes";
	win=window.open(mypage,myname,features);
	if (infocus) win.focus();
}