	// Ultimate client-side JavaScript client sniff. Version 3.03
	// (C) Netscape Communications 1999-2001.  Permission granted to reuse and distribute.
	// Revised 17 May 99 to add is_nav5up and is_ie5up (see below).
	// Revised 20 Dec 00 to add is_gecko and change is_nav5up to is_nav6up
	//                      also added support for IE5.5 Opera4&5 HotJava3 AOLTV
	// Revised 22 Feb 01 to correct Javascript Detection for IE 5.x, Opera 4,
	//                      correct Opera 5 detection
	//                      add support for winME and win2k
	//                      synch with browser-type-oo.js
	// Revised 26 Mar 01 to correct Opera detection
	// Revised 02 Oct 01 to add IE6 detection

	// Everything you always wanted to know about your JavaScript client
	// but were afraid to ask. Creates "is_" variables indicating:
	// (1) browser vendor:
	//     is_nav, is_ie, is_opera, is_hotjava, is_webtv, is_TVNavigator, is_AOLTV
	// (2) browser version number:
	//     is_major (integer indicating major version number: 2, 3, 4 ...)
	//     is_minor (float   indicating full  version number: 2.02, 3.01, 4.04 ...)
	// (3) browser vendor AND major version number
	//     is_nav2, is_nav3, is_nav4, is_nav4up, is_nav6, is_nav6up, is_gecko, is_ie3,
	//     is_ie4, is_ie4up, is_ie5, is_ie5up, is_ie5_5, is_ie5_5up, is_ie6, is_ie6up, is_hotjava3, is_hotjava3up,
	//     is_opera2, is_opera3, is_opera4, is_opera5, is_opera5up
	// (4) JavaScript version number:
	//     is_js (float indicating full JavaScript version number: 1, 1.1, 1.2 ...)
	// (5) OS platform and version:
	//     is_win, is_win16, is_win32, is_win31, is_win95, is_winnt, is_win98, is_winme, is_win2k
	//     is_os2
	//     is_mac, is_mac68k, is_macppc
	//     is_unix
	//     is_sun, is_sun4, is_sun5, is_suni86
	//     is_irix, is_irix5, is_irix6
	//     is_hpux, is_hpux9, is_hpux10
	//     is_aix, is_aix1, is_aix2, is_aix3, is_aix4
	//     is_linux, is_sco, is_unixware, is_mpras, is_reliant
	//     is_dec, is_sinix, is_freebsd, is_bsd
	//     is_vms
	//
	// See http://www.it97.de/JavaScript/JS_tutorial/bstat/navobj.html and
	// http://www.it97.de/JavaScript/JS_tutorial/bstat/Browseraol.html
	// for detailed lists of userAgent strings.
	//
	// Note: you don't want your Nav4 or IE4 code to "turn off" or
	// stop working when new versions of browsers are released, so
	// in conditional code forks, use is_ie5up ("IE 5.0 or greater")
	// is_opera5up ("Opera 5.0 or greater") instead of is_ie5 or is_opera5
	// to check version in code which you want to work on future
	// versions.

    // convert all characters to lowercase to simplify testing
    var agt=navigator.userAgent.toLowerCase();

    // *** BROWSER VERSION ***
    // Note: On IE5, these return 4, so use is_ie5up to detect IE5.
    var is_major = parseInt(navigator.appVersion);
    var is_minor = parseFloat(navigator.appVersion);

    // Note: Opera and WebTV spoof Navigator.  We do strict client detection.
    // If you want to allow spoofing, take out the tests for opera and webtv.
    var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
                && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
    var is_nav2 = (is_nav && (is_major == 2));
    var is_nav3 = (is_nav && (is_major == 3));
    var is_nav4 = (is_nav && (is_major == 4));
    var is_nav4up = (is_nav && (is_major >= 4));
    var is_navonly      = (is_nav && ((agt.indexOf(";nav") != -1) ||
                          (agt.indexOf("; nav") != -1)) );
    var is_nav6 = (is_nav && (is_major == 5));
    var is_nav6up = (is_nav && (is_major >= 5));
    var is_gecko = (agt.indexOf('gecko') != -1);


    var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
    var is_ie3    = (is_ie && (is_major < 4));
    var is_ie4    = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
    var is_ie4up  = (is_ie && (is_major >= 4));
    var is_ie5    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
    var is_ie5_5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
    var is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
    var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
    var is_ie6    = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) );
    var is_ie6up  = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5);

    // KNOWN BUG: On AOL4, returns false if IE3 is embedded browser
    // or if this is the first browser window opened.  Thus the
    // variables is_aol, is_aol3, and is_aol4 aren't 100% reliable.
    var is_aol   = (agt.indexOf("aol") != -1);
    var is_aol3  = (is_aol && is_ie3);
    var is_aol4  = (is_aol && is_ie4);
    var is_aol5  = (agt.indexOf("aol 5") != -1);
    var is_aol6  = (agt.indexOf("aol 6") != -1);

    var is_opera = (agt.indexOf("opera") != -1);
    var is_opera2 = (agt.indexOf("opera 2") != -1 || agt.indexOf("opera/2") != -1);
    var is_opera3 = (agt.indexOf("opera 3") != -1 || agt.indexOf("opera/3") != -1);
    var is_opera4 = (agt.indexOf("opera 4") != -1 || agt.indexOf("opera/4") != -1);
    var is_opera5 = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);
    var is_opera5up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4);

    var is_webtv = (agt.indexOf("webtv") != -1);

    var is_TVNavigator = ((agt.indexOf("navio") != -1) || (agt.indexOf("navio_aoltv") != -1));
    var is_AOLTV = is_TVNavigator;

    var is_hotjava = (agt.indexOf("hotjava") != -1);
    var is_hotjava3 = (is_hotjava && (is_major == 3));
    var is_hotjava3up = (is_hotjava && (is_major >= 3));

    // *** JAVASCRIPT VERSION CHECK ***
    var is_js;
    if (is_nav2 || is_ie3) is_js = 1.0;
    else if (is_nav3) is_js = 1.1;
    else if (is_opera5up) is_js = 1.3;
    else if (is_opera) is_js = 1.1;
    else if ((is_nav4 && (is_minor <= 4.05)) || is_ie4) is_js = 1.2;
    else if ((is_nav4 && (is_minor > 4.05)) || is_ie5) is_js = 1.3;
    else if (is_hotjava3up) is_js = 1.4;
    else if (is_nav6 || is_gecko) is_js = 1.5;
    // NOTE: In the future, update this code when newer versions of JS
    // are released. For now, we try to provide some upward compatibility
    // so that future versions of Nav and IE will show they are at
    // *least* JS 1.x capable. Always check for JS version compatibility
    // with > or >=.
    else if (is_nav6up) is_js = 1.5;
    // NOTE: ie5up on mac is 1.4
    else if (is_ie5up) is_js = 1.3

    // HACK: no idea for other browsers; always check for JS version with > or >=
    else is_js = 0.0;

    // *** PLATFORM ***
    var is_win   = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
    // NOTE: On Opera 3.0, the userAgent string includes "Windows 95/NT4" on all
    //        Win32, so you can't distinguish between Win95 and WinNT.
    var is_win95 = ((agt.indexOf("win95")!=-1) || (agt.indexOf("windows 95")!=-1));

    // is this a 16 bit compiled version?
    var is_win16 = ((agt.indexOf("win16")!=-1) ||
               (agt.indexOf("16bit")!=-1) || (agt.indexOf("windows 3.1")!=-1) ||
               (agt.indexOf("windows 16-bit")!=-1) );

    var is_win31 = ((agt.indexOf("windows 3.1")!=-1) || (agt.indexOf("win16")!=-1) ||
                    (agt.indexOf("windows 16-bit")!=-1));

    var is_winme = ((agt.indexOf("win 9x 4.90")!=-1));
    var is_win2k = ((agt.indexOf("windows nt 5.0")!=-1));

    // NOTE: Reliable detection of Win98 may not be possible. It appears that:
    //       - On Nav 4.x and before you'll get plain "Windows" in userAgent.
    //       - On Mercury client, the 32-bit version will return "Win98", but
    //         the 16-bit version running on Win98 will still return "Win95".
    var is_win98 = ((agt.indexOf("win98")!=-1) || (agt.indexOf("windows 98")!=-1));
    var is_winnt = ((agt.indexOf("winnt")!=-1) || (agt.indexOf("windows nt")!=-1));
    var is_win32 = (is_win95 || is_winnt || is_win98 ||
                    ((is_major >= 4) && (navigator.platform == "Win32")) ||
                    (agt.indexOf("win32")!=-1) || (agt.indexOf("32bit")!=-1));

    var is_os2   = ((agt.indexOf("os/2")!=-1) ||
                    (navigator.appVersion.indexOf("OS/2")!=-1) ||
                    (agt.indexOf("ibm-webexplorer")!=-1));

    var is_mac    = (agt.indexOf("mac")!=-1);
    // hack ie5 js version for mac
    if (is_mac && is_ie5up) is_js = 1.4;
    var is_mac68k = (is_mac && ((agt.indexOf("68k")!=-1) ||
                               (agt.indexOf("68000")!=-1)));
    var is_macppc = (is_mac && ((agt.indexOf("ppc")!=-1) ||
                                (agt.indexOf("powerpc")!=-1)));

    var is_sun   = (agt.indexOf("sunos")!=-1);
    var is_sun4  = (agt.indexOf("sunos 4")!=-1);
    var is_sun5  = (agt.indexOf("sunos 5")!=-1);
    var is_suni86= (is_sun && (agt.indexOf("i86")!=-1));
    var is_irix  = (agt.indexOf("irix") !=-1);    // SGI
    var is_irix5 = (agt.indexOf("irix 5") !=-1);
    var is_irix6 = ((agt.indexOf("irix 6") !=-1) || (agt.indexOf("irix6") !=-1));
    var is_hpux  = (agt.indexOf("hp-ux")!=-1);
    var is_hpux9 = (is_hpux && (agt.indexOf("09.")!=-1));
    var is_hpux10= (is_hpux && (agt.indexOf("10.")!=-1));
    var is_aix   = (agt.indexOf("aix") !=-1);      // IBM
    var is_aix1  = (agt.indexOf("aix 1") !=-1);
    var is_aix2  = (agt.indexOf("aix 2") !=-1);
    var is_aix3  = (agt.indexOf("aix 3") !=-1);
    var is_aix4  = (agt.indexOf("aix 4") !=-1);
    var is_linux = (agt.indexOf("inux")!=-1);
    var is_sco   = (agt.indexOf("sco")!=-1) || (agt.indexOf("unix_sv")!=-1);
    var is_unixware = (agt.indexOf("unix_system_v")!=-1);
    var is_mpras    = (agt.indexOf("ncr")!=-1);
    var is_reliant  = (agt.indexOf("reliantunix")!=-1);
    var is_dec   = ((agt.indexOf("dec")!=-1) || (agt.indexOf("osf1")!=-1) ||
           (agt.indexOf("dec_alpha")!=-1) || (agt.indexOf("alphaserver")!=-1) ||
           (agt.indexOf("ultrix")!=-1) || (agt.indexOf("alphastation")!=-1));
    var is_sinix = (agt.indexOf("sinix")!=-1);
    var is_freebsd = (agt.indexOf("freebsd")!=-1);
    var is_bsd = (agt.indexOf("bsd")!=-1);
    var is_unix  = ((agt.indexOf("x11")!=-1) || is_sun || is_irix || is_hpux ||
                 is_sco ||is_unixware || is_mpras || is_reliant ||
                 is_dec || is_sinix || is_aix || is_linux || is_bsd || is_freebsd);

    var is_vms   = ((agt.indexOf("vax")!=-1) || (agt.indexOf("openvms")!=-1));
