// JavaScript Document
function getNewHttpObject() {
    var objType = false;
    try {
        objType = new ActiveXObject('Msxml2.XMLHTTP');
    } catch(e)  {
        try {
            objType = new ActiveXObject('Microsoft.XMLHTTP');
        } catch(e)  {
            objType = new XMLHttpRequest();
        }
    }
    return objType;
}

function SendDataToFlashMovie(MSG){
     var flashMovie=getFlashMovieObject("AXTMovie");
     flashMovie.SetVariable("/:MailMsg", MSG);
}


function sendmail(urlandparm){
	var fullurl = urlandparm;
	//alert(fullurl);
	var theHttpRequest = getNewHttpObject();
	theHttpRequest.onreadystatechange = function() {sendmaildone();};
	theHttpRequest.open("GET", fullurl);
	theHttpRequest.send(false);
		function sendmaildone(){
		   if (theHttpRequest.readyState == 4) {
			   if (theHttpRequest.status == 200) {
					 //SendDataToFlashMovie('TESTOK')
					 //alert('mail Sent!.')
							} else {
				   alert("<p><span class='redtxt'>Error!<\/span> HTTP request return the following status message:&nbsp;" + theHttpRequest.statusText +"<\/p>");
			   }
		   }
		}
}

