function sendEcard(fromName, fromEmail, toName, toEmail){
	//alert(fromName + ", " +  fromEmail + ", " +  toName + ", " +  toEmail );
	
	
	/*if (air){
		var datastring = "fromEmail="+fromEmail+"&toEmail="+toEmail+"&fromName="+fromName+"&toName="+toName;
		alert(datastring);
		
		$.ajax({
		  type: "POST",
		  url: "/processForm.cfm",
		  data: dataString,
		  success: function() {
			sendResponse();
			
		  }
		});
		return false;
	} else {
	
	
	}
	*/
		var subject = "Create your own Brigade Kids ecard";
		var lb = "%0D%0A"; // line break
		var img = "<img src=" + '"file://C:\Users\Public\Pictures\Sample%20Pictures\Creek.jpg"' + ">";
		var message = "Sent by: " + fromName + " [" + fromEmail + "]" + lb + "----------------------------------" + lb + lb + "Hi " + toName + "," + lb + lb + "You can make your own ecard at: http://www.brigadekids.com/public/games/ecards.htm" ;
		window.location = "mailto:"+toEmail+"?subject="+subject+"&body="+message;
		
		setTimeout(sendResponse, 5000);
	
}


function sendResponse(){
	var game = getFlashMovie("gameswf");
	game.sendEcard("stuff"); 
	
	//alert("Your message has been sent.");
}

function getFlashMovie(movieName) {   
	 if (navigator.appName.indexOf("Microsoft") != -1) {
		 return window[movieName];
	 } else {
		 return document[movieName];
	 } 
}  

