function setCookie(name, value, path, domain, secure)
{
    expires = new Date("January 01, 2008 00:00:00");
    document.cookie= name + "=" + escape(value) +
        ((expires) ? "; expires=" + expires.toGMTString() : "") +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        ((secure) ? "; secure" : "");
}
function getSearchWords()
{
    //this function will get the search words out of the google refer url if not google it will
    //put in the url the user came from If this needs to be inhanced it can
    var fQuery, sQuery, sWords, sUrl;
    sUrl = document.referrer;
    sUrl = sUrl.toLowerCase();
    var pos=sUrl.indexOf("google");
    if (pos>=0)
    {
       fQuery = sUrl.split("&q=");
       sQuery = fQuery[1].split("&");
       sWords = sQuery[0];
       return("google " + sWords);
    }
    else
    {
         return(document.referrer);
    }
}

    sUrl = document.referrer;
    sUrl = sUrl.toLowerCase();
    sWords = getSearchWords();
    var pos=sUrl.indexOf("free-weight-loss-resources");
    if (pos<=0)
    {
        setCookie("SearchWords", getSearchWords());
        setCookie("Location", document.location );
    }






