/*
 * AMD Custom Script
 * Last Update by Ahmad @ 8:55 EST 1/18/2012
 * Version 6.94
 */
cvAMDWebProperties = "amd.com,amd.jp,amd.de,amd.com.cn,amd.com.tw,amd.com.hk,amd.co.jp,amdtaiwan.com.tw,amd64.co.kr,amdathlon.com,amdlive.com,amdcompare.com,amd-firefly.com,amd.ru,ati.com,ati.de,ati.jp,accelerateresults.com,graphics-scout.com,marketbuilder3.com,atiplushp.com,atipluslenovo.com,atiplus,amd64.org,amd-unleash.com,amd-bilder.de,entertainmentsimplified.com,amdassets.com,x86-64.org,amdquizzes.com,amdrewards.com,atistickers.com,lookbeyond.de,amdinfo.co.kr,amdchannel.com.cn,amdlivestrong.com,amdmotorsports.com,amdprocycling.com,amdsports.com,amdadvantage.com,amdsurveys.com,amdtaiwan.com,amd-member.com,akamai.net,outstart.com,amdvisionary.com,phx.corporate-ir.net,amd-site.com,en25.com,eloqua.com";	// AMD Web Properties
cvSearchEngines = ".abcsok.,.alicesuche.,.alltheweb.,.altavista.,.anonymouse.,.aol.,.aolrecherche.,.aolsearch.,.aolsvc.,.ask.,.baidu.,.biglobe.,.bing.,.centrum.,.chip.,.clix.,.cuil.,.daum.,.eniro.,.euroseek.,.excite.,.fireball.,.goo.,.google.,.googlesyndication.,.icq.,.infoseek.,.ixquick.,.kvasir.,.libero.,.live.,.livedoor.,.lycos.,.mail.,.msn.,.myway.,.naver.,.netscape.,.nifty.,.rambler.,.recherche.,.recherchet2.,.search.,.searchalot.,.seznam.,.startpagina.,.suche.,.szukaj.,.terra.,.tiscali.,.toile.,.ucweb.,.uol.,.vinden.,.virgilio.,.walla.,.yahoo.,.yandex.";	// Recognized Omniture Search Engines
cvDownloadExtentions = "run,msi,rpm,gz,tar,bz2,dmg,sit,gzip,patch,exe,zip,wav,mp3,wma,mov,mpg,avi,wmv,doc,pdf,xls,ppt,pps,csv,jpg,png,bmp,wmf,tif,docx,xlsx,pptx,cbr";	// File extensions to track as downloadable content
cvDriverExtensions = "run,msi,rpm,gz,tar,bz2,dmg,sit,gzip,exe,zip"; // File extensions to include for driver downloads
cvNonDownloadExtensions = "do,aspx,ashx,asp,jp,ru,it"; // File extensions to exclude for driver downloads
cvDriverDownloadDomains = ["support.amd.com","www2.ati.com","akamai.net"]; // array of AMD driver download domains

