<!--
// pick up cookies and fill in form values if present;

<!-- Pick up cookie values set in OptIn1.js (namesqueeze page script) and put them in usable variables -->
function GetTheValues ()
{

    pName = getCk("ckName");
    pEmail = getCk("ckEmail");
    pBigText = getCk("ckBigText");
    xTrackMe = getCk("ckTrackMe");
    pKeywordTheme = getCk("ckKeywordTheme");
    pTrackMe = "";


    // need to put correct tracking string into pTrackMe;


       
        // FOUND TRACKING COOKIES: cookies take precedence (in case I provide a method for people to update their cookies);
        if (xTrackMe != null) 
               {
                //debug;
                // alert("Found cookies = " + xTrackMe);
                pTrackMe = xTrackMe;
               }
           else               
               { 
                 // debug;
                 // alert("NO COOKIES FOUND - checking query string in ELSE statement");

                    // check for "q" parameter in query string;
                    var qs = new Querystring();
                    var GlennTrackMe = qs.get("q");

                    // if found q parameter, use that now, and reset the tracking cookies;                     
                    if (GlennTrackMe != null) 
                       {
                        // debug;
                        // alert("FOUND Q PARAMETER = " + GlennTrackMe + " so I'm setting pTrackMe to this value AND setting cookies for same");
                        pTrackMe = GlennTrackMe;
                        setCk('ckTrackMe', pTrackMe);	
                       }

                    // if no cookies AND no q parameter, set to all blanks;
                    if (GlennTrackMe == undefined) 
                       {
                        // debug;
                        // alert("NO COOKIES AND NO Q PARAMETER so I'm setting pTrackMe to PURE SPACES");
                         pTrackMe = "                                                     ";
                       }

               }


    // now parse the string which contains the values and put in separate variables;
    // note: if no cookies found and no query string "q" parameter, variables will each contain one blank space;
    
    pNewVsExistingMarket = pTrackMe.charAt(0);
    pProfitable = pTrackMe.charAt(1);
    pBusinessToBusiness = pTrackMe.charAt(2);
    pHowCompetitive = pTrackMe.charAt(3);
    pOwnVsControl = pTrackMe.charAt(4);
    pPPCSkillLevel = pTrackMe.charAt(5);
    pProgrammingSkill = pTrackMe.charAt(6);
    pHowDifficult = pTrackMe.charAt(7);
    pOwnsDefinitiveGuide = pTrackMe.charAt(8);
    pOwnsHCYM = pTrackMe.charAt(9);
    pOwnsCheckMate = pTrackMe.charAt(10);
    pOwnsBlackBelt = pTrackMe.charAt(11);
    pOwnsElite = pTrackMe.charAt(12);
    pCountry = pTrackMe.charAt(13);
    pNetworkMarketing = pTrackMe.charAt(14);
    pBizOpp = pTrackMe.charAt(15);

   // need DEFAULT values for each variable above (if null, set to default);

    //debug;
    debug = 0;
    if (debug == 1)
    {
      alert("xTrackMe Cookies Read = " + xTrackMe);
      alert("GlennTrackMe Query String = " + GlennTrackMe);
      alert("pTrackMe String to Process  = " + pTrackMe);    
    }


}

function GetFileName() 
{ 
var file_name = document.location.href; 
var end = (file_name.indexOf("?") == -1) ? file_name.length : file_name.indexOf("?"); 
return file_name.substring(file_name.lastIndexOf("/")+1, end); 
} 

//-->