 <!--
/**********items that must be edited***************/
var popratio = 0.05;
//var hp_ebus_num_clicks = 3;
var hp_ebus_sitecode = "28";
var hp_ebus_countrycode = "64";
var hp_ebus_jscript = "smb1.js";

/**********configurable items**********************/  
var guid = genguid(); 
var hp_ebus_cookielife = 180; //in days
var hp_ebusclicks_cookielife = 30; //in minutes
var hp_ebustime_cookielife = 30; //in minutes

/**********Cookie domain declaration*************/ 
var hp_ebus_domain = ".hp.com";
/**********End cookie domain declaration*********/

//this if statement allows the cookie to be set when testing from webmetrics1
if (location.host.indexOf("webmetrics1")!=-1){
	hp_ebus_domain = ".hpqcorp.net";
}
//End if statement

var ie4 = document.all;
var ns4 = document.layers;
var ns6 = document.getElementById && !document.all;
var hp_ebus_country="";
var hp_ebus_segment="";
var hp_ebus_design_version=""; 
var hp_ebus_keywords="";
var hp_ebus_generator="";
var hp_ebus_page_content=""; 
var hp_ebus_lifecycle="";
var hp_ebus_product_service_name="";
var hp_ebus_web_section_id="";
if(!s_prop1)var s_prop1="";
if(!s_prop2)var s_prop2="";
if(!s_prop3)var s_prop3="";
if(!s_prop4)var s_prop4="";
prop1 = s_prop1.replace(/(\s|\/)/g,"_").toLowerCase(); 
prop2 = s_prop2.replace(/(\s|\/)/g,"_").toLowerCase();
prop4 = s_prop4.replace(/(\s|\/)/g,"_").toLowerCase();
var reg = new RegExp("(google.com)", "i");
var hp_ebus_date = new Date(); 
var hp_ebus_yr = hp_ebus_date.getFullYear();
hp_ebus_scrapeMeta()
var hp_ebus_expires = new Date();
var hp_ebus_clicks_expires = new Date();
var hp_ebus_time_expires = new Date();
var ref = self.location.href
var title = document.title
var pg_title = document.title
var hp_ebus_random = Math.random();
/************* URL1 **** TCE Survey **************/
//var url1="http://survey.confirmit.com/wix/p269864917.aspx?l=9&jscript="+hp_ebus_jscript+"&reference="+escape(ref)+"&title="+escape(title)+"&code="+hp_ebus_sitecode+"&country="+hp_ebus_countrycode+"&prop7="+escape(hp_ebus_country.toLowerCase())+"&prop8="+escape(hp_ebus_lang.toLowerCase())+"&prop9="+escape(hp_ebus_segment.toLowerCase())+"&prop1="+escape(prop1)+"&prop2="+escape(prop2)+"&prop3="+escape(s_prop3.toLowerCase())+"&prop4="+escape(prop4)+"&hp_design_version="+escape(hp_ebus_design_version.toLowerCase())+"&keywords="+escape(hp_ebus_keywords.toLowerCase())+"&generator="+escape(hp_ebus_generator.toLowerCase())+"&page_content="+escape(hp_ebus_page_content.toLowerCase())+"&lifecycle="+escape(hp_ebus_lifecycle.toLowerCase())+"&guid="+escape(guid)+"&product_service_name="+escape(hp_ebus_product_service_name.toLowerCase())+"&web_section_id="+escape(hp_ebus_web_section_id.toLowerCase());//"&opentext="+escape('_qs');

/************* URL2 **** Revenue Influence Survey  ******************/
var url2="http://survey.confirmit.com/wix/p417943665.aspx?l=9&jscript="+hp_ebus_jscript+"&reference="+escape(ref)+"&title="+escape(title)+"&code="+hp_ebus_sitecode+"&country="+hp_ebus_countrycode+"&prop7="+escape(hp_ebus_country.toLowerCase())+"&prop8="+escape(hp_ebus_lang.toLowerCase())+"&prop9="+escape(hp_ebus_segment.toLowerCase())+"&prop1="+escape(prop1)+"&prop2="+escape(prop2)+"&prop3="+escape(s_prop3.toLowerCase())+"&prop4="+escape(prop4)+"&hp_design_version="+escape(hp_ebus_design_version.toLowerCase())+"&keywords="+escape(hp_ebus_keywords.toLowerCase())+"&generator="+escape(hp_ebus_generator.toLowerCase())+"&page_content="+escape(hp_ebus_page_content.toLowerCase())+"&lifecycle="+escape(hp_ebus_lifecycle.toLowerCase())+"&guid="+escape(guid)+"&product_service_name="+escape(hp_ebus_product_service_name.toLowerCase())+"&web_section_id="+escape(hp_ebus_web_section_id.toLowerCase());