cvTLRsid = ""; //SearchCenter tab link tracking global var
cvSearchCenterElq = 0; //SearchCenter/Eloqua tracking
/* Set report suite ID dynamically based on domain */
function cfCheckRSID(cvURL) {
	var ReportSuiteID; //AR 3.8 define as local vs. global
	var cvCurrency = "USD";
	var cvHostName = cfUtility(cvURL,'server');
	if(((cvHostName == "server.amd.com") || (cvHostName == "global.amd.com")) && (cfParamValue(cvURL,'scrsid') || cfGetCookie('c_scrsid'))){ //searchcenter visit to eloqua page
		cvSearchCenterElq = 1;
	}

	if (cvHostName == "www.amd.com" || cvHostName == "amd.com" || cvHostName == "www2.amd.com") {
		if (cvURL.indexOf("/embedded/") != -1) {
			ReportSuiteID = "amdvembedded,amdvcom,amdvglobal";
		} else if ((cvURL.indexOf("server") != -1) || (cvURL.indexOf("opteron") != -1) || (cvURL.indexOf("oems") != -1)) {
			ReportSuiteID = "amdvother03,amdvcom,amdvglobal"; //amdvother03 = AMD Server
		} else if ((cvURL.indexOf("/vision/") != -1) || (cvURL.indexOf("amdvisionary.com") != -1)) { //AR 3.3 add amdvisionary.com
			ReportSuiteID = "amdvvision,amdvcom,amdvglobal";
		} else if (cvURL.indexOf("/fusion/") != -1) {
			ReportSuiteID = "amdvfusion,amdvcom,amdvglobal";
		} else {
			ReportSuiteID = "amdvcom,amdvglobal";
		}
	} else if (cvHostName == "wwwd.amd.com") {
		ReportSuiteID = "amdvembedded,amdvglobal";
	} else if (cvHostName == "game.amd.com") {
		ReportSuiteID = "amdvgame,amdvsites,amdvglobal";
	} else if ((cvHostName == "fpp.amd.com") || (cvHostName == "registration-fpp.amd.com")) {
		ReportSuiteID = "amdvfpp-global,amdvglobal";
		if (cvURL.indexOf("/en-us/") != -1) {
			ReportSuiteID = "amdvfpp-na," + ReportSuiteID;
		} else if ((cvURL.indexOf("en-gb") != -1) || (cvURL.indexOf("fr-fr") != -1) || (cvURL.indexOf("de-de") != -1) || (cvURL.indexOf("/it-it/") != -1) || (cvURL.indexOf("pl-pl") != -1) || (cvURL.indexOf("ru-ru") != -1) || (cvURL.indexOf("es-es") != -1)) {
			ReportSuiteID = "amdvfpp-emea," + ReportSuiteID;
		} else if ((cvURL.indexOf("pt-br") != -1) || (cvURL.indexOf("en-mx") != -1) || (cvURL.indexOf("es-mx") != -1)) {
			ReportSuiteID = "amdvfpp-la," + ReportSuiteID;
		} else if ((cvURL.indexOf("en-in") != -1) || (cvURL.indexOf("en-sa") != -1)) {
			ReportSuiteID = "amdvfpp-apac," + ReportSuiteID;
		}
	} else if ((cvHostName == "support.amd.com") || (cvHostName == "emailcustomercare.amd.com")) {
		ReportSuiteID = "amdvsupport,amdvglobal";
	} else if (cvHostName == "onlineservices.amd.com") {
		if (cvURL.indexOf("/icss/") != -1) {
			ReportSuiteID = "amdvsupport,amdvglobal";
		}
	} else if (cvHostName == "sites.amd.com") {
		if (cvURL.indexOf("/microsoft/") != -1) {
			ReportSuiteID = "amdvmicrosoft,amdvsites,amdvglobal";
		} else if (cvURL.indexOf("/game/") != -1) {
			ReportSuiteID = "amdvgame,amdvsites,amdvglobal";
		} else if (cvURL.indexOf("/shop-amd/") != -1) {
			ReportSuiteID = "amdvshop,amdvsites,amdvglobal";
		} else if (cvURL.indexOf("/underground/") != -1) {
			ReportSuiteID = "amdvunderground,amdvsites,amdvglobal";
		} else if ((cvURL.indexOf("server") != -1) || (cvURL.indexOf("opteron") != -1) || (cvURL.indexOf("oems") != -1) || (cvURL.indexOf("partners") != -1)) { 
			ReportSuiteID = "amdvother03,amdvsites,amdvglobal"; //amdvother03 = AMD Server
		} else if (cvURL.indexOf("/business/") != -1) {
			ReportSuiteID = "amdvbusiness,amdvsites,amdvglobal";
		} else if ((cvURL.indexOf("/vision/") != -1) || (cvURL.indexOf("amdvisionary.com") != -1)) { //AR 3.3 add amdvisionary.com
			ReportSuiteID = "amdvvision,amdvsites,amdvglobal";
		} else {
			ReportSuiteID = "amdvsites,amdvglobal";
		}
	} else if (cvHostName == "blogs.amd.com") {
		if (cvURL.indexOf("/developer") != -1) {
			ReportSuiteID = "amdvdev,amdvblogs,amdvglobal";
		} else {
			ReportSuiteID = "amdvblogs,amdvglobal";
		}
	} else if (cvHostName == "developer.amd.com" || cvHostName == "media.amddevcentral.com" || cvHostName == "download-developer.amd.com") {
		ReportSuiteID = "amdvdev,amdvglobal";
	} else if (cvHostName == "shop.amd.com" || cvHostName == "wheretobuy.amd.com") {
		if (cvURL.indexOf('wheretobuy.amd.com/game') != -1) {
			ReportSuiteID = "amdvgame,amdvglobal";
		} else {
			ReportSuiteID = "amdvshop,amdvglobal";
		}
	} else if (cvHostName == "forums.amd.com") {
		if (cvURL.indexOf("forums.amd.com/devforum") != -1) {
			ReportSuiteID = "amdvdev,amdvforums,amdvglobal";
		} else if (cvURL.indexOf("forums.amd.com/devblog") != -1) {
			ReportSuiteID = "amdvdev,amdvblogs,amdvforums,amdvglobal";
		} else if (cvURL.indexOf("forums.amd.com/forum") != -1) {
			if (typeof(cvIsDevforum) !== 'undefined') {
				if (cvIsDevforum == "yes") {
					ReportSuiteID = "amdvdev,amdvforums,amdvglobal";
				}
			} else {
				ReportSuiteID = "amdvforums,amdvglobal";
			}
		} else if (cvURL.indexOf("forums.amd.com/game") != -1) {
			ReportSuiteID = "amdvgame,amdvforums,amdvglobal";
		} else {
			ReportSuiteID = "amdvforums,amdvglobal";
		}
	} else if (cvHostName == "www.amd-site.com") {
		ReportSuiteID = "amdvglobal";
	} else if (cvHostName == "amd.com.cn" || cvHostName == "www.amd.com.cn" || cvHostName == "game.amd.com.cn") {
	//AR 3.4 added game.amd.com.cn
		ReportSuiteID = "amdvglobal";
	} else if (cvHostName == "phx.corporate-ir.net" || cvHostName == "ir.amd.com") { 
		ReportSuiteID = "amdvother05,amdvglobal"; //AR 3.6 added amdvother05 (AMD IR)
	} else if (cvHostName == "web.amd.com") {
		if (cvURL.indexOf("/underground/generator") != -1) {
			ReportSuiteID = "amdvcollateral,amdvglobal";
		} else {
			ReportSuiteID = "amdvglobal";
		}
	} else if (cvHostName == "retailads.amd.com") {
		ReportSuiteID = "amdvretailads,amdvglobal";
	} else if (cvHostName == "products.amd.com") {
		ReportSuiteID = "amdvproducts,amdvglobal";
	} else if (cvHostName == "search.amd.com") {
		ReportSuiteID = "amdvother02,amdvglobal";
	} else if (cvHostName == "cmp.amd.com") {
		ReportSuiteID = "amdvcmp01";
	} else if (cvHostName == "shop-qa.amd.com" || cvHostName == "shop-auth.amd.com" || cvHostName == "shop-sit.amd.com" || cvHostName == "shopcontent-auth.amd.com" || cvHostName == "shop-new.amd.com" || cvHostName == "shopapp-sit.amd.com" || cvHostName == "shop-preprod.amd.com" || cvHostName == "shopcontent-auth-sit.amd.com" || cvHostName == "shopcontent-auth-dit.amd.com" || cvHostName == "shopapp-dit.amd.com" || cvHostName == "shop-dit.amd.com" || cvHostName == "shopapp-design.amd.com") {
		ReportSuiteID = "amdvtest-fd";
	} else if (cvHostName == "amd.outstart.com") { 
		ReportSuiteID = "amdvsalesedge";
	} else if (cvHostName == "server.amd.com") { 
			ReportSuiteID = "amdvother03"; //amdvother03 = AMD Server
	} else if (cvHostName == "global.amd.com") { 
			ReportSuiteID = "amdverror";
	} else if ((cvHostName.indexOf("-auth.amd.com") !=-1) || (cvHostName.indexOf("-prod.amd.com") !=-1) || (cvHostName.indexOf("localhost") !=-1)) { 
		ReportSuiteID = "amdvtest"; 
	} else {
		ReportSuiteID = "amdvother,amdvglobal";
	}

	if (ReportSuiteID.indexOf("amdvtest") == -1) {
		/* Adding AMD Regional Accounts */
		if ((cvURL.indexOf("/cn/") != -1) || (cvURL.indexOf(".cn") != -1) || (cvURL.indexOf("querycn.php") != -1)) {
			ReportSuiteID = "amdvregions-cn," + ReportSuiteID;	// AMD China
			cvCurrency = "CNY";
		} else if (cvURL.indexOf("/jp/") != -1) {
			ReportSuiteID = "amdvregions-jp,amdvmegaregion-apac," + ReportSuiteID;	// AMD Japan
			cvCurrency = "JPY";
		} else if (cvURL.indexOf("/kr/") != -1) {
			ReportSuiteID = "amdvregions-kr,amdvmegaregion-apac," + ReportSuiteID;	// AMD Korea
			cvCurrency = "KRW";
		} else if (cvURL.indexOf("/tw/") != -1) {
			ReportSuiteID = "amdvregions-tw,amdvmegaregion-apac," + ReportSuiteID;	// AMD Taiwan
			cvCurrency = "TWD";
		} else if (cvURL.indexOf("/sg/") != -1) {
			ReportSuiteID = "amdvregions-sg,amdvmegaregion-apac," + ReportSuiteID;	// AMD Singapore
			cvCurrency = "SGD";
		} else if (cvURL.indexOf("/au/") != -1) {
			ReportSuiteID = "amdvregions-au,amdvmegaregion-apac," + ReportSuiteID;	// AMD Australia
			cvCurrency = "AUD";
		} else if (cvURL.indexOf("/my/") != -1) {
			ReportSuiteID = "amdvregions-my,amdvmegaregion-apac," + ReportSuiteID;	// AMD Malaysia
			cvCurrency = "MYR";
		} else if (cvURL.indexOf("/in/") != -1) {
			ReportSuiteID = "amdvregions-in,amdvmegaregion-apac," + ReportSuiteID;	// AMD India
			cvCurrency = "INR";
		} else if ((cvURL.indexOf("/de/") != -1) ||(cvURL.indexOf("de-de") != -1)) {
			ReportSuiteID = "amdvregions-de,amdvmegaregion-emea," + ReportSuiteID;	// AMD Germany
		} else if ((cvURL.indexOf("/us/") != -1) || (cvURL.indexOf("en-us") != -1) || (cvURL.indexOf("en-na") != -1)) {
			ReportSuiteID = "amdvregions-us,amdvmegaregion-na," + ReportSuiteID;	// AMD North America (English)
		} else if ((cvURL.indexOf("/la/") != -1) || (cvURL.indexOf("es-la") != -1)) {
			ReportSuiteID = "amdvregions-la,amdvmegaregion-la," + ReportSuiteID;	// AMD Latin America (Espanol)
		} else if ((cvURL.indexOf("/br/") != -1) || (cvURL.indexOf("pt-br") != -1)) {
			ReportSuiteID = "amdvregions-br,amdvmegaregion-la," + ReportSuiteID;	// AMD Brazil (Portugues)
			cvCurrency = "BRL";
		} else if ((cvURL.indexOf("/uk/") != -1) || (cvURL.indexOf("en-gb") != -1)) {
			ReportSuiteID = "amdvregions-uk,amdvmegaregion-emea," + ReportSuiteID;	// AMD United Kingdom (English)
			cvCurrency = "GBP";
		} else if ((cvURL.indexOf("/es/") != -1) || (cvURL.indexOf("es-es") != -1)) {
			ReportSuiteID = "amdvregions-es,amdvmegaregion-emea," + ReportSuiteID;	// AMD Spain (Espanol)
		} else if ((cvURL.indexOf("/fr/") != -1) || (cvURL.indexOf("fr-fr") != -1)) {
			ReportSuiteID = "amdvregions-fr,amdvmegaregion-emea," + ReportSuiteID;	// AMD France (Francais)
		} else if ((cvURL.indexOf("/it/") != -1) || (cvURL.indexOf("it-it") != -1)) {
			ReportSuiteID = "amdvregions-it,amdvmegaregion-emea," + ReportSuiteID;	// AMD Italy (Italiano)
		} else if ((cvURL.indexOf("/pl/") != -1) || (cvURL.indexOf("pl-pl") != -1)){
			ReportSuiteID = "amdvregions-pl,amdvmegaregion-emea," + ReportSuiteID;	// AMD Poland (Polski)
			cvCurrency = "PLN";
		} else if ((cvURL.indexOf("/ru/") != -1) || (cvURL.indexOf("ru-ru") != -1)){
			ReportSuiteID = "amdvregions-ru,amdvmegaregion-emea," + ReportSuiteID;	// AMD Russia (Russian)
			cvCurrency = "RUB";
		} else if (cvURL.indexOf("/tr/") != -1) {
			ReportSuiteID = "amdvregions-tr,amdvmegaregion-apac," + ReportSuiteID;	// AMD Turkey (Turkce)
			cvCurrency = "TRY";
		} else if (cvURL.indexOf("/se/") != -1) {
			ReportSuiteID = "amdvregions-se,amdvmegaregion-emea," + ReportSuiteID;	// AMD Sweden (Nordic)
			cvCurrency = "SEK";
		} else if (cvURL.indexOf("/hk/") != -1) {
			ReportSuiteID = "amdvregions-hk,amdvmegaregion-apac," + ReportSuiteID;	// AMD Hong Kong (English)
			cvCurrency = "HKD";
		} else if ((cvURL.indexOf("/en-mx/") != -1) || (cvURL.indexOf("/es-mx/") != -1)) {
			ReportSuiteID = "amdvmegaregion-la," + ReportSuiteID;	// AMD Mexico (English & Spanish)
			cvCurrency = "MXN";
		}
	}

	/* SearchCenter mappings */
	if(cfParamValue(cvURL,'scrsid')){
		var cvRsid="";
		var cvRsidVal = cfParamValue(cvURL,'scrsid');
		if (cvRsidVal=='na') cvRsid='amdvmegaregion-na';
		else if (cvRsidVal=='la') cvRsid='amdvmegaregion-la';
		else if (cvRsidVal=='emea') cvRsid='amdvmegaregion-emea';
		else if (cvRsidVal=='apac') cvRsid='amdvmegaregion-apac';
		else if (cvRsidVal=='cn') cvRsid='amdvregions-cn';
		else cvRsid="";
		if (ReportSuiteID.indexOf(cvRsid) == -1) ReportSuiteID = 'amdvcmp03,' + cvRsid + ',' + ReportSuiteID; //amdvcmp03 = Adobe SearchCenter
		else ReportSuiteID = 'amdvcmp03,' + ReportSuiteID;
		//setCookie
		cfSetCookie('c_scrsid',cvRsid,30);
	} else {
		//check for cookie and get value
		cvRsid = cfGetCookie('c_scrsid') || "";
		if ((cvRsid != "") && (ReportSuiteID.indexOf(cvRsid) == -1)) ReportSuiteID = 'amdvcmp03,' + cvRsid + ',' + ReportSuiteID; //amdvcmp03 = Adobe SearchCenter
		//else if ((cvRsid != "") && (ReportSuiteID.indexOf(cvRsid) != -1)) ReportSuiteID = 'amdvcmp03,' + ReportSuiteID; //amdvcmp03 = Adobe SearchCenter
	}
	cvTLRsid = cvRsid; //assign to global var

	/* SearchCenter cookie functions BOF */
	function cfSetCookie(c_name,value,exdays) {
		var exdate=new Date();
		exdate.setDate(exdate.getDate() + exdays);
		var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
		document.cookie=c_name + "=" + c_value + ";path=/;domain=" + cfUtility(cvURL,'domain');;
	}
	
	function cfGetCookie(c_name) {
		var i,x,y,ARRcookies=document.cookie.split(";");
		for (i=0;i<ARRcookies.length;i++)
		{
		  x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
		  y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
		  x=x.replace(/^\s+|\s+$/g,"");
		  if (x==c_name)
			{
			return unescape(y);
			}
		  }
	}
	/* SearchCenter cookie functions EOF */

	ReportSuiteID = ReportSuiteID.toLowerCase();
	if ((ReportSuiteID.indexOf("amdvmegaregion-emea") != -1) && cvCurrency =="USD") cvCurrency = "EUR";
	return [ReportSuiteID,cvCurrency];
}

	/* SearchCenter tab link tracking BOF */
	function tabLinkCode(obj) {
		if (cvTLRsid != '') {
			var s=s_gi(cvTLRsid);
			s.linkTrackVars='events';
			s.linkTrackEvents='event97';
			s.events='event97';
			s.tl(obj,'o','');
		}
	}
	/* SearchCenter tab link tracking  EOF */
