function SubContactUs()
{
	var url = 'contactus_process.php';
	var pars=Form.serialize('contactus_form');
	//alert(pars);
	$('ContactUsSub').innerHTML='<img src="images/indicator.gif">';
	var myAjax = new Ajax.Request(
	url,
	{
		method: 'post',
		parameters: pars,
		onComplete: ShowSubContactUs
	});
}
function ShowSubContactUs(originalRequest)
{
	var x=originalRequest.responseText;
	var output = x.split("|")
	if(output[1]==1)
	{
		//document.contactus_form.submit();
		$('DisplayMessage').innerHTML='<tr><td align="left" class="body_text2" colspan="2">Thank you for your interest in DC ADVOCATES. Someone will be contacting you in the next 24 hours.</td></tr>';
	}
	else
	{
	 	$('ContactUsSub').innerHTML=output[0];
	}
}

/*function SubContactUs()
{		
	//alert('here');
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	{
		alert ("Your browser does not support AJAX!");
		return;
	} 	
	 
	var form = $("form");  alert(form);
	var pars = form.serialize(); 
	var url = 'contactus_process.php?'+pars; alert(url);
	
	document.getElementById('ContactUsSub').innerHTML='<img src="images/indicator.gif">';
	
	xmlHttp.onreadystatechange=ShowSubContactUs;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
function ShowSubContactUs(originalRequest)
{
	if (xmlHttp.readyState==4)
	{ 		
		var x=xmlHttp.responseText; //alert(x);
		var output = x.split("|")
		if(output[1]==1)
		{
			//document.contactus_form.submit();
			document.getElementById('DisplayMessage').innerHTML='<tr><td align="left" class="body_text2" colspan="2">Thank you for your interest in DC ADVOCATES. Someone will be contacting you in the next 24 hours.</td></tr>';
		}
		else
		{
			document.getElementById('ContactUsSub').innerHTML=output[0];
		}
	}
}*/

function SubNewsletter()
{
	var url = 'subscribeme.php';
	var pars=Form.serialize('nsletter');
	//alert(pars)
	$('newsletterSub').innerHTML='<img src="images/indicator.gif">';
	var myAjax = new Ajax.Request(
	url,
	{
		method: 'post',
		parameters: pars,
		onComplete: ShowSubscribe
	});
}
function ShowSubscribe(originalRequest)
{
	var x=originalRequest.responseText;
	var output = x.split("|");	
	if(output[1]==1)
	{	
		$('newsletterSub').innerHTML='Thank you for subscribing.';
		$('subemail').value='email address';	
		$('fullname').value='name';	
	}
	else
	{
		$('newsletterSub').innerHTML=output[0];
	}
}
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;
}