hp_ebus_clicks_expires.setTime(hp_ebus_clicks_expires.getTime()+(hp_ebusclicks_cookielife*60*1000));
hp_ebus_expires.setTime(hp_ebus_expires.getTime()+(hp_ebus_cookielife*24*60*60*1000));
hp_ebus_time_expires.setTime(hp_ebus_time_expires.getTime()+(hp_ebustime_cookielife*60*1000));

/************* Function checkcookie ******************/
function checkcookie(){
	if (document.cookie.indexOf("HP_EBUS_CLICKS") == -1){
		writecookie();
	}else{
		updatecookie();
	}
	if (document.cookie.indexOf("HP_EBUS_TIME") == -1){
		//document.cookie = "HP_EBUS_TIME=0;path=/;domain="+hp_ebus_domain+";Expires="+hp_ebus_time_expires.toGMTString();
		setTimeout("hp_ebus_increaseCounter()", 1000);
	}else{
		setTimeout("hp_ebus_increaseCounter()", 1000);
	}
}

/************* Function writecookie ******************/
function writecookie(){
	document.cookie = "HP_EBUS_CLICKS=0;path=/;Expires="+hp_ebus_clicks_expires.toGMTString()+";domain="+hp_ebus_domain;
}

/************* Function updatecookie ******************/
function updatecookie(){
	var hp_ebus_clicks = hp_ebus_getCookie('HP_EBUS_CLICKS');
	hp_ebus_clicks = hp_ebus_clicks*1;
	document.cookie = "HP_EBUS_CLICKS="+(hp_ebus_clicks+1)+";path=/;Expires="+hp_ebus_clicks_expires.toGMTString()+";domain="+hp_ebus_domain;
}

/************* Function increaseCounter ******************/
function hp_ebus_increaseCounter(){
	var hp_ebus_time = hp_ebus_getCookie('HP_EBUS_TIME');
	hp_ebus_time = hp_ebus_time*1;
	document.cookie = "HP_EBUS_TIME="+(hp_ebus_time+1)+";path=/;domain="+hp_ebus_domain+";Expires="+hp_ebus_time_expires.toGMTString();
	setTimeout("hp_ebus_increaseCounter()", 1000);
}

/************* Function getcookie ******************/
function hp_ebus_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));
}



//checkcookie();

if ((location.host.indexOf("resource.com")==-1) && (location.host.indexOf("powered.com")==-1) && (document.cookie.indexOf("HP_EBUS=true")==-1) && (Math.random()<popratio) && (reg.test(document.referrer) == false) || (location.search.indexOf("hp_ebus_launch_survey")>-1))
{
     document.cookie = "HP_EBUS=true;path=/;Expires="+hp_ebus_expires.toGMTString()+";domain="+hp_ebus_domain;
	 var rdmNumber = Math.random();
	 var reg2 = new RegExp("(subSignIn.php)", "i");	 
     if (rdmNumber < 0.99){			 	
		if ((location.host.indexOf("h30187.www3.hp.com")==-1) && (reg2.test(window.location.href) == false))
	 	{
			window.open(url2, "","height=475,width=680,scrollbars=yes,resizable=yes");
	 	}		
     } else {
		//showOverlay('tce')
     }
}

/******************************FUNCTIONS******************************/

function findObj(theObj, theDoc)
{
  var p, i, foundObj;
  
  if(!theDoc) theDoc = document;
  if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
  {
    theDoc = parent.frames[theObj.substring(p+1)].document;
    theObj = theObj.substring(0,p);
  }
  if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
  for (i=0; !foundObj && i < theDoc.forms.length; i++) 
    foundObj = theDoc.forms[i][theObj];
  for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 
    foundObj = findObj(theObj,theDoc.layers[i].document);
  if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
  
  return foundObj;
}

function showHideLayers()
{ 
  var i, visStr, obj, args = showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3)
  {
    if ((obj = findObj(args[i])) != null)
    {
      visStr = args[i+2];
      if (obj.style)
      {
        obj = obj.style;
        if(visStr == 'show') visStr = 'visible';
        else if(visStr == 'hide') visStr = 'hidden';
      }
      obj.visibility = visStr;
    }
  }
}

function genguid()
{
	//generate global unique identifier
	TempDate = new Date();
	var guid = (TempDate.getMonth()+1) + "-" + TempDate.getDate() + "-" + TempDate.getYear() + "_" + TempDate.getHours() + "-" + TempDate.getMinutes() + "-" + TempDate.getSeconds() + "-" + TempDate.getMilliseconds() + "_" + TempDate.getTimezoneOffset() + "_";
	for (var i = 1; i <= 32; i++)
	{
		var n = Math.floor(Math.random() *16.0).toString(16);
		guid += n;
		if ((i == 8) || (i == 12) || (i == 16) || (i == 20)) guid += "-";
	}
	return guid;
}


