<!--

var g_arrError = new Array()

/****************************************************************/
// Check whether string s is empty.

function isEmpty(s)
{   return ((s == null) || (s.length == 0))
}


/****************************************************************/
// Check whether string s is empty.

function isWhitespace( s ) 
{   
	var i;
	var whitespace = " \t\n\r";
	
    if (isEmpty(s)) return true;

    // Search through string's characters one by one
    // until we find a non-whitespace character.
    // When we do, return false; if we don't, return true.

    for (i = 0; i < s.length; i++) {   
		var c = s.charAt(i);
		if (whitespace.indexOf(c) == -1) return false;
    }
    return true;
}

function ValidateRequiredField( s, errMsg )
{
	
	var txtvalue = new String( s );
	var blSuccess = true
	
	if (txtvalue.length == 0)
		{
			blSuccess =  false;
		}
		
	if( isWhitespace( txtvalue ) ) 
		{
			blSuccess = false;
		} 
		
	if (!blSuccess)
		{
			g_arrError[g_arrError.length] = errMsg
		}
}



function preload() {
  if (!document.images) return;
  var ar = new Array();
  var arguments = preload.arguments;
  for (var i = 0; i < arguments.length; i++) {
    ar[i] = new Image();
    ar[i].src = arguments[i];
  }
}





function ValidateSummary()
{
	var strErrMsg, i
	var blSuccess = true
	
	if (g_arrError.length > 0)
		{
			blSuccess = false;
			strErrMsg = 'The following ';
			if (g_arrError.length > 1)
				{
					strErrMsg = strErrMsg  + ' error(s) occurred: \n\n';
				} else {
					strErrMsg = strErrMsg  + ' error occurred: \n\n';
				}
			for (i = 0; i < g_arrError.length; i++)
				{
					strErrMsg = strErrMsg + (i + 1) + '. ' +  g_arrError[i] + '\n';
				}
			
			strErrMsg = strErrMsg + '\n\nPlease correct these error(s) and try again.';
			alert(strErrMsg);

		}
	
	g_arrError = new Array();
	
	return blSuccess
}

-->