var j=0; var flag=true;
while((j<document.forms.length))
	{
	var i=0;
	while ((i<document.forms[j].length))
		{		
		obj=document.forms[j].elements[i];
		if (obj.getAttribute('noFocus')!='yes')
			{
			if (obj.type!='hidden')
				if(obj.tagName=='INPUT') if(obj.type!='submit') if(obj.type!='button') 
					{
					if(obj.tagName!='SELECT') obj.onfocus=highlight;
					else obj.onmousedown=highlight;
					obj.onblur=revert;
					if (flag)
						{
						obj.select();
						obj.focus();
						flag=false;
						}
					}
			}
		i++;
		}
	j++;	
	}

function highlight()
	{
	var defaultValue=this.getAttribute('defaultValue');
	if (defaultValue) if (this.value==defaultValue) this.value='';
	this.style.border="1px solid #5c6c77";
	this.style.backgroundColor="#e4e4e4";
	}

function revert()
	{
	var defaultValue=this.getAttribute('defaultValue');
	if (defaultValue) if (this.value=='') this.value=defaultValue;
	this.style.border='';
	this.style.backgroundColor='';
	}