/*
Author:		Rick Stoelinga
Version:	4.0
Last Mod:	9/5/02
*/
function csWin(popUrl,popName,w,h,scrollbars,x,y,toolbar,menubar,resizable,status,directories){
	this.popUrl = popUrl;
	this.popName = popName;
	this.w = w ? w : screen.width;
	this.h = h ? h : screen.height;
	this.scrollbars = scrollbars ? 1 : 0;
	this.toolbar = toolbar ? toolbar : 0;
	this.menubar = menubar ? menubar : 0;
	this.resizable = resizable ? resizable : 0;
	this.status = status ? status : 0;
	this.directories = directories ? directories : 0;
	var winl = x ? x : ((screen.width - this.w) / 2);
	var wint = y ? y : ((screen.height - this.h) / 2);
	if (wint < 0) wint = 1;
	if (winl < 0) winl = 0;
	this.popWin = window.open(
		this.popUrl,
		this.popName,
		"top=" + wint + "," +
		"left=" + winl + "," +
		"toolbar=" + this.toolbar.toString() + "," +
		"directories=" + this.directories.toString() + "," +
		"status=" + this.status.toString() + "," +
		"menubar=" + this.menubar.toString() + "," +
		"scrollbars=" + this.scrollbars.toString() + "," +
		"resizable=" + this.resizable.toString() + "," +
		"width=" + this.w.toString() + "," +
		"height=" + this.h.toString()
	);
}

function csWinClose() {
	this.popWin.close();
}

csWin.prototype.close = csWinClose;
