<!--
function PrintThisPage() {
	//location.href = 'http://www.hp.com/cgi-bin/pf-new.cgi?in=' + encodeURIComponent(location.href);
	
	location.href = 'http://www.hp.com/cgi-bin/pf-new.cgi?in=' + encodeURIComponent(location.href);
}

function IsURL(argvalue) {

  if (argvalue.indexOf(" ") != -1)
    return false;
  else if (argvalue.indexOf("http://") == -1)
    return false;
  else if (argvalue == "http://")
    return false;
  else if (argvalue.indexOf("http://") > 0)
    return false;

  argvalue = argvalue.substring(7, argvalue.length);
  if (argvalue.indexOf(".") == -1)
    return false;
  else if (argvalue.indexOf(".") == 0)
    return false;
  else if (argvalue.charAt(argvalue.length - 1) == ".")
    return false;

  if (argvalue.indexOf("/") != -1) {
    argvalue = argvalue.substring(0, argvalue.indexOf("/"));
    if (argvalue.charAt(argvalue.length - 1) == ".")
      return false;
  }

  if (argvalue.indexOf(":") != -1) {
    if (argvalue.indexOf(":") == (argvalue.length - 1))
      return false;
    else if (argvalue.charAt(argvalue.indexOf(":") + 1) == ".")
      return false;
    argvalue = argvalue.substring(0, argvalue.indexOf(":"));
    if (argvalue.charAt(argvalue.length - 1) == ".")
      return false;
  }

  return true;

}

function GoToPortal() {
	var oSelection = document.getElementById('portalSelect');
	var sURL = oSelection.options[oSelection.selectedIndex].value ;
	//if (IsURL(sURL)) {location.href = sURL;}
	location.href = sURL;
}

function SubmitSearch() {
	var sURL = "";
	var sHPL = "";
	var sSubmitURL = "";

	if (document.getElementById("search_hpl_1").checked) {
		sHPL = document.getElementById("search_hpl_1").value;
	}

	if (document.getElementById("search_hpl_2").checked) {
		sHPL = document.getElementById("search_hpl_2").value;
	}

	if (document.getElementById("submit_url").value != "") {
		sSubmitURL = document.getElementById("submit_url").value;
	} else {
		sSubmitURL = "http://www.hp.com/search/";
	}

	sURL = sSubmitURL + 
		"?qt=" + encodeURIComponent(document.getElementById('search_qt').value) + 
		"&hp1=" + encodeURIComponent(sHPL) + 
		"&cc=" + document.getElementById("search_cc").value +
		"&lang=" + document.getElementById("search_lang").value +
		"&qp=" + document.getElementById("search_qp").value +
		"&hps=" + encodeURIComponent(document.getElementById("search_hps").value) +
		"&hpn=" + encodeURIComponent(document.getElementById("search_hpn").value) +
		"&hpr=" + encodeURIComponent(window.location.href) +
		"&charset=" + document.getElementById("charset").value;
         
	location.href = sURL;
}

function SubmitSearchOnEnter() {
	var sKeyStroke = document.all? window.event.keyCode:e.which;
	if (sKeyStroke == 13) {
		SubmitSearch();
		event.returnValue = false;
	} else { 
		return sKeyStroke;
	}
}

function addEvent(obj, evt, func, capture) {
	if(obj.attachEvent) {
		obj.attachEvent('on' + evt, func);
	}
	else if(obj.addEventListener) {
		obj.addEventListener(evt, func, capture);
	}
}

function createMethodReference(object, method) {
	if(!(method instanceof Function)) {
		method = object[method];
	}
	return function( ) {
		method.apply(object, arguments);
	};
}


function exithp(vExitLink,vExitText,vAreaText)
{


   sURL= "http://www.hp.com/cgi-bin/leaving_hp.cgi?cc=" + document.getElementById("hCtryCode").value +
   "&lang=" +document.getElementById("hLangCode").value +
   "&exit_text=" + encodeURIComponent(vExitText) +
   "&exit_link=" + encodeURIComponent(vExitLink) +
   "&area_text=" + vAreaText +
   "&area_link=" + encodeURIComponent(window.location.href) +
   "&back_link=" + encodeURIComponent(window.location.href);


    location.href=sURL;   

}

//-->
