<!--
var no_flash = document.URL.search(/no_flash/gi);

// -----------------------------------------------------------------------------
// Globals
// the version of javascript supported
var jsVersion = 1.0;
var versionString;
var versionMajor;
var flaInstance=0;
// -----------------------------------------------------------------------------

var safaiFound = "false";
if (navigator.appVersion.toLowerCase().indexOf("safari") != -1) {
	safaiFound = "true";
}
// Here we write out the VBScript block for MSIE Windows
document.writeln('<script language="VBScript" type="text/vbscript">');
document.writeln('Function VBGetSwfVer(i)');
document.writeln('on error resume next');
document.writeln('Dim swControl, swVersion');
document.writeln('swVersion = 0');  
document.writeln('set swControl = CreateObject("ShockwaveFlash.ShockwaveFlash." + CStr(i))');
document.writeln('if (IsObject(swControl)) then');
document.writeln('swVersion = swControl.GetVariable("$version")');
document.writeln('end if');
document.writeln('VBGetSwfVer = swVersion');
document.writeln('End Function');
document.writeln('</scr' + 'ipt>');

// Detect Client Browser type
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;
jsVersion = 1.1;
// JavaScript helper required to detect Flash Player PlugIn version information
function JSGetSwfVer(i){
	// NS/Opera version >= 3 check for Flash plugin in plugin array
	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;
			descArray = flashDescription.split(" ");
			tempArrayMajor = descArray[2].split(".");
			versionMajor = tempArrayMajor[0];
			versionMinor = tempArrayMajor[1];
			if ( descArray[3] != "" ) {
				tempArrayMinor = descArray[3].split("r");
			} else {
				tempArrayMinor = descArray[4].split("r");
			}
      		versionRevision = tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0;
            flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
      	} else {
			flashVer = -1;
		}
	}
	// 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;
	// Can't detect in all other cases
	else {
		
		flashVer = -1;
	}
	return flashVer;
} 
// If called with no parameters this function returns a floating point value 
// which should be the version of the Flash Player or 0.0 
// ex: Flash Player 7r14 returns 7.14
// If called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer) 
{
	var reqMinorVer = 0;
	var reqRevision = 0;
 	reqVer = parseFloat(reqMajorVer + "." + reqRevision);
   	// loop backwards through the versions until we find the newest version	
	for (i=25;i>0;i--) {	
		if (isIE && isWin && !isOpera) {
			versionStr = VBGetSwfVer(i);
		} else {
			versionStr = JSGetSwfVer(i);		
		}
		if (versionStr == -1 ) { 
			return false;
		} else if (versionStr != 0) {
			if(isIE && isWin && !isOpera) {
				tempArray         = versionStr.split(" ");
				tempString        = tempArray[1];
				versionArray      = tempString .split(",");				
			} else {
				versionArray      = versionStr.split(".");
			}
			versionMajor      = versionArray[0];
			versionMinor      = versionArray[1];
			versionRevision   = versionArray[2];			
			versionString     = versionMajor + "." + versionRevision;   // 7.0r24 == 7.24
			versionNum        = parseFloat(versionString);
        	// is the major.revision >= requested major.revision AND the minor version >= requested minor
			if ( (versionMajor > reqMajorVer) && (versionNum >= reqVer) ) {
				return true;
			} else {
				return ((versionNum >= reqVer && versionMinor >= reqMinorVer) ? true : false );	
			}
		}
	}	
	return (reqVer ? false : 0.0);
}

function renderFlashSrc(width, height, src, flashvars, bgcolor, additionalParamsLoc) {		
	swf_html = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+versionMajor+',0,0,0" width="'+width+'" height="'+height+'" id="loader" align="middle">\n'
			 + '<param name="allowScriptAccess" value="sameDomain" />\n'
			 + '<param name="movie" value="'+src+'" />\n'
			 + '<param name="FlashVars" value="'+flashvars+'" />\n'
			 + '<param name="quality" value="high" />\n'
			 + '<param name="bgcolor" value="'+bgcolor+'" />\n';
	var additionalParamsStr = "";
	if (additionalParamsLoc) {
		//parse additionalParams string
		paramParts = additionalParamsLoc.split("|");
		for (i=0; i<paramParts.length; i++) {
			val_pairs = paramParts[i].split("=");
			if (val_pairs.length > 1) {
				swf_html += '<param name="'+val_pairs[0]+'" value="'+val_pairs[1]+'" />\n';
				additionalParamsStr += val_pairs[0] + '="' + val_pairs[1] + '" ';
			}
		}
	} //end if

	swf_html += '<embed src="'+src+'" FlashVars="'+flashvars+'" '+additionalParamsStr+'quality="high" bgcolor="'+bgcolor+'" width="'+width+'" height="'+height+'" name="loader" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n'
			 + '<\/object>\n';
	//alert(swf_html);
	return swf_html;
}

