﻿if(typeof(com_hp_gc)=="undefined"){_c=com_hp_gc={}}_c.cookies={get:function(e){var c,b,a,d;c=document.cookie.indexOf(e+"=");if(c<0){return null}b=document.cookie.indexOf(e+"=")+e.length+1;a=document.cookie.indexOf(";",b);if(a==-1){a=document.cookie.length}d=document.cookie.substring(b,a);d=unescape(d);if(d===""){return null}return d},set:function(j,l,f,n,d,a){var e,g,m,c,k,h,b;if(!f||typeof f!="number"||parseInt(f,10)=="NaN"){e=""}else{g=new Date();g.setTime(g.getTime()+(parseInt(f,10)*60*60*1000));m=g.toGMTString();e="; expires="+m}c="; path=";if(!n||n===""){c+="/"}else{c+=n}k="; domain=";if(!d||d===""){k+=window.location.hostname}else{k+=d}if(a===true){h="; secure"}else{h=""}l=escape(l);b=j+"="+l+e+c+k;document.cookie=b},del:function(c,b,a){if(!b||!b.length){b=""}else{b=b}if(!a||!a.length){a=""}else{a=a}_c.cookies.set(c,"",-8760,b,a)},test:function(){_c.cookies.set("cT","acc");var a=_c.cookies.get("cT");if(a=="acc"){_c.cookies.del("cT");testStatus=true}else{testStatus=false}return testStatus}};com_hp_gc.createChild=function(g,f,b,h,e){var j=document.createElement(f);if(!j){return null}if(g!==null){g.appendChild(j)}for(var c in b){j[c]=b[c]}if(h!==null){var d=typeof(h);if(d=="string"&&!e){j.appendChild(document.createTextNode(h))}else{if(d=="string"&&e){j.innerHTML=h}else{if(d=="object"){j.appendChild(h)}}}}return j};com_hp_gc.encode=function(a){return a.replace("&","&amp;").replace("<","&lt;").replace(">","&gt;").replace("'","&apos;").replace('"',"&quot;")};if(typeof(com_hp_gc.History)=="undefined"){com_hp_gc.History={}}com_hp_gc.History=function(e,f,g,d,a,b,c){this.urls=null;this.pC=null;this.titles=null;this.cK=e;this.bT=g;this.cT=d;this.hL=a;this.hTL=b;this.cPCB=c;this.cE=null;if(this.hL===null){this.hL=5}if(this.hTL===null){this.hTL=20}if(this.cPCB===null){this.cPCB=this.getPageTitleForRelevantPagePSC}this.iI=f;if(document.location.toString().indexOf("https://")==0){this.sI="https://secure.hp-ww.com/img/s.gif";this.eI="https://secure.hp-ww.com/country/img/browse.gif"}else{this.sI="http://welcome.hp-ww.com/img/s.gif";this.eI="http://welcome.hp-ww.com/country/img/browse.gif"}};com_hp_gc.History.prototype.loadHistory=function(){this.urls=[];this.titles=[];this.pC=_c.cookies.get("com_hp_gc");if(this.pC!==null){var b=this.pC.split(";+;");if(b!==null&&b.length>0){for(i=0;i<b.length;i++){var a=b[i].split(";-;");if(a!==null){this.urls.push(a[0]);this.titles.push(a[1])}}}}return true};com_hp_gc.History.prototype.saveHistory=function(){var c="";var b=true;var a=this.urls.length;if(a>5){a=5}for(i=this.urls.length-a;i<this.urls.length;i++){if(b){b=false}else{c+=";+;"}c+=this.urls[i]+";-;"+this.titles[i]}_c.cookies.set("com_hp_gc",c,24*2,"/","hp.com")};com_hp_gc.History.prototype.clearHistory=function(){this.urls=[];this.titles=[];this.saveHistory();this.displayHistoryBox()};com_hp_gc.History.prototype.addPageWithTitle=function(b,c){if(c===null||c==undefined){c=document.location.toString()}var a=-1;for(i=0;i<this.urls.length;i++){if(this.urls[i]==c){a=i;break}else{if(this.titles[i]==b){a=i;break}}}if(a==-1){this.urls.push(c);this.titles.push(b)}else{this.urls.splice(a,1);this.urls.push(c);this.titles.splice(a,1);this.titles.push(b)}};com_hp_gc.History.prototype.displayHistoryBox=function(){var b=_c.createChild(null,"table",{className:"colorE7E7E7bg",width:"170",border:"0",cellPadding:"0",cellSpacing:"0",background:this.sI});if(this.cE!==null){this.cE.parentNode.replaceChild(b,this.cE)}else{var c=document.getElementById(this.iI);if(c!==null){var m=c.parentNode;while(m!==null){if(m.nodeName=="TABLE"){break}m=m.parentNode;if(m===null){break}}if(m!==null){if(document.URL.indexOf("WF08a")==-1&&document.URL.indexOf("WF28a")==-1&&document.URL.indexOf("WF13a")==-1&&document.URL.indexOf("WF33a")==-1){var d=m.parentNode;for(var h=0;h<d.childNodes.length;h++){var j=d.childNodes[h];if(j.nodeName=="TABLE"){var k=j.getElementsByTagName("TR");if(k[0].className=="colorDCDCDCbg"){d.insertBefore(b,d.childNodes[h+1]);break}}}}else{var n=m.parentNode.parentNode.parentNode;n.childNodes[2].childNodes[0].insertBefore(b,n.childNodes[2].childNodes[0].childNodes[0])}}}}this.cE=b;if(this.urls.length>0){var g=com_hp_gc.createChild(b,"tbody");var k=com_hp_gc.createChild(g,"tr",{className:"decoration"});com_hp_gc.createChild(k,"td",{colSpan:"3"},'<img src="'+this.sI+'" alt="" border="0" height="10" width="1">',true);k=com_hp_gc.createChild(g,"tr",{vAlign:"top"});com_hp_gc.createChild(k,"td",{width:"10"},'<img src="'+this.sI+'" alt="" border="0" height="1" width="10">',true);com_hp_gc.createChild(k,"td",{width:"20"},'<img src="'+this.eI+'" widht="19" alt="" border="" height="13">',true);com_hp_gc.createChild(k,"td",{width:"140"},"<b>"+this.bT+"</b>",true);var h;for(h=this.urls.length-1;h>=0&&this.urls.length-this.hL<=h;h--){var l=this.titles[h];var f=l;if(f.length>this.hTL){f=f.substring(0,this.hTL)+"..."}l=com_hp_gc.encode(l);f=com_hp_gc.encode(f);k=com_hp_gc.createChild(g,"tr",null,null,null);com_hp_gc.createChild(k,"td",{width:"10"},'<img src="'+this.sI+'" alt="" border="0" height="1" width="10">',true);com_hp_gc.createChild(k,"td",{align:"left",colSpan:"2"},'&nbsp;&raquo;&nbsp;<a href="'+this.urls[h]+'" onmousedown="s_sendCustomLinkEvent(null, \'recently browsed: '+s_prop7+"/"+s_prop8+": "+l+'\')" title="'+l+'">'+f+"</a>",true)}k=com_hp_gc.createChild(g,"tr",{vAlign:"top"});com_hp_gc.createChild(k,"td",{colSpan:"3"},"&nbsp;",true);k=com_hp_gc.createChild(g,"tr",null,null,null);com_hp_gc.createChild(k,"td",{width:"10"},'<img src="'+this.sI+'" alt="" border="0" height="1" width="10">',true);com_hp_gc.createChild(k,"td",{colSpan:"2"},'&nbsp;&raquo;&nbsp;<a href="#" id="hpgc_clear_history" title="'+this.cT+'">'+this.cT+"</a>",true);k=com_hp_gc.createChild(g,"tr",{className:"decoration"});com_hp_gc.createChild(k,"td",{colSpan:"3"},'<img src="'+this.sI+'" alt="" border="0" height="10" width="1">',true);k=com_hp_gc.createChild(g,"tr",{className:"decoration"});com_hp_gc.createChild(k,"td",{colSpan:"3",className:"colorCCCCCCbg"},'<img src="'+this.sI+'" alt="" border="0" height="2" width="1">',true);var e=document.getElementById("hpgc_clear_history");if(e!==null){var a=this;e.onclick=function(){a.clearHistory()}}}};com_hp_gc.History.prototype.getPageTitleForRelevantPagePSC=function(a){if(a===null||a==undefined){a=document.location.toString()}if(a.indexOf("hp.com")==-1){return null}var b=["WF25a","WF05a","WF06a","WF08a","WF06b","WF06c","WF28a"];for(i=0;i<b.length;i++){if(a.indexOf(b[i])!=-1){return this.findPageTitle()}}return null};com_hp_gc.History.prototype.findPageTitle=function(){var d=document.getElementsByTagName("title");if(d!==null&&d.length>0){var e=String(d[0].innerHTML);var c=document.getElementsByTagName("h1");if(c!==null&&c.length>0){var b=String(c[0].innerHTML);var a=0;for(;a<b.length&&a<e.length;a++){if(b.charAt(a)!=e.charAt(a)){break}}return e.substr(0,a-1)}}return null};com_hp_gc.History.prototype.show=function(){this.loadHistory();this.displayHistoryBox();var a=this.cPCB();if(a!==null){this.addPageWithTitle(a);this.saveHistory()}else{if(this.urls.length!=undefined&&this.urls.length>5){this.saveHistory()}}};
ď»żvar pageHistory = new com_hp_gc.History("", "hpgc_history", "Aţi răsfoit recent", "şterge istoric", 4, 17, null);pageHistory.show();