//--------------------------------------------------------------------------------------------------------

//--------------------------------------------------------------------------------------------------------
//	Form Validator Version 2.03
//
//	Date Created:		July 10, 2002
//	Last Modified:		February 25, 2003
//	Author: 			Jason Turim
//	Edited By: 			Nariman Haghighi
//	Compatibility: 		Internet Explorer 5.5 and higher (windows); 5.2 & higher (mac), Netscape 6 (win & linux),
// 	Notes:
//		Last tested under Netscape 6: August 18, 2002
//			- oDate.getYear() returns dates from 1900 in Netscape 6, so changed to getFullYear() compatible in both
//		Making compatible w/Mac ie 5.2
//		Added ability to specifiy valid, invalid values for string types... this functionality should replace
//		nvinvalidchars but we'll keep it in for backwards compatibility purposes....
//--------------------------------------------------------------------------------------------------------
var strBrowserInfo = "";
var bValidate = true;
if ( is_mac && agt.indexOf("5.2") != -1 )
	strBrowserInfo = "IE 5.2 or greater for mac";
if ( is_nav6up || (is_win && is_ie6up) )
	strBrowserInfo = "Navigator 6 or greater, or IE 6 or greater for windows";
if ( is_win && is_ie5_5 )
	strBrowserInfo = "IE 5.5 for windows";
