﻿var cookieValue = null;


try {


    cookieValue = GetCookie("ChYES_Visit");
   
}
catch (Exception) {
    cookieValue = null;
}

if (cookieValue == null || cookieValue == "") {
    setCookie("ChYES_Visit", "OK", 1);
    InsertVisite();
}

function setCookie(name, value, expiredays) {
    var today = new Date();
    today.setTime(today.getTime() + 1000 * 60 * 60 * 1);
    document.cookie = name + "=" + escape(value) + "; path=/; expires=" + today.toGMTString() + ";";

}

function InsertVisite() {
    $.ajax
        (
            {
                type: 'GET',
                url: 'ChyesVisit_Ajax.aspx',
                success: function(data) {                

                }
            }

        );
}
