	/**
	* function that opens a totally customized
	* popup window.  Takes 9 parameters, they
	* define the window features and dimetions
	**/
	function doPopupWin(loc, width, height, tb, status, scroll, resize, dir, menu)
	{	
		//define array and fill it
		var winFeaturesArr, winFeatures = "";
		
				winFeaturesArr = new Array();
				winFeaturesArr[0]  = "width=" 				+ width;
				winFeaturesArr[1]  = "height=" 				+ height;
				winFeaturesArr[2]  = "toolbar="  			+ tb;
				winFeaturesArr[3]  = "status=" 				+ status;
				winFeaturesArr[4]  = "scrollbars=" 		+ scroll;
				winFeaturesArr[5]  = "resizable=" 		+ resize;
				winFeaturesArr[6]  = "directories="   + dir;
				winFeaturesArr[7]  = "menubar=" 			+ menu;
				
		//loop and fill var w/ array
		for (win in winFeaturesArr)
		{
			winFeatures += winFeaturesArr[win] + ",";
		}	
		
		strCoords = "top=20,left=20";
		if (winFeatures.length > 0)
		{
			winFeatures = winFeatures + strCoords;
		}	

		//pop up the window and go to location
		if ((winFeatures != "") || (winFeatures != null))
		{
			popWin = window.open("", "genPopupWin", winFeatures);
			popWin.location = loc;
			popWin.focus();
		}
		else
		{
			alert("Your popup window features are \nundefined or incorrectly defined!"); //if array loop failed
		}
	}
	
	/**
	* function closes above popup window
	**/
	function closePopup(winName)
	{
		if (!self.closed)
		{
			self.close();
			return true;
		}
		else
		{
			return false;
		}
	}