if ( strBrowserInfo == "" )
{
	bValidate = false;
	strBrowserInfo = "Unsupported Browser: \nAgent=" + agt;
}

function GetElementAttribute(oEl, strAttrName)
{
	strRet = null;
	//mac ie 5.2
	if ( is_mac && agt.indexOf("5.2") != -1 )
	{
		if ( oEl.getAttribute(strAttrName) != "" )
		{
			strRet = oEl.getAttribute(strAttrName)
		}
		else
			strRet = null;
	}

	if ( is_win && is_ie5_5 )
	{
		strRet = oEl.getAttribute(strAttrName);
	}

	//netscape navigator v6 or greater
	//or
	//ie 5.5 or better
	if ( is_nav6up || (is_win && is_ie6up) )
	{
		if ( oEl.attributes.getNamedItem(strAttrName) != null )
			strRet = oEl.attributes.getNamedItem(strAttrName).nodeValue;
		else
			strRet = null;
	}

	return strRet;
}

function Error(strDescription, strMessage, strName)
{
	this.description = strDescription;
	this.message = strMessage;
	this.name = strName;
}

//value type constants
var STRING_VALUE   			= 1;
var NUMBER_VALUE   			= 2;
var DATE_VALUE				= 8;
var OPTIONAL_VALUE		  	= 5;
var INT_VALUE				= 12;
var FLOAT_VALUE				= 13;
var POSITIVE_INT_VALUE		= 14;
var NEGATIVE_INT_VALUE		= 15;
var POSITIVE_FLOAT_VALUE	= 16;
var NEGATIVE_FLOAT_VALUE	= 17;
var POSITIVE_NUMBER_VALUE	= 18;
var NEGATIVE_NUMBER_VALUE	= 19;
var EMAIL_VALUE				= 21;
var CUSTOM_VALUE			= 22;
var ZIPCODE					= 23;
var PHONE					= 24;
var BOOLEAN					= 25;
var URL						= 26;

//form element constants
var UNKNOWN_ELEMENT				= 0;
var RADIO_ELEMENT    			= 3;
var CHECKBOX_ELEMENT 	  		= 4;
var SELECT_ONE_ELEMENT   		= 6;
var SELECT_MULTIPLE_ELEMENT 	= 7;
var TEXT_ELEMENT				= 9;
var HIDDEN_ELEMENT				= 10;
var FILE_ELEMENT				= 11;

//whitespace charachters
var STR_WHITESPACE = " \t\n\r";
//--------------------------------------------------------------------------------------------------------


//--------------------------------------------------------------------------------------------------------
function GetExpectedValueType(oEl)
{
	var nvreq  = GetElementAttribute(oEl, 'nvreq'); //oEl.getAttribute('nvreq');
	var nvtype = GetElementAttribute(oEl, 'nvtype'); //oEl.attributes.getNamedItem('nvtype');

	if ( nvtype != null )
		nvtype = nvtype.toLowerCase();

	if ( nvreq == "0" )								//must use string comparison for netscape 6
	{
		if ( oEl.value.length == 0 || isNvtypeExempt(oEl) )
		{
			iRet = OPTIONAL_VALUE;
			return iRet;
		}	//else enforce expected type
	}

	if ( nvtype == "date" )
		iRet = DATE_VALUE;
	else if ( nvtype == "nnumber" )
		iRet = NEGATIVE_NUMBER_VALUE;
	else if ( nvtype == "pnumber" )
		iRet = POSITIVE_NUMBER_VALUE;
	else if ( nvtype == "number" )
		iRet = NUMBER_VALUE;
	else if ( nvtype == "nint" )
		iRet = NEGATIVE_INT_VALUE;
	else if ( nvtype == "pint" )
		iRet = POSITIVE_INT_VALUE;
	else if ( nvtype == "int" )
		iRet = INT_VALUE;
	else if ( nvtype == "nfloat" )
		iRet = NEGATIVE_FLOAT_VALUE;
	else if ( nvtype == "pfloat" )
		iRet = POSITIVE_FLOAT_VALUE;
	else if ( nvtype == "float" )
		iRet = FLOAT_VALUE;
	else if ( nvtype == "string" )
		iRet = STRING_VALUE;
	else if ( nvtype == "email" )
		iRet = EMAIL_VALUE;
	else if ( nvtype == "custom" )
		iRet = CUSTOM_VALUE;
	else if ( nvtype == "zipcode" )
		iRet = ZIPCODE;
	else if ( nvtype == "phone" )
		iRet = PHONE;
	else if ( nvtype == "boolean" )
		iRet = BOOLEAN;
	else if ( nvtype == "url" )
		iRet = URL;
	else
		iRet = UNKNOWN_ELEMENT;

	return iRet;
}
//--------------------------------------------------------------------------------------------------------


//--------------------------------------------------------------------------------------------------------
function GetElementType(oEl)
{
	var iRet;
	switch ( oEl.type.toLowerCase() ) //we can access native attributes using dot syntax across all browsers
	{
		case "radio":
			iRet = RADIO_ELEMENT;
			break;
		case "checkbox":
			iRet = CHECKBOX_ELEMENT;
			break;
		case "select-one":
			iRet = SELECT_ONE_ELEMENT;
			break;
		case "select-multiple":
			iRet = SELECT_MULTIPLE_ELEMENT;
			break;
		case "hidden":
			iRet = HIDDEN_ELEMENT;
			break;
		case "textarea":
		case "text":
			iRet = TEXT_ELEMENT;
			break;
		case "file":
			iRet = FILE_ELEMENT;
			break;
		default:
			iRet = UNKNOWN_ELEMENT;
			break;
	}

	return iRet;
}
//--------------------------------------------------------------------------------------------------------


