// JavaScript Document
function MyImage() {
	showPopWin('/mnmdx/index.php?ax=MyIMG',300,200,null);
 	return false;
}
function MyDataEmail(){
	emailwindow=dhtmlmodal.open('MyEmail','iframe','/mnmdx/index.php?ax=MyEmail','Mis Datos','width=300px,height=200px,center=1,resize=0,scrolling=0')
	emailwindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.forms[0] //Access first form inside iframe just for your reference
	var theemail=this.contentDoc.getElementById("emailfield") //Access form field with id="emailfield" inside iframe
	if (theemail.value.indexOf("@")==-1){ //crude check for invalid email
			alert("Please enter a valid email address")
			return false //cancel closing of modal window
	} else{ //else if this is a valid email
			document.getElementById("youremail").innerHTML=theemail.value
			return true //allow closing of window
		}
	}
}

function MyDataPass(){
	emailwindow=dhtmlmodal.open('MyPass','iframe','/mnmdx/index.php?ax=MyPass','Mis Datos','width=300px,height=200px,center=1,resize=0,scrolling=0')
	emailwindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.forms[0] //Access first form inside iframe just for your reference
	var theemail=this.contentDoc.getElementById("emailfield") //Access form field with id="emailfield" inside iframe
	if (theemail.value.indexOf("@")==-1){ //crude check for invalid email
			alert("Please enter a valid email address")
			return false //cancel closing of modal window
	} else{ //else if this is a valid email
			document.getElementById("youremail").innerHTML=theemail.value
			return true //allow closing of window
		}
	}
}
