function ClearText(str,mask)
// If the field is clicked on, this will remove the mask
	{
	if (str == mask) str = "";
	return str
	}
		
function ReplaceText(str,mask)
// If the masked field has been cleared, return the mask
	{
	if (str.value == "") 
		return mask
	else 
		return str.value
	}
	
	
function SelectRadioOption(RadioObj, ValueStr)
{
	var j=0; RadioObjLength = RadioObj.length; OptionSelected = false; 

	while (( j < RadioObjLength) && (!OptionSelected)) {
		if (RadioObj[j].value == ValueStr) {
			RadioObj[j].checked = true;
			OptionSelected = true;
		}
		j++;						
	}
}

function CheckAll(FormObj, Status)
{	
	var max = FormObj.length;
	if (typeof(max) == 'undefined'){
		FormObj.checked = Status
	}
	else
	{	
		for(var i=0; i<max; i++) FormObj[i].checked = Status;
	};
};

function IsChecked(CheckboxObj)
{
	var j=0; max = CheckboxObj.length; OptionSelected = false; 

	if (typeof(max) == 'undefined'){
		OptionSelected = CheckboxObj.checked;
	}
	else
	{	
		while (( j < max) && (!OptionSelected)) 
		{
			OptionSelected = CheckboxObj[j].checked;
			j++;						
		}
	};	
	
	return OptionSelected;
}