//--------------------------------------------------------------------------------------------------------
function hasCorrectDecPlaces(oEl)
{	//Pre:  oEl.value is a valid float
	//Post: returns true iff oEl.value has same number of decimal places as nv_decimal_places
//	if ( GetElementAttribute(oEl, 'nvdecimal_places' ) == null ) //oEl.attributes.getNamedItem('nvdecimal_places') == null )
//		return true;

	var nvdecimal_places = GetElementAttribute(oEl, 'nvdecimal_places');
	if ( nvdecimal_places == null )
		return true;

	nvdecimal_places	 = parseInt(nvdecimal_places) //oEl.attributes.getNamedItem('nvdecimal_places').nodeValue);
	var num_places       = parseInt(oEl.value.length - oEl.value.indexOf(".") - 1);
	var bOk              = false;

	if ( !isNaN(nvdecimal_places) && (num_places >= 1))
	{
		oEl.setAttribute("nvdecimal_text", "["+nvdecimal_places+" dec. places]");
		bOk = (nvdecimal_places == num_places)
	}

	return bOk;
}
//--------------------------------------------------------------------------------------------------------


//--------------------------------------------------------------------------------------------------------
function inNumericRange(oEl)
{	//Pre:  oEl.value is a valid float, int, or number
	//Post: returns true iff nvlbound <= oEl.value <= nvubound

	//parse everything to float for comparison purposes
	var nvubound = GetElementAttribute(oEl, 'nvubound');
	if ( nvubound != null )
		nvubound = parseFloat(nvubound);

	var nvlbound = GetElementAttribute(oEl, 'nvlbound');
	if ( nvlbound != null )
		nvlbound = parseFloat(nvlbound);

	var value    = parseFloat(oEl.value);
	var bOk      = true;

	if ( !isNaN(nvlbound) && nvlbound != null )
	{	oEl.setAttribute("nvlboundtext", nvlbound + " <=");
		bOk = !(value < nvlbound);
	}

	if ( !isNaN(nvubound) && nvubound != null )
	{
		oEl.setAttribute("nvuboundtext", "<= "+nvubound);
		bOk = bOk && !(value > nvubound);
	}

	return bOk;
}
//--------------------------------------------------------------------------------------------------------


//--------------------------------------------------------------------------------------------------------
function inDateRange(oEl)
{
	//parse everything to date for comparison purposes
	var nvubound = GetElementAttribute(oEl, 'nvubound'); //Date.parse(oEl.getAttribute('nvubound'));
	if ( nvubound != null )
		nvubound = Date.parse(oEl.getAttribute('nvubound'));

	var nvlbound = GetElementAttribute(oEl, 'nvlbound'); //Date.parse(oEl.getAttribute('nvlbound'));
	if ( nvlbound != null )
		nvlbound = Date.parse(oEl.getAttribute('nvlbound'));

	var value    = Date.parse(oEl.value);
	var bOk      = true;
	var strRange = "";

	if ( !isNaN(nvlbound) && nvlbound != null )
	{	oTmpDate = new Date(nvlbound);
		strRange = ""+(oTmpDate.getMonth()+1)+"/"+oTmpDate.getDate()+"/"+oTmpDate.getFullYear()+ " <=";
		bOk      = !(value < nvlbound)

		oEl.setAttribute("nvlboundtext", strRange);
	}

	if ( !isNaN(nvubound)&& nvubound != null )
	{	oTmpDate = new Date(nvubound);
		strRange = "<= "+(oTmpDate.getMonth()+1)+"/"+oTmpDate.getDate()+"/"+oTmpDate.getFullYear();
		bOk      = bOk && !(value > nvubound)

		oEl.setAttribute("nvuboundtext", strRange);
	}

	return bOk;
}
//--------------------------------------------------------------------------------------------------------


//--------------------------------------------------------------------------------------------------------
function inRange(oEl)
{
	if ( GetExpectedValueType(oEl) == DATE_VALUE )
		return inDateRange(oEl);
	else
		return inNumericRange(oEl);
}
//--------------------------------------------------------------------------------------------------------


//--------------------------------------------------------------------------------------------------------
function ValidateElement(oEl, vElValue) //v from VB variant, the value can be any type, that's what we are trying to determine in this function
{
	var bOk = true;
	var iType = GetExpectedValueType(oEl)
	var vValue = "";
	if ( typeof(vElValue) != "undefined" )
		vValue = vElValue;
	else
		vValue = oEl.value;

	switch ( iType )
	{
		case OPTIONAL_VALUE:
			break;
		case STRING_VALUE:
			if ( !isValidString(oEl) )
				bOk = false;
			break;
		case NUMBER_VALUE:
			bOk = doCheckNumber(oEl);
			break;
		case NEGATIVE_NUMBER_VALUE:
			bOk = doCheckNumber(oEl) && ( vValue < 0 );
			break;
		case POSITIVE_NUMBER_VALUE:
			bOk = doCheckNumber(oEl) && ( vValue > 0 );
			break;
		case DATE_VALUE:
			bOk = !isNaN(Date.parse(vValue));
			bOk = bOk && inRange(oEl);
			break;
		case INT_VALUE:
			bOk = doCheckInt(oEl);
			break;
		case NEGATIVE_INT_VALUE:
			bOk = doCheckInt(oEl) && ( vValue < 0 );
			break;
		case POSITIVE_INT_VALUE:
			bOk = doCheckInt(oEl) && ( vValue > 0 );
			break;
		case FLOAT_VALUE:
			bOk = doCheckFloat(oEl);
			break;
		case NEGATIVE_FLOAT_VALUE:
			bOk = doCheckFloat(oEl) && ( vValue < 0 );
			break;
		case POSITIVE_FLOAT_VALUE:
			bOk = doCheckFloat(oEl) && ( vValue > 0 );
			break;
		case EMAIL_VALUE:
			if ( vValue.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) == -1 )
				bOk = false;
			break;
		case ZIPCODE:
			if ( !validateUSZip(vValue) )
				bOk = false;
			break;
		case PHONE:
			if ( !validateUSPhone(vValue) )
				bOk = false;
			else {
				oEl.value = formatValidUSPhone(vValue);
			}
			break;
		case BOOLEAN:
			if ( vValue != 1 && vValue != 0 && vValue.toLowerCase() != "true" && vValue.toLowerCase() != "false" )
				bOk = false;
			break;
		case URL:
			if ( !validateURL(vValue) )
				bOk = false;
			break;
		case CUSTOM_VALUE:
			var strCustFunction = GetElementAttribute(oEl, "nvcustom_function");
			if ( strCustFunction != null )
				bOk = eval(strCustFunction + "('" + oEl.id + "')");
			else
				throw new Error("nvtype = 'custom' was specified, however no 'nvcustom_function' attribute specified", "No Custom Function Specified", "Function ValidateElement(" + oEl.id + ")");
			break;
		case UNKNOWN_ELEMENT:
		default:
	}

	return bOk;
}
//--------------------------------------------------------------------------------------------------------

