// windows.js
// This file contains functions that are used to manipulate windows.
// Author: Dovie Gelerinter
// Date: December 5, 2000


// This checks to see if the jslib object exists yet and creates it if needed.

if(!jslib){
	var jslib = library();
	}
// This creates a new window object within the JS Library object if needed.

if(!jslib.windows){
	jslib.windows = new windowObject();
	}

// This creates a new JS library.

function library(){
	// Further functionality can be added to the library here.
	// this.property = value;
	return this;
	}
// This creates a window object with all our functions set within it.

function windowObject(){
	this.open = openWindow;
	return this;
	}

// This function opens a window with the attributes sent to it.

function openWindow(url,windowname,w,h,scroll,resize,menu,loc,tool,stat,dir){
	windowname = windowname||"new";
	w = w||750;
	h = h||750;
	resize = resize||"yes";
	menu = menu||"yes";
	loc = loc||"yes";
	tool = tool||"yes";
	stat = stat||"yes";
	scroll = scroll||"auto";
	dir = dir||"yes";

	var paramstring ="resizable=" + resize + ",menubar=" + menu + ",location=" + loc + ",toolbar=" + tool + ",status=" + stat + ",scrollbars=" + scroll + ",directories=" + dir + " ,width=" + w + ",height=" + h;
	var NewWin = window.open(url,windowname,paramstring);
	NewWin.focus();
	return(NewWin);
	}