function renderAltContent(width, src, requiredVersion, versionString) {			
	var versionMsg = !versionString ? 'El plugin de Flash no fue detectado.' : 'La versi&oacute;n '+versionString+' del plugin de Flash fué detectada.';	
	if (src.length > 0) {
		if (src.indexOf("<img") != -1) {
			alt_html = '<table border="0" cellpadding="0" cellspacing="0" width="'+width+'">'
			 + '<tr><td align="left" valign="top" width="'+width+'">'+src+'<\/td><\/tr>'
			 + '<\/table><img src="http://welcome.hp-ww.com/img/s.gif" width="10" height="10" alt="" title="" />'
			 + '<table border="0" cellpadding="0" cellspacing="0" width="'+width+'">'
			 + '<tr class="theme">'
			 + '<td colspan="3"><img src="http:\/\/welcome.hp-ww.com\/img\/s.gif" width="1" height="10" border=0 alt="" title="" \/><\/td>'
			 + '<\/tr>'
			 + '<tr class="theme"><td align="left" width="10"><img src="http:\/\/welcome.hp-ww.com\/img\/s.gif" width="10" height="1" border=0 alt="" title="" \/><\/td>'
			 + '<td align="left" valign="top" width="'+width+'" class="themebody">Esta p&aacute;gina contiene animaciones multimedia en Flash. '+versionMsg+' Esta p&aacute;gina requiere la instalaci&oacute;n del plugin de Flash versi&oacute;n '+requiredVersion+' o mayor. Puede <a href="http:\/\/www.macromedia.com\/shockwave\/download\/download.cgi?P1_Prod_Version=ShockwaveFlash" class="themebodylink" target="_blank" title="Sitio externo a Hewlett-Packard.">descargar la &uacute;ltima version del plugin de Flash ahora <img src="\/country\/ec\/es\/img/hpweb-1-2-exit.gif" border=0 alt="Sitio externo a Hewlett-Packard." title="Sitio externo a Hewlett-Packard." \/><\/a> y luego <a href="javascript:location.reload()" class="themebodylink" title="ver la versi&oacute;n Flash de esta p&aacute;gina">ver la versi&oacute;n Flash de esta p&aacute;gina<\/a>.<\/td>'
			 + '<td align="left" width="10"><img src="http:\/\/welcome.hp-ww.com\/img\/s.gif" width="10" height="1" border=0 alt="" title="" \/><\/td><\/tr>'
			 + '<tr class="theme">'
			 + '<td colspan="3"><img src="http:\/\/welcome.hp-ww.com\/img\/s.gif" width="1" height="10" border=0 alt="" title="" \/><\/td>'
			 + '<\/tr><\/table>'
		} else {
			alt_html = '<table border="0" cellpadding="0" cellspacing="0" width="'+width+'">'
				 + '<tr class="theme">'
				 + '<td colspan="3"><img src="http:\/\/welcome.hp-ww.com\/img\/s.gif" width="1" height="10" border=0 alt="" title="" \/><\/td>'
				 + '<\/tr>'
				 + '<tr class="theme"><td align="left" width="10"><img src="http:\/\/welcome.hp-ww.com\/img\/s.gif" width="10" height="1" border=0 alt="" title="" \/><\/td>'
				 + '<td align="left" valign="top" width="'+width+'" class="themebody">'+src+'<\/td>'
				 + '<td align="left" width="10"><img src="http:\/\/welcome.hp-ww.com\/img\/s.gif" width="10" height="1" border=0 alt="" title="" \/><\/td><\/tr>'
				 + '<tr class="theme">'
				 + '<td colspan="3"><img src="http:\/\/welcome.hp-ww.com\/img\/s.gif" width="1" height="10" border=0 alt="" title="" \/><\/td>'
				 + '<\/tr><\/table><br \/><img src="http:\/\/welcome.hp-ww.com\/img\/s.gif" width="10" height="1" border=0 alt="" title="" \/>';
		}
	} else { //default alt-content message
		alt_html = '<table border="0" cellpadding="0" cellspacing="0" width="'+width+'">'
				 + '<tr class="theme">'
				 + '<td colspan="3"><img src="http:\/\/welcome.hp-ww.com\/img\/s.gif" width="1" height="10" border=0 alt="" title="" \/><\/td>'
				 + '<\/tr>'
				 + '<tr class="theme"><td align="left" width="10"><img src="http:\/\/welcome.hp-ww.com\/img\/s.gif" width="10" height="1" border=0 alt="" title="" \/><\/td>'
				 + '<td align="left" valign="top" width="'+width+'" class="themebody">Esta p&aacute;gina contiene animaciones multimedia en Flash. '+versionMsg+' Esta p&aacute;gina requiere la instalaci&oacute;n del plugin de Flash versi&oacute;n '+requiredVersion+' o mayor. Puede <a href="http:\/\/www.macromedia.com\/shockwave\/download\/download.cgi?P1_Prod_Version=ShockwaveFlash" class="themebodylink" target="_blank">descargar la &uacute;ltima version del plugin de Flash ahora<\/a> y luego <a href="javascript:location.reload()" class="themebodylink">ver la versi&oacute;n Flash de esta p&aacute;gina<\/a>.<\/td>'
				 + '<td align="left" width="10"><img src="http:\/\/welcome.hp-ww.com\/img\/s.gif" width="10" height="1" border=0 alt="" title="" \/><\/td><\/tr>'
				 + '<tr class="theme">'
				 + '<td colspan="3"><img src="http:\/\/welcome.hp-ww.com\/img\/s.gif" width="1" height="10" border=0 alt="" title="" \/><\/td>'
				 + '<\/tr><\/table><br \/><img src="http:\/\/welcome.hp-ww.com\/img\/s.gif" width="10" height="1" border=0 alt="" title="" \/>';
	}
	
	return alt_html;
}

