<!--//

function nl_signup(action) {
	var url = "_engine/update.php?action="
		+ action;
	var params = "nl_name="
		+ document.getElementById("nl_name").value
		+ "&nl_email="
		+ document.getElementById("nl_email").value;

	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null) {
		alert ("Browser does not support HTTP Request");
		return;
	}
	
	xmlHttp.open("POST",url,true);

	xmlHttp.onreadystatechange=function() {
	    if(xmlHttp.readyState==4) {
			document.getElementById("nl").innerHTML=xmlHttp.responseText;
		}
	}
	
	xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");

	xmlHttp.send(params);
}

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;
}

function name_fix() {
	if (document.getElementById("nl_name").value == "First Name") {
		document.getElementById("nl_name").value = "";
		document.getElementById("nl_name").style.color = "#000000";
	}
}
function email_fix() {
	if (document.getElementById("nl_email").value == "Email Address") {
		document.getElementById("nl_email").value = "";
		document.getElementById("nl_email").style.color = "#000000";
	}
}
function formtext(form,initval) {
	if (form.value == initval) {
		form.value = "";
		form.style.color = "#000000";
	}
	if (form.innerHTML == initval) {
		form.innerHTML = "";
		form.style.color = "#000000";
	}
}

function checkemail(userEmail) {
	email = userEmail.value;
	apos=email.indexOf("@");
	dotpos=email.lastIndexOf(".");
	
	if (apos<1||dotpos-apos<2) {
		alert("Please enter a valid email address!");
		return false;
	} else {
		return true;
	}
}

function checkblank(form) {
	content = form.value.length;
	if (content<1) {
		alert("This field is required in order to post a comment.");
		return false;
	}
}

//-->