/* ShareThis BOF */
function trackWithOmniture (event,service) {
	eVar54 = event+": "+service; //only event type "click" is supported; the service shared by user. e.g. facebook
}
if (typeof stLight != "undefined") {
	if (typeof stLight.subscribe === "function"){
		stLight.subscribe("click",trackWithOmniture); //register the callback function with sharethis 
	}
}
/* ShareThis EOF */
/* Custom Function for Referrer Tracking */
function cfReferrer (cvReferrer) {
	cvReferrer = unescape(cvReferrer.toLowerCase());
	if (cvReferrer && (cfPageName(cvReferrer) != s.pageName)) {
		s.prop23 = cfUtility(cvReferrer,'server');	// Referring Domain
		s.referrer = s.eVar23 = cvReferrer;	// Referring URL
	}
}
/* Custom Function for Link Tracking */
function cfLnkTrack (o,ReportSuiteID_Links,ReportSuiteID) {
	var cvLinkType='';
	if (o.tagName=='A') {
		cvLinkType='Link|A';
  		if (typeof o.hasChildNotes == "true") { //Eloqua image button tracking patch
			if (o.firstChild.tagName =='IMG') {
				cvLinkType='Link|elqIMG'; 
			}
		}
	} else if (typeof o.parentNode != 'undefined') {
		var cvTagName=o.tagName.toLowerCase();
		if (typeof o.parentNode != 'undefined') var cvPTagName=o.parentNode.tagName.toLowerCase();
		if (typeof o.parentNode.parentNode != 'undefined') var cvPPTagName=o.parentNode.parentNode.tagName.toLowerCase();
		if (typeof o.parentNode.parentNode.parentNode != 'undefined') var cvPPPTagName=o.parentNode.parentNode.parentNode.tagName.toLowerCase();
		if (cvTagName=='area' && cvPTagName=='map') {
			cvLinkType='Link|IMGMAP'; 
		}
		if (cvTagName=='img' && cvPTagName=='a') {
			cvLinkType='Link|IMG';
		}
		if (cvTagName=='span' && cvPTagName=='a') {
			cvLinkType='Link|Span';
		}
		if (cvTagName=='span' && cvPTagName=='div' && cvPPTagName=='a'){ //AR 3.2 to accomodate <A><DIV><SPAN></SPAN></DIV></A>
			cvLinkType='Link|Div|Span';
		}
		if (cvTagName=='b' && cvPTagName=='span' && cvPPTagName=='div' && cvPPPTagName =='a'){ //AR 3.2 to accomodate <A><DIV><SPAN><B></B></SPAN></DIV></A>
			cvLinkType='Link|Div|Span|B';
		}
		if ((cvTagName=='strong' || cvTagName=='span' || cvTagName=='font') && (cvPTagName=='a' || cvPPTagName=='a')) {
			cvLinkType='Link|Sometag';
		}
		if ((cvTagName=='div' && cvPTagName=='a') || (cvTagName=='h1' && cvPTagName=='div' && cvPPTagName=='a')) {
			cvLinkType='Link|Shop|HP|Audiences';
		}
		if ((cvTagName=='input') && (o.value.toLowerCase()=='submit')) { //Eloqua download now form
			var nodesForm = o.form;
			if (typeof (nodesForm.elements["elqSiteID"]) != "undefined") elqSiteID = nodesForm.elements["elqSiteID"].value;
			if (typeof (nodesForm.elements["elqSiteId"]) != "undefined") elqSiteID = nodesForm.elements["elqSiteId"].value;
			if (elqSiteID  == "2330") cvLinkType='Form|Elq'; //Eloqua form
		}
	}
	if (!cfIsNullOrWhitespace(cvLinkType)) {
		if (ReportSuiteID_Links && ReportSuiteID_Links != ReportSuiteID) s.sa(ReportSuiteID_Links); // Change the link tracking report suite to ReportSuiteID_Links 
		if (cvLinkType=='Link|A') {
			var Destination_URL_wParam = unescape(o.href.toLowerCase());
			var Destination_LID = '';
			if (unescape(o.innerHTML) != '') {
				Destination_LID = unescape(o.innerHTML); //gets anchor text
			}
			else if (unescape(o.parentNode.className) != '') { //AR 3.2 to accomodate <DIV><A></A></DIV>
				Destination_LID = (unescape(o.parentNode.className));
			}
			else if (unescape(o.className) != '') { //AR 3.2 to accomodate <DIV><A></A></DIV>
				Destination_LID = (unescape(o.className));
			}
			else { Destination_LID = Destination_URL_wParam; }

			var Destination_Name = unescape(o.name);
			var Destination_ID = unescape(o.id); //AR 3.0 added "ID" attribute for LID and LPOS tracking

		} else if (cvLinkType=='Link|IMGMAP') {
			var Destination_URL_wParam = unescape(o.href.toLowerCase());
			var Destination_Name = unescape(o.href);

		} else if (cvLinkType=='Link|IMG') {
			var Destination_URL_wParam = unescape(o.parentNode.href.toLowerCase());
			var Destination_LID = unescape(o.src);
			var Destination_Name = unescape(o.parentNode.name);

		} else if (cvLinkType=='Link|elqIMG') {
			var Destination_URL_wParam = unescape(o.href.toLowerCase());
			var Destination_LID = cfPageName(unescape(o.firstChild.src));
			var Destination_Name = unescape(o.name);

		} else if (cvLinkType=='Link|Span') {
			var Destination_URL_wParam = unescape(o.parentNode.href.toLowerCase());
			var Destination_LID = unescape(removeHTMLTags(o.parentNode.innerHTML));
			var Destination_Name = unescape(removeHTMLTags(o.parentNode.name));

		} else if (cvLinkType=='Link|Div|Span|B') {
			var Destination_URL_wParam = unescape(o.parentNode.parentNode.parentNode.href.toLowerCase());
			var Destination_LID = unescape(removeHTMLTags(o.innerHTML));
			var Destination_Name = unescape(removeHTMLTags(o.name));
			if ((Destination_Name == "undefined" || cfIsNullOrWhitespace(Destination_Name))) {
				Destination_Name = unescape(removeHTMLTags(o.parentNode.parentNode.parentNode.name));
			}
			var Destination_ID = unescape(removeHTMLTags(o.id));
		} else if (cvLinkType=='Link|Div|Span') { //AR 3.2 to accomodate <A><DIV><SPAN>text</SPAN></DIV></A> tracking
			var Destination_URL_wParam = unescape(o.parentNode.parentNode.href.toLowerCase());
			var Destination_LID = unescape(removeHTMLTags(o.innerHTML));
			var Destination_Name = unescape(removeHTMLTags(o.name));
			if ((Destination_Name == "undefined" || cfIsNullOrWhitespace(Destination_Name))) {
				Destination_Name = unescape(removeHTMLTags(o.parentNode.parentNode.name));
			}
			var Destination_ID = unescape(removeHTMLTags(o.id));
		} else if (cvLinkType=='Link|Sometag') {
			if (cvPTagName=='a') {
				var Destination_URL_wParam = unescape(o.parentNode.href.toLowerCase());
			}
			else if (cvPPTagName=='a') {
				var Destination_URL_wParam = unescape(o.parentNode.parentNode.href.toLowerCase());
			}
			var Destination_LID = unescape(removeHTMLTags(o.innerHTML));
			var Destination_Name = unescape(removeHTMLTags(o.name));
			if ((Destination_Name == "undefined" || cfIsNullOrWhitespace(Destination_Name))) {
				if (cvPTagName=='a') {
					Destination_Name = unescape(removeHTMLTags(o.parentNode.name));
			}
				else if (cvPPTagName=='a') {
					Destination_Name = unescape(removeHTMLTags(o.parentNode.parentNode.name));				}
			}
			var Destination_ID = unescape(removeHTMLTags(o.id));
		} else if (cvLinkType=='Form|Elq') {
			var cvElqFormName = nodesForm.elements["elqFormName"].value;
			var cvElqFormId = nodesForm.id;
			var Destination_LID = cvLinkType + "|" + cvElqFormId + "|" + cvElqFormName;

			if (nodesForm.elements["scEvent"]) {
				var cvElqAssetType = nodesForm.elements["scEvent"].value.toLowerCase();
				Destination_LID += "|" + cvElqAssetType;
			}
			var Destination_URL_wParam = unescape(nodesForm.action.toLowerCase());
		} else if (cvLinkType=='Link|Shop|HP|Audiences') {
			if (cvPTagName=='a') {
				var Destination_URL_wParam = unescape(o.parentNode.href.toLowerCase());
			}
			else if (cvPPTagName=='a') {
				var Destination_URL_wParam = unescape(o.parentNode.parentNode.href.toLowerCase());
			}
			var Destination_LID = unescape(removeHTMLTags(o.innerHTML));
			var Destination_Name = unescape(removeHTMLTags(o.name));
			if ((Destination_Name == "undefined" || cfIsNullOrWhitespace(Destination_Name))) {
				if (cvPTagName=='a') {
					Destination_Name = unescape(removeHTMLTags(o.parentNode.name));
			}
				else if (cvPPTagName=='a') {
					Destination_Name = unescape(removeHTMLTags(o.parentNode.parentNode.name));				}
			}
			var Destination_ID = unescape(removeHTMLTags(o.id));
		}

		var Destination_Server = cfUtility(Destination_URL_wParam,"server");
		var Destination_Domain = cfUtility(Destination_URL_wParam,"domain");	
		Destination_URL_wParam = cfClean(Destination_URL_wParam);	
		Destination_URL = Destination_URL_wParam.split("?")[0];
		var Destination_LPOS; var cvIsThisADownload = 0;

		//AR 3.0 added "ID" attribute for LID and LPOS tracking
		if (!cfIsNullOrWhitespace(Destination_ID) && cfIsNullOrWhitespace(Destination_Name)) {
			Destination_Name = Destination_ID;
		}
		//AR 2.7: Destination_Name validation to track &lid and &lpos in URL parameters if no "name" attribute is defined
		if ((Destination_Name == "undefined" || cfIsNullOrWhitespace(Destination_Name)) && (cvAMDWebProperties.indexOf(Destination_Domain) != -1) && ((Destination_URL_wParam.indexOf("lid=") !=-1) || (Destination_URL_wParam.indexOf("lpos=") !=-1) )) {
			Destination_Name = Destination_URL_wParam;
		}
		var DADapp=0;
		if ((Destination_Name == "undefined" || cfIsNullOrWhitespace(Destination_Name)) && (cvURL.indexOf("appid=dad") != -1)) {
			DADapp=1;
		}
		if (Destination_Name) {
			Destination_Name = Destination_Name.replace("?","&");
			Destination_Name = Destination_Name.replace("&LinkID=","&lid="); //fix for LinkID vs. lid
			Destination_Name = Destination_Name.replace("&amp;lid=","&lid="); //AR 2.3: fix for MOSS lid rewrite issue
			Destination_Name = Destination_Name.replace("&amp;lpos=","&lpos="); //AR 2.3: fix for MOSS lpos rewrite issue
			var Destination_Name_Split = Destination_Name.split("&");
			for (var i = 0; i < Destination_Name_Split.length; i = i + 1) {
				if ((Destination_Name_Split[i].toLowerCase().indexOf("channelid=") == -1) && (Destination_Domain != "en25.com") && (Destination_Server != "link.global.amd.com")) { 
				//AR 3.1 added filter to exclude LID tagging via URL for "channelid=" (salesedge portal issue)
				// added filter to exclude eloqua redirect domain containing lid
					if (Destination_Name_Split[i].toLowerCase().indexOf("lid=") != -1) {
						Destination_LID = Destination_Name_Split[i].substring(4, Destination_Name_Split[i].length); // Extract LID (Link ID) from name="&lid="
						if (o.tagName=='IMG' && o.parentNode.tagName=='A') {
							Destination_LID = Destination_LID + " | " + cfRight(unescape(o.src),97-Destination_LID.length);
						}
					}
					if (Destination_Name_Split[i].toLowerCase().indexOf("lpos=") != -1) Destination_LPOS = Destination_Name_Split[i].substring(5, Destination_Name_Split[i].length);// Extract LPOS (Link Position) from name="&lpos="
				} // close AR 3.1 if == -1
			} 
		}
		
		var cvDownloadFileExt = cfUtility(Destination_URL,"ext"); //AR 2.6: validate Null or Whitespace for URL
		if (!cfIsNullOrWhitespace(cvDownloadFileExt) && (cvNonDownloadExtensions.indexOf(cvDownloadFileExt) == -1)  && (cvDownloadExtentions.indexOf(cvDownloadFileExt) != -1)) {
		//if extension on URL exists AND the extension is NOT in the exclude list AND the extension IS in the
		//download extension list, then set to 1
		//AR 2.5: removed !=0 condition to enable download tracking of exe files.
		//&& cvDownloadExtentions.indexOf(cfUtility(Destination_URL,"ext")) != 0)
		//AR 2.6: false means extension exists; -1 means it exists as download file extension
			cvIsThisADownload = 1; 
		}
		else if ((!cfIsNullOrWhitespace(cvElqAssetType)) && (cvDownloadExtentions.indexOf(cvElqAssetType) != -1)) {
			cvIsThisADownload = 1; 
			cvDownloadFileExt = cvElqAssetType;
		}

		Destination_LID = removeHTMLTags(Destination_LID);

		/* Custom Link, Exit Link, Download Link */
		if ((cvAMDWebProperties.indexOf(Destination_Domain) != -1) && (cvIsThisADownload != 1)) {
			s.linkType = "o"; // Internal Links
		} else if ((cvAMDWebProperties.indexOf(Destination_Domain) != -1) && (cvIsThisADownload == 1)) {
			s.linkType = "d"; // Download Links
		} else {
			s.linkType = "e"; // External Links
		}
		s.linkName = Destination_LID; s.linkURL = Destination_URL;

		/* Link Tracking using Custom Props */
		if (ReportSuiteID && ReportSuiteID != '') s.prop22 = ReportSuiteID; // Clicks by Report Suites
		if (s.pageName && s.pageName != '') s.prop12 = s.pageName; // Clicks by Page URL
		if (Destination_LID && Destination_LID != '') s.prop13 = Destination_LID; // Clicks by Link ID
		if (Destination_URL && Destination_URL != '') s.prop14 = Destination_URL; // Clicks by Link URL - No Params
		if (DADapp==1) {s.prop13 = "DAD|" + s.prop13; s.prop14 = "DAD|" + s.prop14; Destination_LPOS = "Driver AutoDetect (DAD)";}
		if (Destination_URL_wParam && Destination_URL_wParam != '') s.eVar6 = Destination_URL_wParam; // Clicks by Link Full URL - With Params
		if (Destination_LPOS && Destination_LPOS != '') {
			Destination_LPOS = removeHTMLTags(Destination_LPOS);
			s.prop15 = s.eVar15 = Destination_LPOS; // Clicks by Link Position
			if (Destination_LPOS.indexOf("InternalSearchRank:") != -1) {
				if (csKeyword != '') {
					s.prop5 = s.eVar5 = unescape(csKeyword.toLowerCase()); // Internal Search Terms
				}
				s.events = s.apl(s.events,"event13",",",1); // Custom Event for CTR on Search Results
			}
		}
		s.events = s.apl(s.events,"event6",",", 1); // Link Clicks Event
		/* Download Tracking */
		if (cvIsThisADownload) { 
			cvIsDownloadDomain = 0;
			for (i=0;i < cvDriverDownloadDomains.length;i++) { //AR 2.8 checks if download file belongs to a download domain
				if (Destination_URL.indexOf(cvDriverDownloadDomains[i]) != -1) {
					cvIsDownloadDomain = 1;
				}
			}
			if (cvNonDownloadExtensions.indexOf(cvDownloadFileExt) == -1) { // driver or asset only if extension is not on exlude list
				if (((cvIsDownloadDomain) && (Destination_URL_wParam.indexOf('driver') != -1)) && (cvDriverExtensions.indexOf(cvDownloadFileExt) != -1)) {
					//AR 2.8 assign LID
					Destination_LID = "DD|";
					if (Destination_URL_wParam.indexOf('processor') != -1) { 
						Destination_LID += "Processor|"; } 
					else if (Destination_URL_wParam.indexOf('embedded') != -1) { 
						Destination_LID += "Embedded|"; } 
					else if (Destination_URL_wParam.indexOf('chipsetmotherboard') != -1) { 
						Destination_LID += "Chipset|"; } 
					else { 
						Destination_LID += "GPU-Other|"; } 

					Destination_LID += cfUtility(Destination_URL,'filename');
					s.linkName = Destination_LID; 
					s.prop13 = Destination_LID;
					s.events = s.apl(s.events,"event15",",", 1);	// Driver Downloads Event (event15)
				} else {
					if (cvSearchCenterElq==1) {
						s.events = s.apl(s.events,"event4,event97",",", 1);		// Searchcenter and Asset Downloads Event (event4)
					}
					else {
						s.events = s.apl(s.events,"event4",",", 1);		// Asset Downloads Event (event4)
					}
				}
			}
		}	

		// Custom Shop Now Link Tracking on Shop.amd.com SNC
			//cvShopDomainCheck = cfUtility(unescape(document.URL.toLowerCase()),'server');
			//if ((cvShopDomainCheck == "shop.amd.com" || cvShopDomainCheck == "shop-qa.amd.com" || cvShopDomainCheck == "shop-sit.amd.com" || cvShopDomainCheck == "shopapp-sit.amd.com") && Destination_LPOS == "PPRlink") {
		if (Destination_LPOS == "PPRlink") {
			s.linkTrackVars = s.linkTrackVars + ",prop30,prop31,prop32,prop33,eVar30,eVar31,eVar32,eVar33,eVar34,products";
			s.linkTrackEvents = s.linkTrackEvents + ",event9,purchase";
			cvShop_LinkID = Destination_LID.split("|");
			s.prop30 = s.prop12;
			s.eVar30 = s.eVar8;
			//s.prop30 = s.eVar30 = cvShop_LinkID[1];   // PropertyID
			s.prop31 = s.eVar31 = cvShop_LinkID[2];   // RetailerID
			s.prop32 = s.eVar32 = cvShop_LinkID[3];   // ProductID
			s.prop33 = s.eVar33 = cvShop_LinkID[4].replace(',','.');   // Price
			//s.currencyCode = "\"" + cvShop_LinkID[5] + "\"";
			//s.eVar34 = cvShop_LinkID[0] + "|" + s.prop30 + "|" + s.prop31 + "|" + s.prop32;
			s.eVar34 = cvShop_LinkID[0] + "|" + cvShop_LinkID[1] + "|" + s.prop31 + "|" + s.prop32;
			s.events = s.apl(s.events,"event9",",", 1);   // Shop Now Event

			// s.Products custom coding
			s.events = s.apl(s.events,"purchase",",", 1);   // Shop Now Event
			s.products = ";" + cvShop_LinkID[3] + ";1;" + cvShop_LinkID[4].replace(',','.');
		}
		// Custom Shop Now Link Tracking on Shop.amd.com
		else if ((Destination_LPOS == "PPRlink") || ((cfUtility(unescape(document.URL.toLowerCase()),'server') == "shop.amd.com" || cfUtility(unescape(document.URL.toLowerCase()),'server') == "shop-qa.amd.com") && (Destination_LPOS == "ShopNow" || Destination_LPOS == "PPRlink"))) {
			s.linkTrackVars = s.linkTrackVars + ",prop30,prop31,prop32,prop33,eVar30,eVar31,eVar32,eVar33,eVar34,products";
			s.linkTrackEvents = s.linkTrackEvents + ",event9,purchase";
			cvShop_LinkID = Destination_LID.split("|");
			s.prop30 = s.eVar30 = cvShop_LinkID[1];   // PropertyID
			s.prop31 = s.eVar31 = cvShop_LinkID[2];   // RetailerID
			s.prop32 = s.eVar32 = cvShop_LinkID[3];   // ProductID
			s.prop33 = s.eVar33 = cvShop_LinkID[4].replace(',','.');   // Price
			//s.currencyCode = "\"" + cvShop_LinkID[5] + "\"";
			s.eVar34 = cvShop_LinkID[0] + "|" + s.prop30 + "|" + s.prop31 + "|" + s.prop32;
			s.events = s.apl(s.events,"event9",",", 1);   // Shop Now Event

			// s.Products custom coding
			s.events = s.apl(s.events,"purchase",",", 1);   // Shop Now Event
			s.products = ";" + cvShop_LinkID[3] + ";1;" + cvShop_LinkID[4].replace(',','.');
		}
	
		//review tracking
		if (Destination_URL_wParam.indexOf("reviews") != -1) {
			if (ctProdView != "" || ctProdView != "undefined") {
				s.eVar32 = "Review|"+ ctProdView;
			} else {
				s.eVar32 = "Review|"+ cfUtility(Destination_URL_wParam,'filename');
			}
			s.events = s.apl(s.events,"event60",",", 1);   // View Reviews Event
		}
	}
}
function cfPageName(cvURL,cvParamInPageName,cvParamToInclude) {
	// if cvParamInPageName = 1, it will include parameters in the s.pageName
	if (cvParamInPageName == 1) {
	    if (cvParamToInclude != "") {
	        var cvParam_Modified = "?";
	        cvParam_Split = cvParamToInclude.toLowerCase().split(",");
	        for (var i = 0; i < cvParam_Split.length; i = i + 1) {
				if (cfGetQParam(cvURL,cvParam_Split[i])) cvParam_Modified = cvParam_Modified + cvParam_Split[i] + "=" + cfGetQParam(cvURL,cvParam_Split[i]) + "&";
	        }
	        cvParam_Modified = cvParam_Modified.substring(0, cvParam_Modified.length - 1);
	        var cvPageName = cfUtility(cvURL,'channel') + cfUtility(cvURL,'filename') + cvParam_Modified;
	    } else {
	        var cvPageName = cfUtility(cvURL,'channel') + cfUtility(cvURL,'filenameparameters');
	    }
	} else {
	    var cvPageName = cfUtility(cvURL,'channel') + cfUtility(cvURL,'filename');
	}
	/* ----- IF PageName is Over 100 Chars ----- */
	if (cvPageName.length > 100) cvPageName = "/" + cfUtility(cvURL,'server') + "/..." + cfRight(cvPageName.replace(cfUtility(cvURL,'server') + "/", ""), 100 - (cfUtility(cvURL,'server').length + 5));
	return cvPageName;
}