function renderFlash(width, height, src, requiredVersion, flashvars, bgcolor, dispAltContent, redirect, additionalParams) {	
	
	var containerID = 'dynamicswfholder'+flaInstance;
	document.writeln('<div id="'+containerID+'"></div>');
	var html="", versionString, s_pageName;
	if (DetectFlashVer(requiredVersion)) {	
		if (redirect.length > 0) {
			html += '<a href="'+redirect+'"><img src="http://welcome.hp-ww.com/img/s.gif" width="1" height="1" alt="Go to text equivalent of this content with decorative animation removed" border="0"></a>';
		}
		html += '<a href="http://welcome.hp.com/country/us/en/flash_info.html"><img src="http://welcome.hp-ww.com/img/s.gif" width="1" height="1" alt="HP policy on using Flash and accessibility" border="0"></a><br>';
		
		html += renderFlashSrc(width, height, src, flashvars, bgcolor, additionalParams);                       
	}
	else if (!DetectFlashVer(requiredVersion) && no_flash < 0) {            
		if ( (redirect.length > 0) ) {
			html = document.location.replace(redirect);
		} else {
			// will not redirect for SMB forms
			if ( location.href.search("smb_form.cgi") < 0 )
				html = document.location.replace(location.href.substring(0,location.href.indexOf('?')) + '?topiccode=NO_FLASH');
			else
				html = renderAltContent(width, dispAltContent, requiredVersion, versionMajor);        
		}
	}
	else {
		html = renderAltContent(width, dispAltContent, requiredVersion, versionMajor);            
	}

	//grab site flashvar for metrics
	flashvarParts = flashvars.split("&");
	for (i=0; i<flashvarParts.length; i++) {
		var_pairs = flashvarParts[i].split("=");
		if (var_pairs[0] == "site" && var_pairs.length > 1) {
			pageNameSite = var_pairs[1];
			break;
		}
	}
	
	if (safaiFound) {
		document.write(html);
	} else {		
		document.getElementById(containerID).innerHTML = html; 
	}
	thePageName = (versionMajor) ? pageNameSite : pageNameSite+'NOFLASH';

	flaInstance++;

	return thePageName;	
}

function riGetEnvironment()
{
	var hostname = location.hostname+''; // hack to force copy
	hostname = hostname.toLowerCase();
	var arrHostname = hostname.split('.');
	
	// if the length is less then 2 then assume DEV
	if (arrHostname.length < 2) return('DEV');
	
	arrHostname.reverse();
	var domainname = arrHostname[1] + '.' + arrHostname[0];	

	if (domainname == 'resource.com') return('STAGING');
	return('PRODUCTION');
}

 
//-->
