DataManager email prompt

function email(){
	var email=document.getElementsByName("val19238147")[0].value;
	top.location.href="mailto:"+email+"?subject=subject&body=body";
	document.mainform.submit();
}

function changeButton(name){
	var el=document.getElementById(name);
	if(el){
		el.type="button";
		top.noodle.cbc.addEventListener(el,"click",email);
	}
}

function doit(){
	changeButton("add");
	changeButton("addAnother");
	changeButton("update");
	top.noodle.core.logout_on_200=false;
}
setTimeout("doit();", 2000);