function validmail() {
	var reg= /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})+$/;
	if (reg.test(document.getElementById('mail_left').value) == false) {
		window.alert("Invalid address");  
		return false;
	}
	return true;
}

function f_length(elId){
	var x = document.getElementById(elId).childNodes.length;
	var y = 0;
	for (i = 0; i < x.length;i++)
		if (x[i].nodeType == 1)
			y = y + 1;	
	return y;
}