function cfUtility(cvURL,cvAction) {
	cvURL = unescape(cvURL.toLowerCase());
	switch (cvAction) {
	case "server":	// Example: sites.amd.com, www.hp.com
		var a = cvURL.split(/\/+/g)[1];
		if (typeof(a) !== 'undefined') {
			var b = a.split("."); if (b.length == 2) { var c = 'www.' + a; } else { c = a; } TheResult = c;
		} else {
			TheResult = "";
		}
		break;
	case "domain":	// Example: amd.com, hp.com
		var a = cfUtility(cvURL,"server")
		if (typeof(a) !== 'undefined') {
			var b  = a.split("."); b_len = b.length;
			var TheResult = String(b[b_len - 2] + '.' + b[b_len - 1]);
		} else {
			TheResult = "";
		}
		break;
	case "channel":
		var a = cvURL.split("?")[0]; a = a.replace("http://","/"); a = a.replace("https://","/");
		var b = a.substring(a.lastIndexOf('/')+1); a = a.replace(b,"");
		a = a.replace(cvURL.split(/\/+/g)[1],cfUtility(cvURL,"server"));
		TheResult = a;
		break;
	case "filename":
		var a = cvURL.split("?")[0]; var b = a.substring(a.lastIndexOf('/')+1);
		TheResult = b;
		break;
	case "filenameparameters":
		var cvParamPos = cvURL.indexOf("?"); if (cvParamPos != -1) { var cvParam = cvURL.substring(cvParamPos); } else { var cvParam = ""; }
		TheResult = cfUtility(cvURL,"filename") + cvParam;
		break;		
	case "se":
		var cvReferrer_Server = cvURL.split(/\/+/g)[1]; // www.google.ca, www.yahoo.com	
		var cvReferrer_Server_Splitted = cvReferrer_Server.split("."); // google.ca, yahoo.ca
		cvReferrer_Server_Splitted_Length = cvReferrer_Server_Splitted.length;
		var TheResult = String('.' + cvReferrer_Server_Splitted[cvReferrer_Server_Splitted_Length - 2] + '.');
		break;
	case "ext":
		var TheResult = cvURL.substring(cvURL.lastIndexOf('/') + 1, cvURL.length).substring(cvURL.substring(cvURL.lastIndexOf('/') + 1, cvURL.length).lastIndexOf('.') + 1, cvURL.substring(cvURL.lastIndexOf('/') + 1, cvURL.length).length);
		break;
	default:
		var TheResult = "";
	}
	return TheResult;
}

