	// ------------------------------------------------------------------------------------
	// openWindow
	// ------------------------------------------------------------------------------------
	// Parameter List:
	//
	//	• sURL			string -- the url of the file whose contents to display in the new window
	//	• nWidth		number -- the width of the new window in pixels
	//	• nHeight		number -- the height of the new window in pixels
	// 	• bResizable	boolean -- 0 or 1, indicates if the window is to be resizable 
	// 	• bStatus		boolean -- 0 or 1, indicates if the window is to have a status bar
	// 	• bMenubar		boolean -- 0 or 1, indicates if the window is to have a menu bar
	// 	• bToolbar		boolean -- 0 or 1, indicates if the window is to have a tool bar 
	// 	• bScrollbars	boolean -- 0 or 1, indicates if the window should have scrollbars 
	// 	• nTop			number -- the number, in pixels, of the window's top position
	// 	• nLeft			number -- the number, in pixels, of the window's left position
	// 	• sWindowName	string -- optional, the handle of the window being produced by this function
	// ------------------------------------------------------------------------------------
	// Remarks:
	//
	//	• Creates a new window and puts the contents of the file found at sURL in the window.
	//	• Has options preset regarding the window's menus, toolbars, etc. 
	//	• Centers the new window on the screen.
	// ------------------------------------------------------------------------------------
	// Requirements:
	//
	//	•
	// ------------------------------------------------------------------------------------
	// History:
	//
	//	• 03.06.2002 -- threedeadflies@hotmail.com -- wrote the function
	// 	• 01.07.2010 -- bio.dizzl@gmail.com -- added parameters for scrollbars, top, left and windowname
	// ------------------------------------------------------------------------------------
	//
	function openWindow( sURL, nWidth, nHeight, bResizable, bStatus, bMenubar, bToolbar, bScrollbars, nTop, nLeft, sWindowName) 
	{ 
		var n_Left = 0 ;
		var n_Top = 0 ;
		var i = 0 ;
		
		// if a 'LEFT' value is received, apply it to the window location:
		if(nLeft || (nLeft == 0) )
		{
			n_Left = nLeft ;
		}
		else
		{
			n_Left = ( screen.availWidth - ((nWidth) ? nWidth : 700) ) / 2  ;  
		}
		
		// if a 'TOP' value is received, apply it to the window location:
		if(nTop || (nTop == 0) )
		{
			n_Top = nTop ;
		}
		else
		{
			n_Top = ( screen.availHeight - ((nHeight) ? nHeight : 600) ) / 2 ; 
		}
		return( window.open( sURL, 
							(sWindowName ? sWindowName : "bananahead"), 
							"resizable=" + ((bResizable) ? bResizable : 0) + 
							", status=" + ((bStatus) ? bStatus : 0) + 
							", menubar=" + ((bMenubar) ? bMenubar : 0) + 
							", toolbar=" + ((bToolbar) ? bToolbar : 0) + 
							", left=" + n_Left + 
							", top=" + n_Top + 
							", width=" + nWidth + 
							", height=" + nHeight + 
							", scrollbars=" + ((bScrollbars) ? bScrollbars : 0), true 
							) 
				); 
	} 

	function validateWaitListFields(form)
		{
			if( !isProper(form.FirstName.value) )
			{
				alert("Please check the format of your First Name. It must contain ALPHA characters only.") ;
				form.FirstName.focus() ;
				return(false) ;
			}
			else
			{
				if( !isAlpha(form.FirstName.value) )
				{
					alert("First Name contains illegal characters. It must contain ALPHA characters only.<br>Please correct and resubmit.") ;
					form.FirstName.focus() ;
					return(false) ;
				}
			}
			
			if( !isProper(form.LastName.value) )
			{
				alert("Please check the format of your Last Name. It must contain ALPHA characters only.") ;
				form.LastName.focus() ;
				return(false) ;
			}
			else
			{
				if( !isAlpha(form.LastName.value) )
				{
					alert("Last Name contains illegal characters. It must contain ALPHA characters only. Please correct and resubmit.") ;
					form.LastName.focus() ;
					return(false) ;
				}
			}
/*			
			if( !form.Email.value.isValidEmail() ) 
			{
				alert("The email address you've provided is not a valid email format. Please check its format, correct, and resubmit.") ;
				form.Email.focus() ;
				return(false) ;
			}
*/
			if( !isPhone(form.Phone1.value) )
			{
				alert("The Day Phone contains illegal characters. There should be 10 digits (nothing but NUMERIC characters) making up the complete phone number.") ;
				form.Phone1.focus() ;
				return(false) ;
			}
			
			if( !isPhone(form.Phone2.value) )
			{
				alert("The Eve Phone contains illegal characters. There should be 10 digits (nothing but NUMERIC characters) making up the complete phone number.") ;
				form.Phone2.focus() ;
				return(false) ;
			}
			var _boxes = document.getElementsByTagName("input") ;
            var j = 0 ;
			var i = 0 ;
			var sClsIds = new String() ;
            for( i = 0; i < _boxes.length; i++ )
			{
            	if( _boxes[i].type == "checkbox" )
				{
                	j = j + 1 ;
					if( _boxes[i].checked == true )
					{
						sClsIds = sClsIds + "::" + _boxes[i].value ;
					}
                }
            }
			if( sClsIds == 0 )
			{
				alert("To join a wait list, please select the checkbox(es) corresponding to the classes in which you are interested.")
				return(false) ;
			}
			form.sListOfClsIDs.value = sClsIds ;
			form.nNumOfBoxes.value = j ;

			form.submit() ; //' if it hits this line, it must be okay.
		}
		

		//' ---------------------------------------------------------------------------------------
		//' Validation/Testing Routines
		//' ---------------------------------------------------------------------------------------

		function isProper(s) 
		{
			if (!s) return(false) ;
			
			var iChars = "*|,\":<>[]{}`\';()@&$#%";
		
			for( var i = 0; i < s.length; i++ ) 
			{
				if( iChars.indexOf(s.charAt(i)) != -1 ) return(false) ;
			}
			return(true) ;
		}                      
		
		//' this function allows terminators such as '.name', '.family' and '.museum'
/*		function isEmail(s) 
		{
			return( \b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b.test(s)) ;
			return( /^\w+([\.-]?\w+)*@\w+([\.-]?\­w+)*(\.\w{2,5})+$/.test(s))
		}
*/
		function isPhone(s) 
		{
			return(  /^\d{10}$/.test(s)  ) ;
		}
		
		function isAlpha(s)
		{
			for( i = 0; i < s.length; i++ )
			{
				var sChar = s.charAt(i).toLowerCase() ;
				if( sChar < "a" || sChar > "z") 
				{
					return(false);
				}
			}
			return(true) ;
		}

