function DisplayYear()
{
	today = new Date();
	document.write( today.getFullYear() );	
}

		
function clearText(thefield)
{
	if (thefield.defaultValue==thefield.value)
		thefield.value = ""
} 

function onDisplayRightHandColumn( siteID )
{
	document.write( '<iframe frameborder=0 src="/ard/rhcl.asp?AID=' + siteID + '&Source=' + escape( document.location ) + '" scrolling=no width=100% height=100% allowtransparency="yes"></iframe>' );
}

function onQuickLogonSubmit()
{
	// This is cross browser safe code
	var	objEmail = document.getElementById( 'QuickLogon_emailAddress' );
	var objPassword = document.getElementById( 'QuickLogon_Password' );
	
	if ( objEmail.value.length == 0 )
	{
		alert( 'Please enter your Email address before continuing' );
		objEmail.focus();
		return false;
	}

	if ( objPassword.value.length == 0 ) 
	{
		alert( 'Please enter your Password before continuing' );
		objPassword.focus();
		return false;
	}

	return true;
}

function checkrequired(which)
	{
			var pass = true;
				
			if (document.images)
			{
			for ( i = 0; i < which.length; i++ )
			{
			var tempobj=which.elements[i]
			if (tempobj.name.substring(0,8)=="required")
			{
			if (((tempobj.type=="text" || tempobj.type == "textarea") && tempobj.value == '' ) || (tempobj.type.toString().charAt(0) == "s" && tempobj.selectedIndex == -1 ) ) 
			{
			pass = false;
			break
			}
		}
	}
	}
// Update: Added to include verification of the Image, does not use the "required" solution above!
	if ( document.getElementById( "VerificationCode" ).value == "" )
		pass = false;
		if (!pass)
		{	
			alert( "One or more of the required elements are not completed. Please complete them, then submit again!" )
			return false
			}
			else
			return true
		}
// Update: Function to reload the image verification image when called
	function onReloadVer()
		{
		document.getElementById( "VerificationImage" ).src = "/scripts/image_verification.asp?" + Math.random();
		}