function cfGetQParam(a, b) {	// Custom Function to Get Query Parameters
	var c = a.indexOf('?'); var d = a.indexOf('#');
	if (c < 0) { return ""; }
	var e = a.substr(c + 1);
	if (d > 0) { e = a.substring(c + 1, d); }
	var f = e.split('&');
	for (var i = 0; i < f.length; i++) {
		var g = f[i].split('=');
		g[0] = unescape(g[0]);
		if (g[0] == b) {
			g[1] = unescape(g[1]);
			if (g[1].indexOf('"') > -1) {
				var h = /"/g;
				g[1] = g[1].replace(h, '\\"')
			}
			if (g[1].indexOf('+') > -1) {
				var j = /\+/g;
				g[1] = g[1].replace(j, ' ')
			}
			return g[1]
		}
	}
	return ""
}

function cfLeft(str, n){
	if (n <= 0) { return ""; } else if (n > String(str).length) { return str; } else { return String(str).substring(0,n); }
}

function cfRight(str, n){
    if (n <= 0) { return ""; } else if (n > String(str).length) { return str; } else { var iLen = String(str).length; return String(str).substring(iLen, iLen - n); }
}

function cfClean(cvURL) {
	if (cvURL) {
		cvURL = cvURL.replace("http://","/");
		cvURL = cvURL.replace("https://","/");
	}
	return cvURL;
}

