// HP Common Metrics Architecture 20050829a
// BEGIN Clickstream:
var s_prop14="";
if (!window.s_hp_optOut){
	var s_hp_optOut = false // WARNING: IF SET TO TRUE, PAGE WILL NOT BE TRACKED
}
var s_account="hphqglobal,hphqwwgraphicarts";
/* if (!(window.s_account))
	var s_account="hphqglobal,hphqwwgraphicarts"; */

// Common Dynamic Account structure - please do not use unless authorized by CKM&A Ops
var s_hp_includeRegionVariableStandards=true
var s_dynamicAccountSelection=false
var s_dynamicAccountList=""
var s_dynamicAccountMatch=window.location.hostname
var s_trackDownloadLinks=true
var s_trackExternalLinks=true
var s_trackInlineStats=true
var s_linkDownloadFileTypes="exe,zip,wav,mp3,mov,mpg,avi,doc,pdf,xls,cgi,dot,pot,ppt,wmv,asx"
var s_linkInternalFilters="hp,compaq,cpqcorp,javascript:"
var s_linkLeaveQueryString=true
// Common metrics plugin function - do not remove

function s_hp_doMetricsPlugins() {
}

/* MetaTag code, V2.0 */
var s_prop7,s_prop8,s_prop9,s_prop12,s_hp_region;
s_hp_scrapeMetaTags();
s_hp_setRegionVariables(s_prop7);

/*** DO NOT MODIFY THIS SECTION ***/
if(window.Takeover != null) {s_account+=",hphqipg20main";s_hp_includeJavaScriptFile("welcome.hp-ww.com","/cma/segment/ww/augipg/metricseventpassive.js");}
s_hp_includeJavaScriptFile("welcome.hp-ww.com","/cma/metrics/sc/s_code_remote.js");
function s_hp_includeJavaScriptFile(hp_hostname,hp_path) {
	if(!(window.s_hp_optOut && window.s_hp_optOut == true)) {
		var hp_ssl=(window.location.protocol.toLowerCase().indexOf('https')!=-1)
		if(hp_hostname && hp_hostname.length>0) {
			if(hp_ssl == true && hp_hostname.toLowerCase().indexOf("welcome.") != -1) { hp_hostname = "secure.hp-ww.com"; }
			var fullURL = "http" + (hp_ssl?"s":"") + "://" + hp_hostname + hp_path
		}
		else
			var fullURL=hp_path;
		document.write("<sc" + "ript language=\"JavaScript\" src=\""+fullURL+"\"></sc" + "ript>");
	}
}
// END Clickstream:

/****** Functions ******/
function s_hp_scrapeMetaTags() {
   	if (document.getElementsByTagName){
		t_lang = window.document.documentElement.lang;
		if(!(window.s_prop8 && s_prop8.length>0)) {eval("s_prop8=\"" + t_lang + "\"");}
		var allMyStuff=document.getElementsByTagName("META");
		var myMeta;var myVariableNames;
		var myVariableMap = new Array();
		if(!(window.s_prop7 && s_prop7.length>0)) {myVariableMap["target_country"] = "s_prop7"; }
		if(!(window.s_prop12 && s_prop12.length>0)) {myVariableMap["web_section_id"] = "s_prop12";} 
		if(!(window.s_prop9 && s_prop9.length>0)) {myVariableMap["segment"] = "s_prop9";}
		for (var i=0; i<allMyStuff.length; i++){
		if (allMyStuff[i].tagName == "META"){
			myMeta = allMyStuff[i];
				if (myVariableMap[myMeta.name] != null){
					eval(myVariableMap[myMeta.name] + " ='"+ myMeta.content.toLowerCase().split("'").join("") +"'");
					}
				else{
					myContent = myMeta.content.toLowerCase();
					if(myContent.indexOf("charset")!= -1 && !(window.s_charSet && s_charSet.length>0)) {
						myCharSetArray = myContent.split("rset=");
						eval("s_charSet=\"" + myCharSetArray[1].toUpperCase()+"\"");
					}
				}
			}
		}
	}
	if(!(window.s_prop7 && s_prop7.length>0)) {s_prop7="undef";}
	if(!(window.s_prop8 && s_prop8.length>0)) {s_prop8="undef";}
	if(!(window.s_prop9 && s_prop9.length>0)) {s_prop9="undef";}
	if(!(window.s_prop12&& s_prop12.length>0)) {s_prop12="undef:" + window.location.hostname + window.location.pathname;}
} 

function s_hp_setRegionVariables(countryCode) {
	switch(countryCode.toLowerCase()) {
		case "us":
		case "ca":
			s_hp_region = "na";
			s_account+=",hphqna,hphqnagraphicarts";
			s_hp_includeJavaScriptFile("welcome.hp-ww.com","/cma/region/na/nacma.js");
			break;
		case "kr":
		case "cn":
		case "jp":
		case "tw":
		case "au":
		case "hk":
		case "sg":
		case "in":
		case "th":
		case "nz":
		case "my":
		case "ph":
		case "vn":
		case "id":
			s_hp_region = "ap";
			s_account+=",hphqap,hphqapgraphicarts";
			s_hp_countryRS = "hphqap"+countryCode;
			if (s_account.toLowerCase().indexOf(s_hp_countryRS)== -1) s_account += ","+s_hp_countryRS;
			s_hp_includeJavaScriptFile("welcome.hp-ww.com","/cma/region/ap/apcma.js");
			break;
		case "de": 
		case "fr": 
		case "es": 
		case "uk": 
		case "nl": 
		case "it": 
		case "pl": 
		case "se": 
		case "be": 
		case "dk": 
		case "ch": 
		case "pt": 
		case "ru": 
		case "no": 
		case "at": 
		case "fi": 
		case "cz": 
		case "tr": 
		case "hu": 
		case "il": 
		case "gr": 
		case "za": 
		case "ie": 
		case "sk": 
		case "ro": 
		case "ua": 
		case "gb": 
		case "sa":
		case "by":
		case "emea_africa":
		case "emea_middle_east":
			s_hp_region = "emea";
			s_account+=",hphqemea,hphqemeagraphicarts";
			s_hp_countryRS = "hphqemea"+countryCode;
			if (s_account.toLowerCase().indexOf(s_hp_countryRS)== -1) s_account += ","+s_hp_countryRS;
			s_hp_includeJavaScriptFile("welcome.hp-ww.com","/cma/region/emea/emeacma.js");
			break;
		case "lamerica_nsc_carib":
		case "lamerica_nsc_cnt_amer":
		case "br":  
		case "mx": 
		case "ar": 
		case "co": 
		case "cl": 
		case "ve": 
		case "pe": 
		case "pr": 
		case "ec": 
		case "ns": 
		case "bo": 
		case "uy": 
		case "sv": 
		case "py": 
		case "hn":
			s_hp_region = "la";
			s_account+=",hphqla,hphqlagraphicarts";
			s_hp_countryRS = "hphqla"+countryCode;
			if (s_account.toLowerCase().indexOf(s_hp_countryRS)== -1) s_account += ","+s_hp_countryRS;
			s_hp_includeJavaScriptFile("welcome.hp-ww.com","/cma/region/la/lacma.js");
			break;
		default:
	}
}