﻿function greetOK()
{
    var item = $('input[@name=greet]:checked').val();   
    var loverId = $('#OnlyValue').val();
    var code = $('#tbValid2').val();
    $.ajax({
		url: '/lover/greet.aspx',
		data: 'item=' + item + '&loveId=' + loverId +"&code="+ code,
		type: 'post',
		cache: false,
		dataType: 'html',
		complete: function (xhr) 
		{
		    //alert(xhr.responseText);
	        if(xhr.responseText=="true")
	        {
	            $("#xiaoxi").slideUp("slow",function()
	            {
				    $('#popup_overlay').fadeOut(500 , function(){$.basics._overlay('hide');
		            alert("发送成功");});
				    $("#basic").remove();
			        $.basics._maintainPosition(false);
	            }); 
		    }
		    else
		    {
		        $("#div_message").html(xhr.responseText);
		        $("#div_message").slideDown(100);
		        //jbasicHide();
		        //alert(xhr.responseText);
		    }
		}
	});
}

function greetError(xhr)
{
	jbasicHide();
    alert(xhr.responseText);
}