function showOverlay(survey){
var surveyName = survey;
if ((ns6) || (ie4)) {

	if (surveyName == "tce"){ 
	/****************************Enter overlay text here****************************************/ 
	var invitationtext = "Please help us improve the HP website by answering a few questions about your experience today. This short survey will take less than a minute and your answers will remain confidential. Your responses will be used solely to improve the quality and content of the site.";
	var hp_ebus_answertext_yes = "Take the survey";
	var hp_ebus_answertext_no = "No, I do not want to take the survey at this time";
	var hp_ebus_buttontext = "Submit";
	/****************************Enter overlay text above this line******************************/
	}else{
	surveyName == "RevInf"
	/****************************Enter overlay text here****************************************/ 
	var invitationtext = "Please help us improve the HP website by answering a few questions about your experience today. This short survey will take less than a minute and your answers will remain confidential. Your responses will be used solely to improve the quality and content of the site.";
	var hp_ebus_answertext_yes = "Take the survey";
	var hp_ebus_answertext_no = "No, I do not want to take the survey at this time";
	var hp_ebus_buttontext = "Submit";
	/****************************Enter overlay text above this line******************************/	
	}


/*****************************Begin overlay HTML code****************************************/
var hp_ebus_surveydivtext = "<div ID='hp_ebus_surveydiv' style='font-family:arial,helvetica,sans-serif;font-weight:bold;font-size:14px;color:#000033; background-color:#ffffff; layer-background-color:#ffffff; position:absolute; top:20px; left:30px; width:550px; z-index:200;  visibility:hidden; border-color:#3300CC; border-width:thick; border-style:solid;'>";
hp_ebus_surveydivtext += "<table cellpadding=0 cellspacing=0>";
hp_ebus_surveydivtext += "<tr><td valign=top align=right bgcolor='#3300CC'><a href=\"javascript:toggleBox('hp_ebus_surveydiv',0)\"><font color=white>X</font></a></td></tr><tr>";
hp_ebus_surveydivtext += "<td valign=top align=left>";
hp_ebus_surveydivtext += "<table width=100";
hp_ebus_surveydivtext += "<tr>";
hp_ebus_surveydivtext += "<td width='170' align='left' valign='middle'><img src='https://www.hp.com/hpcentral/survey/source/s.gif' width='10' alt=''><img src='https://survey.confirmit.com/im/1a6a8eff972c3a42e47ba48e2f7aa924/HP/hpc60_topnav_hp_logo.gif' width='63' height='53' border='0' alt='Hewlett-Packard - Invent'></td>";
hp_ebus_surveydivtext += "<td><img src='https://www.hp.com/hpcentral/survey/source/s.gif' width='9' height='93' alt=''></td>";
hp_ebus_surveydivtext += "</tr>";
hp_ebus_surveydivtext += "</table>";
hp_ebus_surveydivtext += "<center>  ";
hp_ebus_surveydivtext += "<table cellpadding=10 cellspacing=10>";
hp_ebus_surveydivtext += "<tr><td valign=top align=left>";
hp_ebus_surveydivtext += invitationtext + "<p>";
hp_ebus_surveydivtext += "<form name='hp_ebus_form'><input type='hidden' name='hp_ebus_survey' value='"+surveyName+"'><input type='radio' name='hp_ebus_invitation' value='yes'>"+hp_ebus_answertext_yes+"<br><input type='radio' name='hp_ebus_invitation' value='no'>"+ hp_ebus_answertext_no + "<p>";
hp_ebus_surveydivtext += "<input type='button' onClick='hp_ebus_verify();' value='"+hp_ebus_buttontext+"'></form>";
hp_ebus_surveydivtext += "</td>";
hp_ebus_surveydivtext += "</tr>";
hp_ebus_surveydivtext += "</table>";
hp_ebus_surveydivtext += "<table width=100% border=0 cellspacing=0 cellpadding=0>";
hp_ebus_surveydivtext += "<tr>";
hp_ebus_surveydivtext += "   <td bgcolor=black><img src='https://www.hp.com/hpcentral/survey/source/s.gif' height=4 alt=''></td>";
hp_ebus_surveydivtext += "</tr>";
hp_ebus_surveydivtext += "<tr>";
hp_ebus_surveydivtext += "  <td align=right>";
hp_ebus_surveydivtext += "  </td>";
hp_ebus_surveydivtext += "</tr>";
hp_ebus_surveydivtext += "</table>";
hp_ebus_surveydivtext += "</center>";
hp_ebus_surveydivtext += "<table border='0' cellpadding='0' cellspacing='0' width='545' summary=\"This table contains information on Hewlett-Packard's privacy statement\">";
hp_ebus_surveydivtext += "<tr>";
hp_ebus_surveydivtext += "<td colspan='2'></td>";
hp_ebus_surveydivtext += "</tr>";
hp_ebus_surveydivtext += "<tr>";
hp_ebus_surveydivtext += "<td align='left' valign='middle' class='footer'><font size='-1'>";
hp_ebus_surveydivtext += "</td>";
hp_ebus_surveydivtext += "</tr>";
hp_ebus_surveydivtext += "<tr>";
hp_ebus_surveydivtext += "<td align='right' valign='middle' class='footer'><font face=arial size='-1'>&copy; "+hp_ebus_yr+" Hewlett-Packard Development Company, L.P.</td>";
hp_ebus_surveydivtext += "</tr>";
hp_ebus_surveydivtext += "</table>";
hp_ebus_surveydivtext += "</td></tr>";
hp_ebus_surveydivtext += "</table>";
hp_ebus_surveydivtext += "</div>";
/*********************************End overlay HTML code******************************************/

	document.write(hp_ebus_surveydivtext);
    toggleBox('hp_ebus_surveydiv',1)
}} 