function removeHTMLTags(strInputCode) {
	if (strInputCode) {
		strInputCode = strInputCode.replace(/&(lt|gt);/g, function (strMatch, p1) {
			return (p1 == "lt") ? "<" : ">";
		});
		var strTagStrippedText = strInputCode.replace(/<\/?[^>]+(>|$)/g, "");
		return strTagStrippedText;
	}
}
//AR 2.6: cfIsNullOrWhitespace function
function cfIsNullOrWhitespace(value) { // Returns true if string value is empty or whitespace characters only.
	var re = /^\s+$/; // Regular Expression for matching whitespace characters
	return (((value == null) || (value.length == 0)) || re.test(value)); // Is value empty or whitespace?
}

function cfTrim(stringToTrim) {
	return stringToTrim.replace(/^\s+|\s+$/g,"");
}

//AR get URL paramter values
function cfParamValue(cvURL,name)
{
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec(cvURL);
  if( results == null )
    return "";
  else
    return results[1];
}
// Flash Player Version Detection - Rev 1.6
// Detect Client Browser type
// Copyright(c) 2005-2006 Adobe Macromedia Software, LLC. All rights reserved.
var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

function ControlVersion()
{
	var version;
	var axo;
	var e;

	// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry

	try {
		// version will be set for 7.X or greater players
		axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		version = axo.GetVariable("$version");
	} catch (e) {
	}

	if (!version)
	{
		try {
			// version will be set for 6.X players only
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
			
			// installed player is some revision of 6.0
			// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
			// so we have to be careful. 
			
			// default to the first public version
			version = "WIN 6,0,21,0";

			// throws if AllowScripAccess does not exist (introduced in 6.0r47)		
			axo.AllowScriptAccess = "always";

			// safe to call for 6.0r47 or greater
			version = axo.GetVariable("$version");

		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 4.X or 5.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = axo.GetVariable("$version");
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 3.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = "WIN 3,0,18,0";
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 2.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			version = "WIN 2,0,0,11";
		} catch (e) {
			version = -1;
		}
	}
	
	return version;
}
// JavaScript helper required to detect Flash Player PlugIn version information
function GetSwfVer(){
	// NS/Opera version >= 3 check for Flash plugin in plugin array
	var flashVer = -1;
	
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
			var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
			var descArray = flashDescription.split(" ");
			var tempArrayMajor = descArray[2].split(".");			
			var versionMajor = tempArrayMajor[0];
			var versionMinor = tempArrayMajor[1];
			var versionRevision = descArray[3];
			if (versionRevision == "") {
				versionRevision = descArray[4];
			}
			if (versionRevision[0] == "d") {
				versionRevision = versionRevision.substring(1);
			} else if (versionRevision[0] == "r") {
				versionRevision = versionRevision.substring(1);
				if (versionRevision.indexOf("d") > 0) {
					versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
				}
			}
			var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
		}
	}
	// MSN/WebTV 2.6 supports Flash 4
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
	// WebTV 2.5 supports Flash 3
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
	// older WebTV supports Flash 2
	else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
	else if ( isIE && isWin && !isOpera ) {
		flashVer = ControlVersion();
	}	
	return flashVer;
}

// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
	versionStr = GetSwfVer();
	if (versionStr == -1 ) {
		return false;
	} else if (versionStr != 0) {
		if(isIE && isWin && !isOpera) {
			// Given "WIN 2,0,0,11"
			tempArray         = versionStr.split(" "); 	// ["WIN", "2,0,0,11"]
			tempString        = tempArray[1];			// "2,0,0,11"
			versionArray      = tempString.split(",");	// ['2', '0', '0', '11']
		} else {
			versionArray      = versionStr.split(".");
		}
		var versionMajor      = versionArray[0];
		var versionMinor      = versionArray[1];
		var versionRevision   = versionArray[2];

        	// is the major.revision >= requested major.revision AND the minor version >= requested minor
		if (versionMajor > parseFloat(reqMajorVer)) {
			return true;
		} else if (versionMajor == parseFloat(reqMajorVer)) {
			if (versionMinor > parseFloat(reqMinorVer))
				return true;
			else if (versionMinor == parseFloat(reqMinorVer)) {
				if (versionRevision >= parseFloat(reqRevision))
					return true;
			}
		}
		return false;
	}
}

function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
    var str = '';
    if (isIE && isWin && !isOpera)
    {
  		str += '<object ';
  		for (var i in objAttrs)
  			str += i + '="' + objAttrs[i] + '" ';
  		for (var i in params)
  			str += '><param name="' + i + '" value="' + params[i] + '" /> ';
  		str += '></object>';
    } else {
  		str += '<embed ';
  		for (var i in embedAttrs)
  			str += i + '="' + embedAttrs[i] + '" ';
  		str += '> </embed>';
    }

    document.write(str);
}
function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "id":
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}
//Start Visual Website Optimizer Code
	cvExcludeVWO = 0;
	cvExcludeVWODomains = ["localhost","-auth","-prod","-qa","-sit","-dit","-preprod","-design","-new","fpp.amd.com","shop.amd.com"]; 
	for (i=0;i < cvExcludeVWODomains.length;i++) { 
		if (unescape(document.URL).indexOf(cvExcludeVWODomains[i]) != -1) {
			cvExcludeVWO = 1;
		}
	}
	if (cvExcludeVWO == 0) {
		function _vwo_load_js(j){document.write('<script type="text/javascript" src="'+j+'"></scr'+'ipt>');}
		_vwo_load_js('http://www.amd.com/us/as/vwo/vwo_1.js');
	}

