
function highlight(elementName)
{
	var defaultBgColor = "#ffffff";
	var defaultFgColor = "#000000";
	var defaultBorderColor = "#016FBA";
	var focusBorderColor = "#35FE26";
	
	for (var i = 0; i < getElement(elementName).length; i++)
	{
		var current = getElement(elementName)[i];
		
		current.onblur = function()
		{
			this.style.borderColor = defaultBorderColor;
		}
		
		current.onfocus = function ()
		{
			this.style.borderColor = focusBorderColor;
		}
	}
}

	
function HighlightFormInput()
{
	if (document.all)
	{
		highlight("INPUT");
		highlight("TEXTAREA");
		highlight("SELECT");
	}
}

function getElement(elementName)
{
	var value = document.getElementByTagName ? document.getElementByTagName(elementName) : document.all.tags(elementName);
	return value;
}


function ClientValidateLength(sender, args)
{
	if (args.Value.length > 100)
		args.IsValid = false;
	else
		args.IsValid = true;
}


function FocusFirstInput(elementid)
{
	document.getElementById(elementid).focus();
}