function Check_Code(code_value)
{
	
		var chk = xmlHttp_send_post("xmlHTTP_BE.php", "action=check_code&code_value=" + code_value);
	
	if(chk == "")
	{
	
		document.getElementById('error_msg').innerHTML="Please enter a valid promotional code."
	}
	else
	{
		
		document.getElementById("show_discount").style.display='block';
		document.getElementById("show_discount").style.visibility='visible';
		document.getElementById("code_value").value="valid";
		document.getElementById('error_msg').innerHTML="";
	}


}

function Check_Username(username)
{


		var chk = xmlHttp_send_post("xmlHTTP_BE.php", "action=check_user&username=" + username);
		
	if(chk != "")
	{
	
		document.getElementById('error_msg1').innerHTML="Username already exists."
		return chk;
	}
	else
	{
		
		document.getElementById('error_msg1').innerHTML="";
		return "false";
	}

}
function insert_transaction(page_name)
{

	var chk = xmlHttp_send_post("xmlHTTP_BE.php", "action=insert_tracking&page_name=" + page_name);

	return;
}