//--------------------------------------------------------------------------------------------------------
function doCheckNumber(oEl)
{
	var bOk   = true;
	var elVal = oEl.value;

	var strMsg = new String();

	strMsg = "doCheckNumber: " + elVal + "\n";
	if ( isNaN(elVal) || isWhitespace(elVal))
		bOk = false;
	strMsg += "isNaN(" + elVal + ") || isWhitespace(" + elVal + ") = " + bOk + "\n";

	if ( !inRange(oEl) )
		bOk = false;

	strMsg += "!inRange(oEl) = " + bOk;
	//alert(strMsg);
	return bOk;
}
//--------------------------------------------------------------------------------------------------------


//--------------------------------------------------------------------------------------------------------
function doCheckInt(oEl)
{
	var bOk = doCheckNumber(oEl);

	if ( oEl.value == parseInt(oEl.value) )
	{
		bOk = bOk && true;
		oEl.value = parseInt(oEl.value);
	}
	else
		bOk = false;

	return bOk;
}
//--------------------------------------------------------------------------------------------------------


//--------------------------------------------------------------------------------------------------------
function doCheckFloat(oEl)
{
	var bOk    = doCheckNumber(oEl);
	var dblVal = parseFloat(oEl.value);

	if ( dblVal == parseInt(oEl.value) )
		bOk = false;

	if ( !hasCorrectDecPlaces(oEl) )
		bOk = false;

	return bOk;
}
//--------------------------------------------------------------------------------------------------------


//--------------------------------------------------------------------------------------------------------
function validateUSZip( strValue )
{
	var objRegExp  = /(^\d{5}$)|(^\d{5}-\d{4}$)/;       //US postal code Ex. 99999 or 99999-9999
	return objRegExp.test(strValue);
}
//--------------------------------------------------------------------------------------------------------


//--------------------------------------------------------------------------------------------------------
function validateUSPhone( strValue )
{
	// *** Edited by Justin Liu ***
	// Phone validator will now support the following phone numbers:
	// 5666360
	// 566-6360
	// 566 6360
	// 566.6360
	// 9051234567
	// 905.123.4567
	// 905 123 4567
	// 905-123-4567
	// (905)123-4567
	// etc. etc.
	// If the phone number is valid, it will be formatted by the formatValidUSPhone function

    var objRegExp  = /^((\([1-9]\d{2}\)( )?)|([1-9]\d{2}([ \-.])?))?(\d{3}([ \-.])?\d{4}){1}$/;
    return objRegExp.test(strValue);
}
//--------------------------------------------------------------------------------------------------------

// *** formatValidUSPhone function added by Justin Liu - 12/19/2002 ***
//--------------------------------------------------------------------------------------------------------
function formatValidUSPhone( strValue )
{
	var objRegExp = /\d/;
	var strFormattedPhone = "";

	for ( i=0; i<= strValue.length-1; i++ ) {
		if ( objRegExp.test(strValue.charAt(i)) == true ) {
			strFormattedPhone += strValue.charAt(i);
		}
	}

	if ( strFormattedPhone.length == 7 ) {
		strFormattedPhone = strFormattedPhone.substring(0,3) + '-' + strFormattedPhone.substring(3,7);
	}
	else if ( strFormattedPhone.length == 10 ) {
		strFormattedPhone = '(' + strFormattedPhone.substring(0,3) + ')'
								+ strFormattedPhone.substring(3,6) + '-' + strFormattedPhone.substring(6,10);
	}
	return strFormattedPhone;
}
//--------------------------------------------------------------------------------------------------------

//--------------------------------------------------------------------------------------------------------
function validateURL( strValue )
{
	// *** edited by Justin Liu ***
	// URL Validator will now support the following kinds of URLs:
	// http://google.com
	// http://www.google.com
	// http://www.google.com/
	// http://www.google.com/directory/
	// http://www.google.com/index.asp
	// http://www.google.com/index.asp?querystring=variables&etc=etc
	// ftp://102.203.102.203
	// www.google.com
	// www.google.google.com

	var objRegExp = /^(http(s)?:\/\/|ftp:\/\/)?(([\-\w]+\.)+([\w]+){1})+(\/)?([\w\-~\%]+\/)*([\w\-\%]+\.[\w]{2,4}(\?[\w=&\%]+)?)?$/;
	return objRegExp.test(strValue);
}
//--------------------------------------------------------------------------------------------------------


//--------------------------------------------------------------------------------------------------------
function isValidString( oEl )
{
	var nvlength = GetElementAttribute(oEl, 'nvlength');
	var nvinvalidchars = GetElementAttribute(oEl, 'nvinvalidchars');
	var nvinvalidvalues = GetElementAttribute(oEl, 'nvinvalidvalues');
	var nvvalidvalues = GetElementAttribute(oEl, 'nvvalidvalues');

	var bOk = true;
	if ( isWhitespace(oEl.value) )
		bOk = false;
	else if ( (nvlength != null) && oEl.value.length > nvlength )
		bOk = false;
	else if ( (nvinvalidchars != null) && containsChars(oEl.value, nvinvalidchars) )
		bOk = false;
	else if ( (nvinvalidvalues != null) && containsStrings(oEl.value, nvinvalidvalues.split("|")) )
		bOk = false;
	else if ( (nvvalidvalues != null) && !containsStrings(oEl.value, nvvalidvalues.split("|")) )
		bOk = false;

	return bOk;
}
//--------------------------------------------------------------------------------------------------------

//--------------------------------------------------------------------------------------------------------
function containsStrings ( strValue, aValues)
{	//Post: returns true iff strValue contains any of the strins in the array aValues

    for (var i = 0; i < aValues.length; i++)
    {
        if (aValues[i] == strValue) return true;
    }

    return false;
}
//--------------------------------------------------------------------------------------------------------

//--------------------------------------------------------------------------------------------------------
function containsChars ( strValue, strChars)
{	//Post: returns true iff strValue contains any of the charachters in strChars

    for (var i = 0; i < strChars.length; i++)
    {
		var c = strChars.charAt(i);
        if (strValue.indexOf(c) != -1) return true;
    }

    return false;
}
//--------------------------------------------------------------------------------------------------------

