var tsr_ShowDelay=600;var tsr_HideDelay=1500;var tsr_ClearDelay=300;var tsr_PreviewPrefix='teaser';var tsr_FeedPrefix='feed';var tsr_AllLinks=false;var tsr_XOffset=75;var tsr_YOffset=-50;var tsr_Window={width:250,height:399};var tsr_ShadowSize=5;var tsr_PointerWidth=50;var tsr_PointerHeight=50;var tsr_FadeTimer=150;var tsr_WindowGutter=25;var tsr_Root='http://h30399.wwww3.hp.com/digital_photography/';var tsr_Script=document.getElementById('teaser-js');var tsr_RootPattern=/(^http[s]?:\/\/[\w.\/_-]+?)js\//;if(tsr_Script.src!=null&&typeof(tsr_Script.src)!='undefined')tsr_Root=(tsr_RootPattern.exec(tsr_Script.src))[1];if(document.all&&!document.getElementById){document.getElementById=function(id){return document.all[id];}}else if(document.layers&&!document.getElementById){document.getElementById=function(id){return document.layers[id];}}var tsr_Cursor={x:0,y:0,clientX:0,clientY:0};var tsr_Feeds=new RegExp();var tsr_Client={width:0,height:0};var Tsr=false;var tsr_Numeric=/^[0-9]+/;var tsr_Feeds=/^feed\.([a-z0-9_\/\\-]+)?(\.|$)/;var tsr_Javascript=/^javascript/i;if(typeof(tsr_ShadowType)=='undefined')var tsr_ShadowType='png';if(!tsr_FadeOut){var tsr_FadeOut=function(obj,upper,timer){if(upper==null)upper=100;if(timer==null)timer=tsr_FadeTimer;tsr.Fade(obj.id,upper,0,(Math.round(timer*0.5)));}}if(!tsr_FadeIn){var tsr_FadeIn=function(obj,upper,timer){if(upper==null)upper=100;if(timer==null)timer=tsr_FadeTimer;tsr.Fade(obj.id,0,upper,timer);}}var tsr={RootPath:tsr_Root,Call:function(params,async,callback){var call=tsr.GetXmlHttpObject();call.open('POST','/cgi-bin/united-states/ap_spooler.cgi',async);call.setRequestHeader("Content-type","application/x-www-form-urlencoded");call.setRequestHeader("Content-length",params.length);call.setRequestHeader("Connection","close");var callTimeout=window.setTimeout(function(){call.abort();},5000);if(async){if(typeof(callback)=='undefined'||callback!=null){call.onreadystatechange=function(){if(call.readyState==4){callback(call.responseText,callTimeout);}};}call.send(params);}else{call.send(params);window.clearTimeout(callTimeout);if(callback!=null)callback(call.responseText);else document.write(call.responseText);}},TeaserCall:function(params,href){if(typeof(href)=='undefined'||href==null)return;var call=tsr.GetXmlHttpObject();call.open('POST','/cgi-bin/united-states/ap_spooler.cgi',true);call.setRequestHeader("Content-type","application/x-www-form-urlencoded");call.setRequestHeader("Content-length",params.length);call.setRequestHeader("Connection","close");call.setRequestHeader("Referer",location.href);var callTimeout=window.setTimeout(function(){call.abort();},10000);call.onreadystatechange=function(){if(call.readyState==4){window.clearTimeout(callTimeout);Tsr.showCache[href]=call.responseText;Tsr.teaserWindow.innerHTML=Tsr.showCache[href];}};call.send(params);},Ignore:function(response,timeout){window.clearTimeout(timeout);},GetXmlHttpObject:function(){var returnObj=false;try{return new XMLHttpRequest();}catch(e){try{return new ActiveXObject("Msxml2.XMLHTTP");}catch(e){return new ActiveXObject("Microsoft.XMLHTTP");}}return false;},GoPreview:function(obj){clearTimeout(Tsr.timers['teaserDelay']);Tsr.timers[obj.name]=setTimeout("tsr.DoPreview('"+obj.href+"')",Tsr.showDelay);},DoPreview:function(href){if(Tsr.InitializeWindow(href))return;tsr.TeaserCall('uri='+href+'&header=hp.format.php&footer=article.ratings.php',href);},StopPreview:function(obj){clearTimeout(Tsr.timers[obj.name]);clearTimeout(Tsr.timers['teaserDelay']);for(idx in tsr.Actions){clearTimeout(tsr.Actions[idx]);}Tsr.timers['teaserDelay']=setTimeout("tsr.HideWindow()",Tsr.hideDelay);},ClearPreview:function(){clearTimeout(Tsr.timers['teaserDelay']);for(idx in tsr.Actions){clearTimeout(tsr.Actions[idx]);}Tsr.timers['teaserDelay']=setTimeout("tsr.HideWindow()",Tsr.clearDelay);},ClearDelayTimer:function(){clearTimeout(Tsr.timers['teaserDelay']);for(idx in tsr.Actions){clearTimeout(tsr.Actions[idx]);}},HideWindow:function(){Tsr.teaserWindow.style.visibility='hidden';Tsr.teaserPointer.style.visibility='hidden';Tsr.teaserShadow.style.visibility='hidden';tsr.ChangeOpacity(0,"teaser-window");tsr.ChangeOpacity(0,"teaser-pointer");tsr.ChangeOpacity(0,"teaser-shadow");Tsr.activated=false;},ExitWindow:function(){var teaserWindow=document.getElementById('teaser-window');var teaserShadow=document.getElementById('teaser-shadow');var teaserPointer=document.getElementById('teaser-pointer');if(teaserWindow!=null){teaserWindow.style.visibility='hidden';teaserPointer.style.visibility='hidden';teaserShadow.style.visibility='hidden';}},DeactivateWindow:function(){if(Tsr.activated==false)return;tsr.HideWindow();},DoFeed:function(href,feed){if(Tsr.InitializeWindow(href))return;tsr.TeaserCall('uri='+href+'&feed='+feed+'&footer=product.feed.php',href);},GoFeed:function(obj){var feed=tsr_Feeds.exec(obj.name);Tsr.timers[obj.name]=setTimeout("tsr.DoFeed('"+obj.href+"','"+feed[1]+".xml')",Tsr.showDelay);},StopFeed:function(obj){clearTimeout(Tsr.timers[obj.name]);Tsr.HideWindow();},GetCursorPos:function(e){e=e||window.event;if(e.pageX||e.pageY){tsr_Cursor.x=e.pageX;tsr_Cursor.y=e.pageY;tsr_Cursor.clientX=e.clientX;tsr_Cursor.clientY=e.clientY;}else{var de=document.documentElement;var b=document.body;tsr_Cursor.x=e.clientX+(de.scrollLeft||b.scrollLeft)-(de.clientLeft||0);tsr_Cursor.y=e.clientY+(de.scrollTop||b.scrollTop)-(de.clientTop||0);tsr_Cursor.clientX=e.clientX;tsr_Cursor.clientY=e.clientY;}},Initialize:function(){document.body.innerHTML+="<div id=\"teaser-shadow\"><!-- . --></div><div id=\"teaser-pointer\"><!-- . --></div><div id=\"teaser-window\"><!-- . --></div>";Teaser.prototype.InitializeWindow=tsr_InitializeWindow;Teaser.prototype.FadeIn=tsr_FadeIn;Teaser.prototype.FadeOut=tsr_FadeOut;Tsr=new Teaser();if(typeof(tsr_Feeds.compile)!='undefined')tsr_Feeds.compile('^feed\.([a-z0-9_\/\\-]+)?(\.|$)','i');if(typeof(tsr_Numeric.compile)!='undefined')tsr_Numeric.compile('^[0-9]+','');if(typeof(tsr_Javascript.compile)!='undefined')tsr_Javascript.compile('^javascript','i');for(i=0;i<Tsr.anchors.length;i++){if(tsr_Javascript.test(Tsr.anchors[i].href.toString()))continue;if(Tsr.anchors[i].name.indexOf(Tsr.feedPrefix)==0){Tsr.anchors[i].onmouseover=function(){tsr.GoFeed(this);};Tsr.anchors[i].onmouseout=function(){tsr.StopFeed(this);};Tsr.anchors[i].onclick=function(){tsr.HideWindow();};Tsr.anchors[i].className+=' teaser';if(typeof(tsr_Iconed)=='undefined'||tsr_Iconed==true){var inner=Tsr.anchors[i].innerHTML;Tsr.anchors[i].innerHTML='<img src="http://welcome.hp-ww.com/img/hpweb_1-2_info_icn.gif" border="0" class="teaser" />'+inner;}}else if(Tsr.allLinks||Tsr.anchors[i].name.indexOf(Tsr.previewPrefix)==0){if(Tsr.anchors[i].onmouseover!=null)continue;if(Tsr.anchors[i].onmouseout!=null)continue;Tsr.anchors[i].onmouseover=function(){tsr.GoPreview(this);};Tsr.anchors[i].onmouseout=function(){tsr.StopPreview(this);};Tsr.anchors[i].onclick=function(){tsr.HideWindow();};if(typeof(tsr_Iconed)=='undefined'||tsr_Iconed==true){var inner=Tsr.anchors[i].innerHTML;Tsr.anchors[i].innerHTML='<img src="http://welcome.hp-ww.com/img/hpweb_1-2_info_icn.gif" border="0" class="teaser" />'+inner;}}}if(window.attachEvent){Tsr.teaserWindow.attachEvent("onmouseover",tsr.ClearDelayTimer);Tsr.teaserWindow.attachEvent("onmouseout",tsr.ClearPreview);}else if(window.addEventListener){Tsr.teaserWindow.addEventListener("mouseover",tsr.ClearDelayTimer,false);Tsr.teaserWindow.addEventListener("mouseout",tsr.ClearPreview,false);}else if(window.captureEvents){Tsr.teaserWindow.onload=tsr.ClearDelayTimer;Tsr.teaserWindow.captureEvents(Event.MOUSEOVER);Tsr.teaserWindow.onload=tsr.ClearPreview;Tsr.teaserWindow.captureEvents(Event.MOUSEOUT);}var preload1=new Image(50,50);var preload2=new Image(50,50);preload1.src=tsr_Root+'images/pointer.'+Tsr.theme+'.right.'+tsr_ShadowType;preload1.src=tsr_Root+'images/pointer.'+Tsr.theme+'.left.'+tsr_ShadowType;},GetClientSize:function(){if(self.innerHeight){tsr_Client.width=self.innerWidth;tsr_Client.height=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){tsr_Client.width=document.documentElement.clientWidth;tsr_Client.height=document.documentElement.clientHeight;}else if(document.body){tsr_Client.width=document.body.clientWidth;tsr_Client.height=document.body.clientHeight;}},FadeIn:tsr_FadeIn,FadeOut:tsr_FadeOut,Actions:new Array(),Counter:0,Fade:function(eid,start,end,ms){var speed=Math.round(ms/100);var timer=0;if(start>end){for(i=start;i>=end;i--){tsr.Actions[tsr.Counter++]=setTimeout("tsr.ChangeOpacity("+i+",'"+eid+"')",(timer*speed));timer++;}}else if(start<end){for(i=start;i<=end;i++){tsr.Actions[tsr.Counter++]=setTimeout("tsr.ChangeOpacity("+i+",'"+eid+"')",(timer*speed));timer++;}}tsr.Counter=0;},ChangeOpacity:function(opacity,eid){var obj=document.getElementById(eid);obj.style.opacity=(opacity/100);obj.style.MozOpacity=(opacity/100);obj.style.KhtmlOpacity=(opacity/100);if(obj.filters)obj.filter="alpha(opacity="+opacity+")";if(opacity==0&&obj.style.visibility!='hidden'){obj.style.visibility='hidden';}else if(opacity>0&&obj.style.visibility=='hidden'){obj.style.visibility='visible';}}};function Teaser(){this.teaserWindow=document.getElementById('teaser-window');this.teaserShadow=document.getElementById('teaser-shadow');this.teaserPointer=document.getElementById('teaser-pointer');this.anchors=document.getElementsByTagName('a');this.timers=new Array();this.showCache=new Array();this.showDelay=tsr_ShowDelay;this.hideDelay=tsr_HideDelay;this.previewPrefix=tsr_PreviewPrefix;this.feedPrefix=tsr_FeedPrefix;this.xOffset=tsr_XOffset;this.yOffset=tsr_YOffset;this.allLinks=tsr_AllLinks;this.activated=false;if(typeof(theme)!='undefined')this.theme=theme.replace('#','').toLowerCase();else this.theme='ccc';this.teaserWindow.style.backgroundColor='#'+this.theme;}function tsr_InitializeWindow(href){var windowComplete=false;tsr.GetClientSize();if((tsr_Cursor.x+tsr_Window.width+this.xOffset)>tsr_Client.width-tsr_WindowGutter){this.teaserWindow.style.left=tsr_Cursor.x-tsr_Window.width-this.xOffset+'px';this.teaserPointer.style.left=((tsr_Numeric.exec(this.teaserWindow.style.left)*1)+tsr_Window.width)+'px';this.teaserPointer.style.backgroundImage='url(\''+tsr_Root+'images/pointer.'+this.theme+'.right.'+tsr_ShadowType+'\')';}else{this.teaserWindow.style.left=tsr_Cursor.x+this.xOffset+'px';this.teaserPointer.style.left=((tsr_Numeric.exec(this.teaserWindow.style.left)*1)-tsr_PointerWidth)+'px';this.teaserPointer.style.backgroundImage='url(\''+tsr_Root+'images/pointer.'+this.theme+'.left.'+tsr_ShadowType+'\')';}if((tsr_Cursor.clientY+tsr_Window.height+this.yOffset)>tsr_Client.height){if((tsr_Cursor.clientY-tsr_Window.height-this.yOffset)<0)this.teaserWindow.style.top=(tsr_Cursor.y-tsr_Window.height-this.yOffset)-(tsr_Cursor.clientY-tsr_Window.height-this.yOffset-tsr_WindowGutter)+'px';else this.teaserWindow.style.top=tsr_Cursor.y-tsr_Window.height-this.yOffset+'px';}else{if(tsr_Cursor.clientY+this.yOffset<0)this.teaserWindow.style.top=(tsr_Cursor.y+this.yOffset)-(tsr_Cursor.clientY+this.yOffset)+'px';else this.teaserWindow.style.top=tsr_Cursor.y+this.yOffset+'px';}if(this.showCache[href]==undefined){this.teaserWindow.innerHTML="<table style=\"background-color: transparent; height: 100%; width: 100%;\"><tr><td style=\"text-align: center; height: 100%; width: 100%;\"><img src=\""+tsr_Root+"images/ajax-loader.gif\" alt='Loading...' /></td></tr></table>";}else{this.teaserWindow.innerHTML=this.showCache[href];windowComplete=true;}this.teaserShadow.style.top=((tsr_Numeric.exec(this.teaserWindow.style.top)*1)+tsr_ShadowSize)+'px';this.teaserShadow.style.left=((tsr_Numeric.exec(this.teaserWindow.style.left)*1)+tsr_ShadowSize)+'px';this.teaserPointer.style.top=(tsr_Cursor.y-(tsr_PointerHeight*0.5))+'px';this.FadeIn(this.teaserWindow,100);this.FadeIn(this.teaserPointer,100);this.FadeIn(this.teaserShadow,50,(tsr_FadeTimer*7));return windowComplete;}if(window.attachEvent){window.attachEvent("onload",tsr.Initialize);window.attachEvent("onunload",tsr.ExitWindow);document.attachEvent("onmousemove",tsr.GetCursorPos);}else if(window.addEventListener){window.addEventListener("load",tsr.Initialize,false);window.addEventListener("unload",tsr.ExitWindow,false);window.addEventListener("mousemove",tsr.GetCursorPos,false);}else if(window.captureEvents){window.onload=tsr.Initialize;window.onunload=tsr.ExitWindow;window.onmousemove=tsr.GetCursorPos;window.captureEvents(Event.LOAD);window.captureEvents(Event.UNLOAD);window.captureEvents(Event.MOUSEMOVE);}function soc_reposition_resize(soc_linkID){var menuObject=soc_getObject('social_menu'+soc_linkID);var columnObject=soc_getObject('social_column'+soc_linkID);var share=soc_getObject('social_img_block'+soc_linkID);var socContent=soc_getObject('social_contentAll'+soc_linkID);var menu_height=menuObject.offsetHeight;var social_height=socContent.offsetHeight;menuObject.style.left=(-1*menuObject.offsetWidth+share.offsetWidth+100)+'px';menuObject.style.top='0px';}