/*
VERSION HISTORY
* 6.94 updates by Ahmad @ 8:55 EST 1/18/2012
*  - updated s.eVar30 to = eVar8 instead of eVar6
* 6.93 updates by Ahmad @ 14:15 EST 12/09/2011
*  - updated s.eVar34
* 6.92 updates by Ahmad @ 14:00 EDT 11/29/2011
*  - added s.prop5, s.eVar5, and s.eVar15
* 6.91 updates by Ahmad @ 8:40 EDT 11/24/2011
*  - Link|Shop|HP|Audiences setup
* 6.9 updates by Ahmad @ 15:15 EDT 11/23/2011
*  - eVar32 setup
* 6.8 updates by Ahmad @ 11:00 EDT 11/23/2011
*  - ShareThis eVar54 setup
*  - add more SNC dev domains
*  - disable VWO on production shop
* 6.7 updates by Ahmad @ 8:30 EDT 11/22/2011
*  - SNC domain to report suite mapping updates
* 6.6 updates by Ahmad @ 9:15 EDT 11/3/2011
*  - finalized searchcenter/eloqua link tracking
* 6.2 updates by Ahmad @ 9:00 EDT 10/20/2011
*  - swapped logic on sites for business vs. server RS
* 6.1 updates by Ahmad @ 14:35 EDT 10/13/2011
*  - added cvExcludeVWO and logic
* 6.0 updates by Ahmad @ 14:35 EDT 10/12/2011
*  - event97 for downloads on elq pages
* 5.9 updates by Ahmad @ 10:25 EDT 10/12/2011
*  - added searchcenter tab link tracking
* 5.8 updates by Ahmad @ 7:45 EDT 10/12/2011
*  - added fusion to amd.com
* 5.7 updates by Ahmad @ 13:55 EDT 8/30/2011
*  - updated link tracking to include <strong><a>text</a></strong>
* 5.6 updates by Ahmad @ 10:45 EDT 8/16/2011
*  - rearranged amdvbusiness and removed "partners" from amdvother03
* 5.5 updates by Ahmad @ 8:45 EDT 8/11/2011
*  - updated VWO code to resolve IE loading order bug
* 5.4 updates by Ahmad @ 10:20 EDT 8/9/2011
*  - added fpp-apac rules
* 5.3 updates by Ahmad @ 14:40 EDT 7/27/2011
*  - updated elq form detection logic for elqSiteID vs Id
* 5.2 updates by Ahmad @ 16:45 EDT 7/21/2011
*  - updated searchcenter RS assignment logic
* 5.1 updates by Ahmad @ 15:45 EDT 7/21/2011
*  - added Link|Div|Span|B case
* 5.0 updates by Ahmad @ 15:20 EDT 7/21/2011
*  - added cbr to download extensions
* 4.9 updates by Ahmad @ 13:20 EDT 7/5/2011
*  - Currency updates
* 4.8 updates by Ahmad @ 12:20 EDT 6/30/2011
*  - DAD updates
* 4.6 updates by Ahmad @ 12:35 EDT 6/24/2011
*  - eloqua updates
* 4.5 updates by Ahmad @ 11:00 EDT 6/14/2011
*  - added Destination_Name = unescape(removeHTMLTags(o.parentNode.parentNode.name));
* 4.4 updates by Ahmad @ 16:45 EDT 6/7/2011
*  - added mega region report suites
*  - added eloqua image button tracking patch
*  - fixed download exclusions with hasChildNodes and added ru, it, jp to exclusion list
* 4.3 updates by Ahmad @ 10:50 EDT 6/3/2011
*  - added c_scrsid cookie code for searchcenter
* 4.2 updates by Ahmad @ 11:30 EDT 5/26/2011
*  - added amdvtest validation to prevent data going to regional RS
*  - added amd-sites.com to cvAMDWebProperties
* 4.1 updates by Ahmad @ 16:20 EDT 5/24/2011
*  - added vwo code
* 4.0 updates by Ahmad @ 16:10 EDT 5/19/2011
*  - added Adobe SearchCenter report suite mapping
*  - scrsid = search center report suite id
*  - added new regional report suites
* 3.9 updates by Ahmad @ 11:30 EDT 5/16/2011
*  - made vision pages available via sites and www
* 3.8 updates by Ahmad @ 11:30 EDT 5/4/2011
*  - made ReportSuiteID local variable instead of global to prevent trumping
* 3.7 updates by Ahmad @ 14:35 EDT 4/14/2011
*  - added emailcustomercare.amd.com to amdvsupport RS (AMD Support)
* 3.6 updates by Ahmad @ 12:00 EDT 4/13/2011
*  - defining new amdvother05 RS (AMD IR)
* 3.5 updates by Ahmad @ 15:45 EST 3/15/2011
*  - defining new amdvother03 RS (AMD Server)
* 3.4 updates by Ahmad @ 12:20 EST 3/10/2011
*  - added game.amd.com.cn
* 3.3 updates by Ahmad @ 15:30 EST 2/23/2011
*  - add amdvisionary.com to amdvvision RS
* 3.2 updates by Ahmad @ 11:00 EST 2/23/2011
*  - accomodate <DIV><A></A></DIV> tracking
*  - accomodate <A><DIV><SPAN>text</SPAN></DIV></A> tracking
* 3.1 updates
*  - added filter to exclude LID tagging via URL for "channelid=" (salesedge portal issue)
* 3.0 updates
*  - added "id" attribute for LID and LPOS tracking
* 2.9 updates
*  - added amdvsalesedge
*  - domain outstart.com = salesedge
* 2.8 updates
*  - improved driver/asset download tracking
* 2.7 updates
*  - auth and prod environments scaled to include all subdomain varieties
*  - added .cn and querycn.php conditions to assign traffic to amdvregions-cn ReportSuiteID
*  - added Destination_Name validation to track &lid and &lpos in URL parameters if no "name" attribute is defined
* 2.6 updates
*	- added cfIsNullOrWhitespace function and validation for correct asset and driver download reporting
* 2.5 updates
*  - removed !=0 condition to enable download tracking of exe files.
*	- added akamai.net to cvAMDWebProperties
*	- added validation for Destination_LID
* 2.4 updates
* 	- added new condition for cfCheckRSID to test for sites-auth.amd.com and assign to amdvtest report suite bypass IP 	filtering
* 2.3 updates
*  - fix for MOSS lid and lpos rewrite issue ("&" turns into "&amp;")
* 2.2 updates
* 	- added new condition for cfCheckRSID to test for www-auth.amd.com and assign to amdvtest report suite bypass IP 	filtering
*/
