// i = mensaje de informacion
// e = mensaje de error
// (vacio) = mensaje de alerta
// PHP = ejecuta funcion de redireccion
function msgboxEnviarMail(MSG,type,PHP)
{
	window.addEvent
	('domready', 
		function() 
		{
			if( type == 'i' )
			{
				msgBox.info
				(MSG,
					{ 
					onComplete: 
						function(returnvalue)
						{
							if(returnvalue)
							{
								if( PHP != "" )
								{
									window.location=PHP;
								}
							}
						}
					}
				);
			}
			else
			
			if( type == 'e' )
			{
				msgBox.error
				(MSG,
					{ 
					onComplete: 
						function(returnvalue)
						{
							if(returnvalue)
							{
								if( PHP != "" )
								{
									window.location=PHP;
								}
							}
						}
					}
				);

			}
			else
			{
				msgBox.alert
				(MSG,
					{ 
					onComplete: 
						function(returnvalue)
						{
							if(returnvalue)
							{
								if( PHP != "" )
								{
									window.location=PHP;
								}
							}
						}
					}
				);
			}
	
		}
	);
}