//--------------------------------------------------------------------------------------------------------
function ValidateSelect(oEl)
{
	var bOk = true;
	nvinvalid = GetElementAttribute(oEl, 'nvinvalid');
	var iInvalid = ( nvinvalid != null ) ? nvinvalid : -1;

	if ( (oEl.selectedIndex < 0) || (oEl.options[oEl.selectedIndex].value == iInvalid) && GetExpectedValueType(oEl) != OPTIONAL_VALUE )
		bOk = false;
	else
		bOk = ValidateElement(oEl);

	return bOk;
}
//--------------------------------------------------------------------------------------------------------

//--------------------------------------------------------------------------------------------------------
function ValidateMultiSelect(oEl)
{
	var bRet = true;
	var nvinvalid = GetElementAttribute(oEl, 'nvinvalid');
	var iInvalid = ( nvinvalid != null ) ? nvinvalid : -1;

	if ( (oEl.selectedIndex < 0) )
		bRet = false;
	else
	{
		for ( var i = 0; i < oEl.options.length; i++ )
		{
			if ( oEl.options[i].selected )
			{
				if ( oEl.options[i].value == iInvalid )
				{
					bRet = false;
					break;
				}
				else
				{
					bRet = bRet && ValidateElement(oEl, oEl.options[i].value);
				}
			}
		}
	}

	return bRet;
}
//--------------------------------------------------------------------------------------------------------


//--------------------------------------------------------------------------------------------------------
function ValidateGroup(oEl)
{
	var bChecked = false;
	var oItems = document.getElementsByName(oEl.name);
	for ( var i = 0; i < oItems.length; i++ )
	{
		if ( oItems[i].checked == true )
		{
			bChecked = ValidateElement(oItems[i]);
			break;
		}
		else if ( GetExpectedValueType(oEl) == OPTIONAL_VALUE )
		{
			bChecked = true;
			continue;
		}
	}

	return bChecked;
}
//--------------------------------------------------------------------------------------------------------


//--------------------------------------------------------------------------------------------------------
function isEmpty(s)
{	//Post: returns true iff s is empty.
	return ((s == null) || (s.length == 0))
}
//--------------------------------------------------------------------------------------------------------


//--------------------------------------------------------------------------------------------------------
function isWhitespace (s)
{	//Post: returns true iff s is empty or whitepsace charachters only

    if (isEmpty(s)) return true;

    for (var i = 0; i < s.length; i++)
    {
        var c = s.charAt(i);
        if (STR_WHITESPACE.indexOf(c) == -1) return false;
    }

    return true;
}
//--------------------------------------------------------------------------------------------------------

//--------------------------------------------------------------------------------------------------------
//	Post: returns true if element is allowed to have nvtype=''
function isNvtypeExempt(oEl)
{
	var nvtype = GetElementAttribute(oEl, 'nvtype');
	if ( nvtype == "ignore" )
	{
		bRet = true;
	}
	else
	{
		bRet = ( GetElementType(oEl) == SELECT_ONE_ELEMENT )   ||
		   ( GetElementType(oEl) == SELECT_MULTIPLE_ELEMENT )  ||
		   ( GetElementType(oEl) == CHECKBOX_ELEMENT )  	   ||
		   ( GetElementType(oEl) == RADIO_ELEMENT )
	}

	return bRet;
}
//--------------------------------------------------------------------------------------------------------

//--------------------------------------------------------------------------------------------------------
//	Post: returns true if element is exempt from validation
function isExeptFromValidation(oEl)
{
	var nvtype = GetElementAttribute(oEl, 'nvtype');
	//	if input type is submit, reset, button, or nvtype is null or ignore ==> IGNORE VALIDATION
	if ( (oEl.type == "submit") || (oEl.type == "reset") || (oEl.type == "button") || (nvtype == null) || (nvtype == "ignore") )
		return true;

	if ( !isNvtypeExempt(oEl) && (nvtype == null) )
		throw new Error("'nvtype' must contain a valid type, unless you are validating select boxes, radio buttons, or checkboxes.\nElement[id:"+ oEl.id + "; name: " + oEl.name +"; type: " + oEl.type + "]", "Invalid NvType specified", "isExemptFromValidation(" + oEl.id + ")");

	return false;
}
//--------------------------------------------------------------------------------------------------------