function hp_ebus_verify(survey){
	var surveyName = document.hp_ebus_form.hp_ebus_survey.value; 
	
	if (document.hp_ebus_form.hp_ebus_invitation[1].checked == true){
		var hp_ebus_expires = new Date();
		//var invitation = 2;
		launchSurvey(2,surveyName)
    	hp_ebus_expires.setTime(hp_ebus_expires.getTime()+(hp_ebus_cookielife*24*60*60*1000));
		document.cookie = "HP_EBUS=true;path=/;Expires="+hp_ebus_expires.toGMTString()+";domain="+hp_ebus_domain;
		toggleBox('hp_ebus_surveydiv',0)
	}
	else {      
		//var invitation = 1;
		launchSurvey(1,surveyName)
		toggleBox('hp_ebus_surveydiv',0)
	}
}

function launchSurvey(invitation,survey){
	if (survey == "tce"){
	url1 += "&invitation="+invitation;
    window.open(url1, "","height=480,width=640,scrollbars=yes,resizable=yes"); 
	}
	else{
	url2 += "&invitation="+invitation;
	window.open(url2, "","height=480,width=640,scrollbars=yes,resizable=yes"); 
	}
}

function toggleBox(szDivID, iState) // 1 visible, 0 hidden
{
   var obj = document.layers ? document.layers[szDivID] :
   document.getElementById ?  document.getElementById(szDivID).style :
   document.all[szDivID].style;
   obj.visibility = document.layers ? (iState ? "show" : "hide") :
   (iState ? "visible" : "hidden");
}

function hp_ebus_scrapeMeta(){
	if (document.getElementsByTagName){
		hp_ebus_lang = window.document.documentElement.lang
		var hp_ebus_allMyStuff=document.getElementsByTagName("META");
		var hp_ebus_myMeta;var hp_ebus_myVariableNames;
		var myVariableMap = new Array();
		if(!(window.hp_ebus_country && hp_ebus_country.length>0)) myVariableMap["target_country"] = "hp_ebus_country"; 
		if(!(window.hp_ebus_segment && hp_ebus_segment.length>0)) myVariableMap["segment"] = "hp_ebus_segment";
		if(!(window.hp_ebus_design_version && hp_ebus_design_version.length>0)) myVariableMap["hp_design_version"] = "hp_ebus_design_version";
		if(!(window.hp_ebus_keywords && hp_ebus_keywords.length>0)) myVariableMap["keywords"] = "hp_ebus_keywords";
		if(!(window.hp_ebus_generator && hp_ebus_generator.length>0)) myVariableMap["generator"] = "hp_ebus_generator";
		if(!(window.hp_ebus_page_content && hp_ebus_page_content.length>0)) myVariableMap["page_content"] = "hp_ebus_page_content";
		if(!(window.hp_ebus_lifecycle && hp_ebus_lifecycle.length>0)) myVariableMap["lifecycle"] = "hp_ebus_lifecycle";
		if(!(window.hp_ebus_product_service_name && hp_ebus_product_service_name.length>0)) myVariableMap["product_service_name"] = "hp_ebus_product_service_name";
		if(!(window.hp_ebus_web_section_id && hp_ebus_web_section_id.length>0)) myVariableMap["web_section_id"] = "hp_ebus_web_section_id";
		for (var i=0; i<hp_ebus_allMyStuff.length; i++){
		if (hp_ebus_allMyStuff[i].tagName == "META"){
			hp_ebus_myMeta = hp_ebus_allMyStuff[i];
				if (myVariableMap[hp_ebus_myMeta.name] != null){
					eval(myVariableMap[hp_ebus_myMeta.name] + " ='"+ hp_ebus_myMeta.content.toLowerCase().split("'").join("") +"'");
					}			
			}
		}
	}
}
//-->