//update auto refresh meta tag urls in both entry and exit htm files

// ----Declare Variables Below----replace all ??? values below if applicable
var subx="http://www.crm-metrix.com/pgworld/clairol04/clairolretail/q/tscreen.asp";     //Submit exit.htm to
var subn="http://www.crm-metrix.com/pgworld/clairol04/clairolretail/q/cscreen.asp";	//Submit entry.htm to
var subn2="http://www.crm-metrix.com/pgworld/clairol04/clairolretail/q/mscreen.asp";	//Submit entry.htm to
var sweep="";   //Sweepstakes URL
var privacy="http://www.pg.com/privacy/english/privacy_notice.html";   //Privacy URL
var popstealthlogo="clairol_sm_logo.gif"; //This will be the logo that will display on popstelath.htm
var cookieexpire=6*24*30; //mention the number in hours eg: for 5 months you enter 5*30*24
var msgStealth="Please do not close this window!"; //If you want to display any text in stealth.htm, please initialize here.

//This is used for hit counter. See image tag before </body> tag. Replace ??? with the projectid.
//IF there is no entry or exit survey then leave the url blank.
var trackx="http://www.c-feedback.com/us/invitetrack.asp?project=exit_clairolretail";   //Exit Survey - Enter projectid
var trackn="http://www.c-feedback.com/us/invitetrack.asp?project=entry_clairolretail";  //Entry Survey - Enter projectid


document.title="Clairol.com:Consumer Insights";

//Parameters for Invitation Window
var heightx=360;
var widthx=580;
var xpos=20;
var ypos=20;



//-----------------------------------------------------FUNCTIONS---DO NOT EDIT BELOW THIS
function writeCookie(name, value, hours)
{
  var expire = "";
  if(hours != null)
  {
    expire = new Date((new Date()).getTime() + hours * 3600000);
    expire = "; expires=" + expire.toGMTString();
  }
  document.cookie = name + "=" + escape(value) + expire +";path=/;";
}

function readCookie(name)
{
  var cookieValue = "";
  var search = name + "=";
  if(document.cookie.length > 0)
  { 
    offset = document.cookie.indexOf(search);
    if (offset != -1)
    { 
      offset += search.length;
      end = document.cookie.indexOf(";", offset);
      if (end == -1) end = document.cookie.length;
      cookieValue = unescape(document.cookie.substring(offset, end))
    }
  }
  return cookieValue;
}


function GetParam(name)
{
  var start=location.search.indexOf("?"+name+"=");
  if (start<0) start=location.search.indexOf("&"+name+"=");
  if (start<0) return '';
  start += name.length+2;
  var end=location.search.indexOf("&",start)-1;
  if (end<0) end=location.search.length;
  var result=location.search.substring(start,end);
  var result='';
  for(var i=start;i<=end;i++) {
    var c=location.search.charAt(i);
    result=result+(c=='+'?' ':c);
  }
  return unescape(result);
}