function opennewsletter(nro){
	
	
switch(nro){
case 1:
	modelo="TH104";
	break;
case 2:
	modelo="TH104BUS";
	break;
case 3:
	modelo="TH212";
	break;

//default: [sentencias];
}

emailwindow=dhtmlmodal.open('EmailBox', 'iframe', 'descargaManualv2.php?modelo='+nro, 'Descarga de Manual '+modelo, 'width=400px,height=170px,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 //Assign the email to a span on the page
		return true //allow closing of window
	}
}
} //End "opennewsletter" function

