/* begin cim_set.js */

function get_campaign_var(){	
cv1=(typeof wa_queryObj.ppc_cid == "undefined") ? "" : wa_queryObj.ppc_cid;
cv2=(typeof wa_queryObj.cid == "undefined") ? "" : wa_queryObj.cid;
if (cv1){return cv1}else if (cv2){return cv2}else{return ""};
}

/* end cim_set.js */
	
	/*
   name - name of the cookie
   value - value of the cookie
   [expires] - expiration date of the cookie
     (defaults to end of current session)
   [path] - path for which the cookie is valid
     (defaults to path of calling document)
   [domain] - domain for which the cookie is valid
     (defaults to domain of calling document)
   [secure] - Boolean value indicating if the cookie transmission requires
     a secure transmission
   * an argument defaults when it is assigned null as a placeholder
   * a null placeholder is not required for trailing omitted arguments
*/
function setCookie(name, value, expires, path, domain, secure) {
  var curCookie = name + "=" + escape(value) +
      ((expires) ? "; expires=" + expires.toGMTString() : "") +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      ((secure) ? "; secure" : "");
  document.cookie = curCookie;
}
/*
  name - name of the desired cookie
  return string containing value of specified cookie or null
  if cookie does not exist
*/
function getCookie(name) {
  var dc = document.cookie;
  var prefix = name + "=";
  var begin = dc.indexOf("; " + prefix);
  if (begin == -1) {
    begin = dc.indexOf(prefix);
    if (begin != 0) return null;
  } else
    begin += 2;
  var end = document.cookie.indexOf(";", begin);
  if (end == -1)
    end = dc.length;
  return unescape(dc.substring(begin + prefix.length, end));
}

/*
   name - name of the cookie
   [path] - path of the cookie (must be same as path used to create cookie)
   [domain] - domain of the cookie (must be same as domain used to
     create cookie)
   path and domain default if assigned null or omitted if no explicit
     argument proceeds
*/

function deleteCookie (NameOfCookie) 
{
	if (getCookie(NameOfCookie)) {
	document.cookie = NameOfCookie + "=" +
	"; expires=Thu, 01-Jan-70 00:00:01 GMT";
	}
}

var key="",wa_familyID="PCC FamilyID ",wa_culture="";
wa_familyID=(typeof wa_queryObj.familyID == "undefined") ? "None" : wa_queryObj.familyID;  
wa_culture=(typeof wa_queryObj.culture == "undefined") ? "" : wa_queryObj.culture;  
var culture_cookie = getCookie('PCC.Culture');
var thepathandpage = Exceptions(location.pathname)
var default_org4 = "Unassigned"
var default_org5 = "Unassigned"
var default_orgX = default_org5 + "|" + thepathandpage
var org4=((typeof window.p_org4 == "undefined") || (!p_org4)) ? default_org4 : p_org4;
var orgX=((typeof window.p_org5 == "undefined") || (!p_org5)) ? default_orgX : p_org5 + "|" + thepathandpage;
var wa_pageName=thepathandpage
var wa_geo="asmo-na"
var wa_language="eng"
var wa_org1="CIM"
var wa_org2="applications"
var wa_org3="applications: product comparison chart"
var wa_org4=org4
var wa_orgX=orgX
var wa_urlQueryString=""
var wa_reportSuites="intelcorpcim,intelcorppcc"
var wa_ngipDocId=""
var wa_ngipUniqueId=""
var wa_campaign=(typeof wa_queryObj.ppc_cid == "undefined") ? "" : wa_queryObj.ppc_cid;
var wa_events="event5"
//If the cookie exists assign it's value, else use the culture code.
var wa_custom01=(!culture_cookie) ? wa_culture : culture_cookie;
var wa_custom02=wa_familyID
var wa_custom03=""
var wa_custom04=""
var wa_custom05=""
var wa_custom06=""
var wa_custom07=""
var wa_custom08=""
var wa_custom09=""
var wa_custom10=""
var wa_custom11=""
var wa_custom12=""
var wa_custom13=""
var wa_custom14=""
var wa_custom15=""
function Exceptions(pagename){
	// Capture all index pages as index.htm.
	// e.g. /support/chipsets/ should be renamed to /support/chipsets/index.htm
	pagename = pagename.replace(/(\/)$/, "/index.htm");
	return pagename;
}