//--------------------------------------------------------------------------------------------------------
function Validate(oForm)
{
	if ( !bValidate )
	{
		var strMsg = "";
		strMsg += "You are running an unsupported browser, the Business Solutions Group supports the following browsers:";
		strMsg += "\nWindows: Internet Explorer v5.5 and greater";
		strMsg += "\nLinux/Unix Netscape Navigator v6 and greater";
		strMsg += "\nMac Internet Explorer v5.2 and greater";
		strMsg += "\nBrowser Agent: " + agt;
		strMsg += "\n\nSorry for the inconvenience";

		alert(strMsg);
		return bValidate;
	}

	if ( oForm == null )
	{
		throw new Error("You must include a reference to the form you wish to validate", "No Form Specified", "Function Validate(oForm)");
		return false;
	}

	var bOk = true;
	var bElementOk = true;

	var strInvalidElementList = new String();
	var oEls = oForm.elements;
	var iLen = oEls.length;

	var strRadioList = new String();
	var strCheckBoxList = new String();

	var oEl = null;
	for ( var i = 0; i < iLen; i++ )
	{
		oEl = oEls.item(i);
		bElementOk = true;

		if (isExeptFromValidation(oEl))
			continue;

		if ( oEl.id == "" || oEl.name == "" )
		{
			throw new Error("Form elements that you wish to validate, must contain both a name and an id. \nElement["+ i +"] does not meet this criteria.", "Ambigous Element Definition", "Function Validate(" + oForm.Name + ")");
			return false;
		}

		switch ( GetElementType(oEl) )
		{
			case FILE_ELEMENT:
			case TEXT_ELEMENT:
			case HIDDEN_ELEMENT:
				if ( !ValidateElement(oEl) )
				{	oEl.setAttribute("nvfailed_validation", "true");
					strInvalidElementList += oEl.id + ";";

					bOk = false;
					bElementOk = false;
				} else
					bElementOk = true;

				break;
			case CHECKBOX_ELEMENT:
			case RADIO_ELEMENT:
				if ( !ValidateGroup(oEl) )
				{	oEl.setAttribute("nvfailed_validation", "true");

					if ( strRadioList.indexOf(oEl.name) < 0 )
					{
						strInvalidElementList += oEl.id + ";"
						strRadioList += oEl.name + "_";
					}

					bOk = false;
					bElementOk = false;
				} else
					bElementOk = true;

				break;
			case SELECT_ONE_ELEMENT:
				if ( !ValidateSelect(oEl) )
				{	oEl.setAttribute("nvfailed_validation", "true");
					strInvalidElementList += oEl.id + ";"

					bOk = false;
					bElementOk = false;
				} else
					bElementOk = true;

				break;
			case SELECT_MULTIPLE_ELEMENT:

				if ( !ValidateMultiSelect(oEl) )
				{   oEl.setAttribute("nvfailed_validation", "true");

					strInvalidElementList += oEl.id + ";"
					bOk = false;
					bElementOk = false;
				} else
					bElementOk = true;

				break;
			case UNKNOWN_ELEMENT:
			default:
				continue;
		} //switch

		if ( bElementOk && GetElementAttribute(oEl, "nvOriginalBackgroundColor") != null )
		{
			oEl.style.backgroundColor = GetElementAttribute(oEl, "nvOriginalBackgroundColor");

			//if the element is a radio or checkbox UN-highlight all elements in the group
			var iType = GetElementType(oEl);
			if ( (iType == RADIO_ELEMENT) || (iType == CHECKBOX_ELEMENT) )
			{
				var oElsTemp = document.getElementsByName(oEl.name);
				for ( var k = 0; k < oElsTemp.length; k++ )
				{
					oElsTemp[k].style.backgroundColor = GetElementAttribute(oEl, "nvOriginalBackgroundColor");;
				}
			}
			oEl.removeAttribute("nvOriginalBackgroundColor");
		}

	}	//for

	if ( !bOk )
		return strInvalidElementList;
	else
		return "";
}
//--------------------------------------------------------------------------------------------------------


function GetElementTypeString(iType)
{
	switch ( iType )
	{
		case FILE_ELEMENT:
			return "FILE_ELEMENT";
		case TEXT_ELEMENT:
			return "TEXT_ELEMENT";
		case HIDDEN_ELEMENT:
			return "HIDDEN_ELEMENT";
		case CHECKBOX_ELEMENT:
			return "CHECKBOX_ELEMENT";
		case RADIO_ELEMENT:
			return "RADIO_ELEMENT";
		case SELECT_ONE_ELEMENT:
			return "SELECT_ONE_ELEMENT";
		case SELECT_MULTIPLE_ELEMENT:
			return "SELECT_MULTIPLE_ELEMENT";
		case UNKNOWN_ELEMENT:
			return "UNKNOWN_ELEMENT";
			break;
		default:
			return "default";
	}
}

//--------------------------------------------------------------------------------------------------------
//change this function to do custom error processing by default just display an alert box
function DefaultValidate(oForm)
{
	var strIdList = new String();
	var showDebug = false;
	var bRet = true;
	var oAttr = null;

	try {
		strIdList = Validate(oForm); //call generic form validator
	} catch ( e ) {					 //an error is thrown when an unrecogized element type is encountered
		alert("Validator Error: \nBrowser Info: " + strBrowserInfo + "\n" + e.Name + "\n" + e.message + "\n" + e.description);
		bRet = false;
	}

	if ( GetElementAttribute(oForm, "nvsupress_message") == 1 )
		nvSupress = true;
	else
		nvSupress = false;

	if (strIdList.length > 0 )
	{
		if ( !nvSupress )
		{
			var bHighlight = true;
			var strHighlightColor = "#ffff99";
			var strVal = GetElementAttribute(oForm, "nvhighlight"); //oForm.attributes.getNamedItem("nvhighlight")
			if ( strVal != null)
				bHighlight = ( strVal == "on" ) ? true : false;

			strVal = GetElementAttribute(oForm, "nvhighlightcolor"); //oForm.attributes.getNamedItem("nvhighlightcolor")
			if ( strVal != null)
				strHighlightColor = strVal;

			//stuff element names into array
			var arErrorElements = strIdList.split(";");
			var strDisplay      = "The following fields contain empty or invalid data:\n";

			oAttr = GetElementAttribute(oForm, 'nverrorheader'); //oForm.attributes.getNamedItem("nverrorheader");
			if ( oAttr != null )
				strDisplay = oAttr+"\n";

			var strFocus        = new String();

			//build an alert message
			for ( var i = 0; i < arErrorElements.length - 1; i++ )
			{	oEl             = document.getElementById(arErrorElements[i]);
				var strErrorMsg = (GetElementAttribute(oEl, 'nvmsg') != null) ? GetElementAttribute(oEl, 'nvmsg') :
								                                      		 	   GetDetailedErrMsg(oEl);
				strDisplay     += "\n      * " + strErrorMsg;

				if ( (oEl.type.toLowerCase() != "hidden") && (strFocus.length == 0) )
					strFocus = "document.getElementById('"+ oEl.id +"').focus();";

				if ( bHighlight)
				{
					if ( GetElementAttribute(oEl, "nvOriginalBackgroundColor") == null )
					{
						AddAttributeToElement(oEl, "nvOriginalBackgroundColor", oEl.style.backgroundColor);
					}

					oEl.style.backgroundColor = strHighlightColor;

					//if the element is a radio or checkbox highlight all elements in the group
					var iType = GetElementType(oEl);
					if ( (iType == RADIO_ELEMENT) || (iType == CHECKBOX_ELEMENT) )
					{
						var oEls = document.getElementsByName(oEl.name);
						for ( var k = 0; k < oEls.length; k++ )
							oEls[k].style.backgroundColor = strHighlightColor;
					}
				}
			}
			strDisplay += "\n\nPlease complete the form and re-submit it."
			alert(strDisplay);


			try {						//set keyboard focus to the first element that had an error
				eval(strFocus);
			} catch ( e ) {}

			/*--------------- BEGIN: Debug Dump -------------------------------- */
			oAttr = GetElementAttribute(oForm, 'nvdebug'); //oForm.attributes.getNamedItem("nvdebug");
			if ( oAttr != null )
				showDebug = ( oAttr == "on" ) ? true : false;

			if (showDebug && confirm("Do you wish to see dump?"))
				printDebugInfo(oForm, e);
			/*--------------- END: Debug Dump ---------------------------------- */
		}

		bRet = false;
	}

	return bRet;
}
//--------------------------------------------------------------------------------------------------------

