// This creates a XMLRequest (ActiveXObject) to be sent to the server
var XmlReq;
// This page returns the XML Response for the selected choice
var AjaxServerPageName = "AjaxDiscussionFeedback.aspx";

function CreateXmlReq()
{ 
     //var XmlReq=null
    if (window.XMLHttpRequest)
    {
        XmlReq=new XMLHttpRequest()
    }
    else if (window.ActiveXObject)
    {
        XmlReq=new ActiveXObject("Microsoft.XMLHTTP")
    }
    return XmlReq
       
  
}




function FetchDGContents()
{   
              
	var commentName = document.getElementById('ctl00_ContentPlaceHolder1_CommentName').value;
	var EmailID =document.getElementById('ctl00_ContentPlaceHolder1_CommentEmail').value;
	var Comments = document.getElementById('ctl00_ContentPlaceHolder1_Comment').value;
	var requestUrl = AjaxServerPageName + "?Name="+(commentName)+"&EmailID="+(EmailID)+"&Comments="+(Comments)+"";
	//alert(requestUrl);
	CreateXmlReq();
	
	if(XmlReq)
	{
	    
		XmlReq.onreadystatechange = HandleResponse;
		XmlReq.open("GET", requestUrl,  true);
		XmlReq.send(null);	
		
	     	
	}
	else
	{
	 alert ("Browser does not support HTTP Request")
	}
}

function HandleResponse()
{

    
	if(XmlReq.readyState == 4 || XmlReq.readyState=="complete")
	{
	   
		if(XmlReq.status == 200)
		{   	
		
		document.getElementById('commentTable').innerHTML = "<table width='100%' border='0' cellpadding='10' cellspacing='0' ><tr><td><font class='BlogThankYouMessage' align='left'><br /><br /><b>Thank you for the Comment.</b><br /><br />Thank you for posting your comment on <a class='BlogTitleWithName' href='http://wwww.myplaywin.com'>myplaywin.com</a> and being a part of our growing community, your comment should appear on the website shortly. In order to prevent abuse of the system, all comments are subject to moderation before they are made live on <a class='BlogTitleWithName' href='http://wwww.myplaywin.com'>myplaywin.com.</a>  So please be patient and not submit the same comment once again.<br /><br /><br />Your contribution to the <a class='BlogTitleWithName' href='http://wwww.myplaywin.com' class='BlogTitleWithName'>myplaywin.com.</a>  community is greatly appreciated.<br /><br />The Editor, <a class='BlogTitleWithName' href='http://wwww.myplaywin.com'>myplaywin.com.</a>   </font><br /><br /><br /><a href='Default.aspx' class='BlogTitleWithName'>Read more blogs </a><br/><br></td></tr></table>";
			
		}
		else
		{
			alert("There was a problem retrieving data from the server." );
		}
     }
     
}


