function validate(validateList)
{
	var error = false; // we assume some thing is not filled
	var radio_groups 			= true;
	var checkbox_groups 		= true;
	var editbox_groups		 	= true;
	var dropdown_one_groups 	= true;
	var dropdown_multi_groups	= true;
	var validator;
	var iter;


	validator = (validateList != null);

	if(validator == true)
	{
		validator &= (validateList.length > 0);
	}
	else
	{
		return false;
	}

	for(iter =0; iter < validateList.length && validator == true; iter ++)
	{
		var obj = document.getElementsByName(validateList[iter]);
		if(obj.length > 0)
		{
			var checking;
			if(obj[0].type == 'radio')
			{// we check if one of the group is checked
				checking = false;
				for(var i=0; i < obj.length && checking == false  ; i++)
				{
					checking = obj[i].checked;
				}
				radio_groups &= checking;
			}
			else if(obj[0].type == 'text') // check for non blank or any specific words that should be in the edit box (like yes/no) in the validateon property
			{
				try
				{
					//checking = obj[0].validateon;
					if(obj[0].attributes["validateon"])
						checking = obj[0].attributes["validateon"].value;  
						
					if(checking == null || checking == 'undefined')
					{
						editbox_groups &= (obj[0].value != '' && obj[0].value != null ); //checking
					}
					else
					{
						editbox_groups &= (obj[0].value != '' && obj[0].value != null  ) && ( (checking.indexOf(obj[0].value) != -1 ) || obj[0].value.indexOf(checking) != -1 ) ;
					}
				}
				catch(ex)
				{
					validator = false;
				}

			}
			else if(obj[0].type == 'checkbox')
			{// we check if one of the group is checked
				checking = false;
				for(var i=0; i < obj.length && checking == false  ; i++)
				{
					checking = obj[i].checked;
				}
				checkbox_groups &= checking;
			}

			else if(obj[0].type == 'select-one')
			{
				try
				{
					//checking = obj[0].validateon;
					if(obj[0].attributes["validateon"])
						checking = obj[0].attributes["validateon"].value;  
						
					if(checking == null || checking == 'undefined')
					{
						dropdown_one_groups &= (obj[0].selectedIndex > 0  ); //checking
					}
					else
					{
						dropdown_one_groups &= (obj[0].value != checking );
					}
				}
				catch(ex)
				{
					validator = false;
				}


			}
			else if(obj[0].type == 'select-multiple')
			{
				dropdown_multi_groups &= (obj[0].selectedIndex > -1  ); //checking
			}

			else
			{
				validator = false;
				alert('unknown control type  to validate '+ obj[0].type );
			}

		}
		else
		{
			validator = false;

		}
	}

	error = radio_groups && checkbox_groups && editbox_groups && dropdown_one_groups && dropdown_multi_groups && validator;
	return error;
}