function DDXLen(control,minLen,maxLen,errmsg)
{
	var s = control.value;
	if ( s.length < minLen || s.length > maxLen ) 
	{
		self.status=errmsg;
		control.focus();
		control.select();
		alert(errmsg);
		return false;
	}
	return true;
}
	
function DDXInt(control,min,max,errmsg)
{
	var s = control.value;
	
	if ( isNaN (s,10)  )
	{
		self.status=errmsg;
		control.focus();
		control.select();
		alert(errmsg);
		return false;
	}
	
	if ( s.valueOf() < min || s.valueOf() > max )
	{
		self.status=errmsg;
		control.focus();
		control.select();
		alert(errmsg);
		return false;
	}
	return true;
}

function DDXEMail(control, errmsg)
{
	var s = control.value;
	var rE = /(\w)+(\w\.)*@.*\.\w+/;
	var mArr = s.match(rE);
	if (mArr == null) 
	{
		self.status=errmsg;
		control.focus();
		control.select();
		alert(errmsg);
		return false;
	}	

	return true;		
}

function DDXRExp(control, rE, errmsg)
{
	var s = control.value;
	var mArr = s.match(rE);
	if (mArr == null) 
	{
		self.status=errmsg;
		control.focus();
		control.select();
		alert(errmsg);
		return false;
	}	

	return true;		
}