
	//===============================================================================
	//	FUNCTION:	FSS_UpdateStatusbar
	// 
	//	INPUT: 		strText (String)		- Text to display on the status bar.
	//
	//	RETURN:		<nothing>
	//
	//	DESC:		This function is used with client-side JavaScript to set the
	//				browsers status bar.
	//
	//	PLATFORMS:	Netscape Navigator 3.01 and higher,
	//			  	Microsoft Internet Explorer 3.02 and higher,
	//===============================================================================
	function FSS_UpdateStatusbar(strText)
	{
		if (typeof(strText) != 'string') strText = "";
		window.status = strText;
	}

	//===============================================================================
	//	FUNCTION:	FSS_CheckArgCount
	// 
	//	INPUT: 		bDisplayError (Bool)	- Should we display an error ?
	//
	//	RETURN:		Did the calling function have the correct number of arguments ?
	//				(True; False;)
	//
	//	DESC:		This function is used with client-side JavaScript to detect
	//				if we got the correct number of arguments from the calling 
	//				function.
	//
	//	PLATFORMS:	Netscape Navigator 3.01 and higher,
	//			  	Microsoft Internet Explorer 3.02 and higher,
	//===============================================================================
	function FSS_CheckArgCount(bDisplayError)
	{
		var bRtrn = true;
	
		// Validate the number of arguments
		// - Get the number of arguments from the 'calling function'
		var nExptdArgs = arguments.caller.callee.arity;
		// - Get the actual number of arguments that the caller was expecting.
		var nActualArgs = arguments.caller.length;
		// - They don't match, display an error
		if (nActualArgs != nExptdArgs)
		{
			if (bDisplayError)
			{
				var strFuncname = arguments.caller.callee.toString().match(/function (\w*)/)[1];
				var sWork1 = "WARNING:\n" +
							 strFuncname + "() " + 
							 "was invoked with wrong number of arguments!\n" +
							 "Expected " + nExptdArgs +
							  " arguments, but passed " + nActualArgs;
							  
				alert(sWork1);
			}
			bRtrn = false;
		}

		return (bRtrn);		
	}

	//===============================================================================
	//	FUNCTION:	FSS_Redirector
	// 
	//	INPUT: 		strFileName (String)	- The file to redirect to.
	//				bForce (Boolean)		- Is we are already on this page should
	//										  we force a redirection any way ?
	//				nLevel (Number)			- The level of indirection to generate
	//										  for this file.
	//
	//	RETURN:		Did the calling function have the correct number of arguments ?
	//				(True; False;)
	//
	//	DESC:		This function is used with client-side JavaScript to detect
	//				if we got the correct number of arguments from the calling 
	//				function.
	//
	//	PLATFORMS:	Netscape Navigator 3.01 and higher,
	//			  	Microsoft Internet Explorer 3.02 and higher,
	//===============================================================================
	function FSS_Redirector(strFileName, bForce, nLevel)
	{
		var bRtrn = false;
		
		// Validate the parameters
		// *** Note ***
		//		if you pass a literal 'yyyy',  its a 'string',
		//		if you pass a var xxx = new String('yyyy');, its a 'object'
		if ((typeof(strFileName) == 'string') ||
		   (typeof(strFileName) == 'object'))
		{
			// - Set the level of directory indirection needed
			if ((typeof(nLevel) == 'number') &&
				(nLevel > 0))
			{
				var sWork1 = new String();
				for (var nItem = 0; nItem < nLevel; nItem++)
				{
					sWork1 += "../";
				}
				strFileName = sWork1 + strFileName;
			}
		
			// - Redirect to the file name.
			if (bForce == false)
			{
				var strExisting = new String(window.location);
				// - Force a parse if we have params
				var	strParsed = (strFileName.indexOf("?") == -1 ? strFileName : strFileName.substr(0, strFileName.indexOf("?")));
				// - Check								
				if (strExisting.indexOf(strParsed) == -1) bForce = true;
			}
			
			// - Force the redirection
			if (bForce) window.location = strFileName;
			
			bRtrn = true;
		}
	
		return (bRtrn);
	}
	
	//===============================================================================
	//	FUNCTION:	FSS_PostToParentFrame_Submit
	// 
	//	INPUT: 		strFrameName (String)	- The name of the frame to use.
	//				strDocument (String)	- The name of the doument to redirect
	//										  the 'frame' to.
	//				bAlert (Boolean)		- If we are already on this page,
	//										  do we show an alert ?
	//				exceptionDocument		- The name(s) of the document that we cannot
	//				(string)				  post to. In other words an exception. 
	//				(Array)
	//
	//	RETURN:		<nothing>
	//
	//	DESC:		This function is used with client-side JavaScript to redirect
	//				the contents of the 'frame' by a forced 'submit' to the passed
	//				document.
	//
	//	PLATFORMS:	Microsoft Internet Explorer 4.01 and higher,
	//===============================================================================
    function FSS_PostToParentFrame_Submit(strFrameName, strDocument, bAlert, exceptionDocument, strExpection)
    {
		// *** Note ***
		//		Current changes to apply :
		//									Drill from the very top down to find the
		//									level at which the the 'frame' exisits.
		//									Use an 'eval()' statement to process
		//									the generated indirection string.
		//									(I.E. 'parent.parent.frames(strFrameName).')
		//

		// Validate the params
		if ((typeof(strFrameName) == 'string') &&
			(typeof(strDocument) == 'string'))
		{
			// - Validate the 'Frame Name'
			var bFound = false;
			if (parent.frames.length > 0)
			{
				for (var nFrames = 0; nFrames < parent.frames.length; nFrames++)
				{
					if (strFrameName == parent.frames[nFrames].name)
					{
						bFound = true;
						break;
					}
				}
			}
			// - We found it
			if (!bFound)
			{
				// - Show an alert if needed
				if ((typeof(bAlert) == 'boolean') &&
					(bAlert == true)) { alert("Frame : " + strFrameName + ", could not be found!"); }	
			}
			else
			{
				// - *** Special case logic ***
				//	- If the 'action' is not in the exception list, then we won't do the dynamic submit
				with (parent.frames(strFrameName))
				{
					var bException = false;			

					if (typeof(exceptionDocument) == 'string')
					{
						exceptionDocument.toUpperCase();
						var strWork1 = new String(location)
						strWork1.toUpperCase()
						bException = ((strWork1.indexOf(exceptionDocument) == -1) ? false : true);
					}
					else if (typeof(exceptionDocument) == 'object')
					{
						var strWork1 = new String(location);
						strWork1 = strWork1.toLowerCase();

						if (exceptionDocument.length > 0)
						{
							for (var nItem = 0; nItem < exceptionDocument.length; nItem++)
							{
								var strWork2 = new String(exceptionDocument[nItem]);
								strWork2 = strWork2.toLowerCase();
								if (bException = (strWork1.indexOf(strWork2) != -1)) break;
							}
						}
					}
					// - Is this an exception page ?
					if (bException)
					{
						// - Show an alert if needed
						if ((typeof(bAlert) == 'boolean') &&
							(bAlert == true))
						{
							var strAlert = new String("You must select a button on the main page to exit.");
							if (typeof(strExpection) == 'string') { strAlert = new String(strExpection); }
							if (strAlert.length > 0) { alert(strAlert); }
						}	
					}
					else
					{
						// *** Note, this does not work if there are no forms on the page... ***
						if (document.forms.length == 0)
						{
							// - Show an alert if needed
							if ((typeof(bAlert) == 'boolean') &&
								(bAlert == true)) { alert("Could not locate survey page : 'Press <Refresh> button to restart'"); }	
						}
						else
						{						
							// - Are we already on this page ??
							var strWork1 = new String(location);
							strWork1 = strWork1.toUpperCase();
							var strWork2 = new String(strDocument);
							strWork2 = strWork2.toUpperCase();
							if (strWork1.indexOf(strWork2) == -1)
							{
								if (ValidateControls())
								{
									document.forms[0].action = strDocument;
									document.forms[0].submit();
								}		
							}
							else
							{
								// - Show an alert if needed
								if ((typeof(bAlert) == 'boolean') &&
									(bAlert == true))
								{
									alert("The page selected is already active.");
								}	
							}
						}	//	<else>	if (document.forms.length == 0)
					}	//	<else>	if (bException)
				}	//	with (parent.frames(strFrameName))
			}	//	<else>	if (!bFound)
		}	//	if ((typeof(strFrameName) == 'string') && (typeof(strDocument) == 'string'))
    }

	//===============================================================================
	//	FUNCTION:	FSS_PopupWindow
	// 
	//	INPUT: 		
	//
	//	RETURN:		<nothing>
	//
	//	DESC:		This function is used with client-side JavaScript to redirect
	//
	//	PLATFORMS:	Microsoft Internet Explorer 4.01 and higher,
	//===============================================================================
	function FSS_PopupWindow(strURL, strName, width, height, bScroller, bResizeable, bMenubar, bToolbar, bLocation)
	{
		var strWork1 = "";
		strWork1 += "directories=no";
		// - Scrollbars
		if (bScroller != 'true')
		{
			strWork1 += ",scrollbars=no";
		}
		else
		{
			strWork1 += ",scrollbars=yes";
		}
		// - Resizable
		if (bResizeable != 'true')
		{
			strWork1 += ",resizable=no";
		}
		else
		{
			strWork1 += ",resizable=yes";
		}
		// - Menubar
		if (bMenubar != 'true')
		{
			strWork1 += ",menubar=no";
		}
		else
		{
			strWork1 += ",menubar=yes";
		}
		// - Toolbar
		if (bToolbar != 'true')
		{
			strWork1 += ",toolbar=no";
		}
		else
		{
			strWork1 += ",toolbar=yes";
		}
		// - Location
		if (bLocation != 'true')
		{
			strWork1 += ",location=no";
		}
		else
		{
			strWork1 += ",location=yes";
		}
		// - Height
		if (height != '')
		{
			strWork1 += ",height=" + height;
		}
		// - Width
		if (width != '')
		{
			strWork1 += ",width=" + width;
		}

		return (window.open(strURL, strName, strWork1));
	}

	//===============================================================================
	//	FUNCTION:	FSS_IsArray
	// 
	//	INPUT: 		
	//
	//	RETURN:		<nothing>
	//
	//	DESC:		This function is used with client-side JavaScript to redirect
	//
	//	PLATFORMS:	Microsoft Internet Explorer 4.01 and higher,
	//===============================================================================
	function FSS_IsArray(objValue)
	{
		var bRtrn = false
		
		// Validate params
		if ((typeof(objValue) == 'object') && (objValue.constructor == Array))
		{
			bRtrn = true;
		}		
	
		return (bRtrn)
	}
	
	//===============================================================================
	//	FUNCTION:	FSS_IsString
	// 
	//	INPUT: 		
	//
	//	RETURN:		<nothing>
	//
	//	DESC:		This function is used with client-side JavaScript to redirect
	//
	//	PLATFORMS:	Microsoft Internet Explorer 4.01 and higher,
	//===============================================================================
	function FSS_IsString(objValue)
	{
		var bRtrn = false
		
		// Validate params
		if ((typeof(objValue) == 'object') && (objValue.constructor == Array))
		{
			bRtrn = true;
		}		
	
		return (bRtrn)
	}
