﻿// JScript File

	
	var xmlHttp1

	function NewsLetterSentEmail(str,p_strStory)
	{ 	
		 
		xmlHttp1=GetXmlHttpObject()
		if (xmlHttp1==null)
		{
			alert ("Browser does not support HTTP Request")
			return
		} 
		
		var url="./EmailNewsLetter.aspx";
		
		//alert(p_strStory);
		
		url=url+"?Name="+str+"&Email="+p_strStory;
     	
     	xmlHttp1.onreadystatechange=stateChanged1 
		
		xmlHttp1.open("GET",url,true)
		xmlHttp1.send(null)
	}

	function stateChanged1() 
	{ 
	    if (xmlHttp1.readyState==4 || xmlHttp1.readyState=="complete" )
		{ 
		    document.getElementById("divMessgeSent").innerHTML="";
		    document.getElementById("divMessgeSent").innerHTML=xmlHttp1.responseText 
		} 
	}
	
	function GetXmlHttpObject()
	{
		var xmlHttp=null;
		try
		{
			// Firefox, Opera 8.0+, Safari
			xmlHttp=new XMLHttpRequest();
		}
		catch (e)
		{
			// Internet Explorer
			try
			{
				xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch (e)
			{
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
		}
	return xmlHttp;
	}