function signup()
{	
	//EMAIL VALIDATION
	var goodEmail 	= $F("email").match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\.info)|(\.sex)|(\.biz)|(\.aero)|(\.coop)|(\.museum)|(\.name)|(\.pro)|(\..{2,2}))$)\b/gi);
	apos		= $F("email").indexOf("@");
	dotpos		= $F("email").lastIndexOf(".");
	lastpos		= $F("email").length-1;
	var badEmail 	= (apos<1 || dotpos-apos<2 || lastpos-dotpos<2);

	if ($F("name")=="")
	{
		alert("Lütfen İsminizi Giriniz.");
		$("name").focus();
		return false;
	}
	else if (($F("email") == "") || (!goodEmail && badEmail))		
	{
		alert("Geçerli Bir Mail Adresi Girmediniz.");
		$("email").focus();
		return false;
	}
	//YOU MAY WANT TO CHANGE THE URL IN THE LINE BELOW
	var url = "newsletter_add.asp";
	var params='email='+$F("email")+'&name='+encodeURIComponent($F("name"));
	new Ajax.Request(url, {onComplete:showResponse, onException:showException, onFailure:showException, asynchronous:true, method:"post", evalScripts:false, postBody:params});
	$("submit").hide();

	function showResponse(req)
	{	
		if (req.responseText=="1" || req.responseText=="0")	//1. added to contacts	//2.already in contacts
		{
			alert("E-Posta listesine Eklendi.");
			$("submit").show();
			$("name").clear();
			$("email").clear();
		}
		if (req.responseText=="error")	
		{
			alert("Bir Hata İle Karşılaştı,Lütfen Tekrar Deneyiniz.");
			$("submit").show();
		}
	}
	function showException()
	{
		alert("Server ile Bağlantı Kurulamadı,Lütfen Tekrar Deneyiniz.");
		$("submit").show();
		$("name").clear();
		$("email").clear();
	}
}