function formItemClick( obj, text, isMandatory )
{
	if( obj.value == text )
	{
		obj.value = '';
	}
	
	return ( isMandatory == null ) ? false : isMandatory; //pass through for validation
}

function formItemBlur( obj, text )
{
	if( obj.value == '' )
	{
		obj.value = text;
	}
}

function formValidate( obj )
{
	//the idea is to loop through all the input type=text's and click them to blank them if theyre defaulting
	var hasBlank = false;
	var prevValue = '';
	
	for( var counter=0; counter < obj.elements.length; counter++ )
	{
		o = obj.elements[counter];
		if( o.type == 'text' )
		{
			prevValue = o.value;
			if( o.onclick != null )
			{
				if( o.onclick() && ( o.value == "" ) )
				{
					hasBlank = true;
				}
			}

			if( o.onblur != null ) o.onblur();
		}
	}
	
	if( hasBlank )
	{
		alert( 'Please fill in all mandatory fields' );
	}
	
	return !hasBlank;
}

function menuFix()
{
	//this enables an iframe which makes the drop down menus appear over the flash's in firefox
	document.getElementById("fixframe").style.display = "block";
}