function isEmpty(str)
{
	var ie = document.all;
	if(ie)
	{
		if(str=="")
			return true;
		var re = /(\S+)/gi;
		var t = re.test(str); 
		return !t;
	}
	else
	{
		if(str=="")	
			return true;
		return false;
	}
}

function isEmail(str)
{
	var tmp = str + "";
	if(tmp!="")
	{		
		var exclude=/[^@\-\.\[A-Za-z0-9]]|^[_@\.\-]|[\._\-]{2}|[@\.]{2}|(@)[^@]*\1/;				
		var check=/@[\w\-]+\./;
		var checkend=/\.[a-zA-Z]{2,3}$/;

		if(((tmp.search(exclude) != -1)||(tmp.search(check)) == -1)||(tmp.search(checkend) == -1))
			return false;	
	}
	return true;	
}