function AddAttributeToElement(oEl, strName, strValue)
{
	//mac ie 5.2
	if ( is_mac && agt.indexOf("5.2") != -1 )
	{
		//leave it alone...
	}

	if ( is_win && (is_ie5_5 || is_ie6up) )
	{
		oEl.setAttribute(strName, strValue, 0);
	}

	//netscape navigator v6 or greater
	//or
	//ie 5.5 or better
	if ( is_nav6up )
	{
		oEl.setAttribute(strName, strValue, 0);
	}
}

//--------------------------------------------------------------------------------------------------------
function GetFriendlyType(oEl)
{
	switch (GetElementAttribute(oEl, 'nvtype')) //oEl.attributes.getNamedItem("nvtype").nodeValue)
	{
		case "pfloat":
			return "decimals required";
		case "nfloat":
			return "negative number decimals required";
		case "float":
			return "decimals required";
		case "pint":
			return "positive integer";
		case "nint":
			return "negative integer";
		case "int":
			return "integer";
		case "number":
			return "number";
		case "pnumber":
			return "positive number";
		case "nnumber":
			return "negative number";
		case "zipcode":
			return "eg. #####";
		case "phone":
			return "eg. (###) ###-####";
		case "url":
			return "eg. http://www.nvidia.com";
		case "string":
				if ( GetElementAttribute(oEl, 'nvlength') != null )
					return oEl.attributes.getNamedItem("nvlength").nodeValue + " chars max";
				else
					return "";
		default:
			return "";
	}

	if ( GetElementAttribute(oEl, 'nvtype') == null )
		return "";
	else
		return GetElementAttribute(oEl, 'nvtype');
}
//--------------------------------------------------------------------------------------------------------

//--------------------------------------------------------------------------------------------------------
function GetFriendlyName( oEl )
{
	if ( GetElementAttribute(oEl, 'nvdisplay_name') != null )
		return GetElementAttribute(oEl, 'nvdisplay_name');

	var strTmp = oEl.name;
	var re     = /[A-Z,0-9]/;
	var strNew = new String();
	iPos       = strTmp.search(re);
	iLast      = 0;

	while ( iPos >= 0 )
	{
		if ( iPos > 0 && strNew != "")
			strNew += " ";

		strNew += strTmp.substring(iPos, iPos + 1);
		strTmp  = strTmp.substring(iPos + 1);
		iLast   = iPos;
		iPos    = strTmp.search(re);

		strNew += ( iPos < 0 ) ? strTmp : strTmp.substring(0, iPos);
	}

	return strNew;
}
//--------------------------------------------------------------------------------------------------------


//--------------------------------------------------------------------------------------------------------
function GetDetailedErrMsg(oEl)
{	var strResult = "";
	var strAppend = "";

	strResult = GetFriendlyName(oEl);

	if ( GetElementAttribute(oEl, 'nvlboundtext') != null )
		strAppend += GetElementAttribute(oEl, 'nvlboundtext') + " "

	strAppend += GetFriendlyType(oEl);
	//--------------------------------------------------------------
	//if float, check for decimal places error text
	var iType = GetExpectedValueType(oEl);
	switch ( iType )
	{
		case NEGATIVE_FLOAT_VALUE:
		case POSITIVE_FLOAT_VALUE:
		case FLOAT_VALUE:
			if ( GetElementAttribute(oEl, 'nvdecimal_text') != null )
				strAppend += GetElementAttribute(oEl, 'nvdecimal_text');
		case DATE_VALUE:
			strAppend += "[valid date]";
	}
	//--------------------------------------------------------------

	if ( GetElementAttribute(oEl, 'nvuboundtext') != null )
		strAppend += " "+ GetElementAttribute(oEl, 'nvuboundtext');

	if ( strAppend.length > 0 )
		strResult += " (" + strAppend + ") ";

	return strResult;
}
//--------------------------------------------------------------------------------------------------------


//--------------------------------------------------------------------------------------------------------
function printDebugInfo(oForm, e)
{
	var iLen     = oForm.elements.length;
	var oEls     = oForm.elements;
	var oEl      = null;
	var strDebug = new String();
	var strFont  = new String();

	strDebug = "<center><B> Error Info:</B></center><BR>";
	if ( e!= null )
		strDebug += "<li>" + e.name + "<BR><li>" + e.message + "<BR><li>" + e.Name;

	strDebug += "<font style='font-family:arial;font-size:12px'><center><b>Validator Dump</b><BR>Browser Info: " + strBrowserInfo + "</center><br>Below is a list of all elements being picked up, with list of vallid attributes. Elements marked in <font style='color:green'>green</font> passed validation, and those in <font style='color:red;font-weight:bold'>red</font> failed.<br><br>";
	for ( var i = 0; i < iLen; i++ )
	{
		oEl = oEls.item(i);
		strFont = (GetElementAttribute(oEl, 'nvfailed_validation') == "true") ? "<font style='font-weight:bold;color:red'>" : "<font style='color:green'>";
		strDebug += strFont+ "Element["+i+"] " + oEl.name +":<br>";

		for (var j=0; j<oEl.attributes.length; j++)
			if ( !isWhitespace(oEl.attributes[j].nodeValue) )
				strDebug += "["+oEl.attributes[j].nodeName+"="+oEl.attributes[j].nodeValue+"]<br>";

		strDebug += "<br></font>";
	}

	var oDoc = window.open("about:blank", "", "top=0,width=300,height=300,scrollbars=yes,resizable=yes").document;
	oDoc.writeln(strDebug);
}
//--------------------------------------------------------------------------------------------------------


//--------------------------------------------------------------------------------------------------------
//common mis-spellings
function validate(oForm)
{	return Validate(oForm);
}

function defaultValidate(oForm)
{	return DefaultValidate(oForm);
}

function defaultvalidate(oForm)
{	return DefaultValidate(oForm);
}

function StandardValidation(oForm)
{	return DefaultValidate(oForm);
}

function standardValidation(oForm)
{	return DefaultValidate(oForm);
}

function standardvalidation(oForm)
{	return DefaultValidate(oForm);
}
//--------------------------------------------------------------------------------------------------------