//TABS JS LOGIC function getprod_showmenu(){ var getprod_el = document.getElementById("getprod_channels"); var getprod_iframe_menu = document.getElementById('getprod_iframe_menu'); var getprod_moretab=document.getElementById("getprod_menupos"); if (getprod_el) { getprod_el.style.top=(DomUtils.getElementTop(getprod_moretab)+23)+"px"; getprod_el.style.left=(DomUtils.getElementLeft(getprod_moretab))+"px"; getprod_el.style.visibility = "visible"; getprod_el.style.zIndex = '100'; getprod_iframe_menu.style.width = getprod_el.offsetWidth; getprod_iframe_menu.style.height = getprod_el.offsetHeight; getprod_iframe_menu.style.top = getprod_el.style.top; getprod_iframe_menu.style.left = getprod_el.style.left; getprod_iframe_menu.style.zIndex = getprod_el.style.zIndex - 1; getprod_iframe_menu.style.display = "block"; getprod_show = 1; } } function getprod_hidemenu(){ getprod_show = 0; setTimeout("getprod_hide()", 300); } function getprod_hide() { var getprod_el = document.getElementById("getprod_channels"); var getprod_iframe_menu = document.getElementById('getprod_iframe_menu'); if (getprod_el) { if (!getprod_show) { getprod_el.style.visibility = "hidden"; getprod_iframe_menu.style.display = "none"; } } } function SynOpenWinSNND89_2871(tentoe_id){ window.open('http://syndicate.tentoe.com/Syndicate/SynMaster?Tentoe=' + tentoe_id + '&ParentUrl=' + escape(window.location.href),'_blank', 'width=536,height=525,scrollbars=no,toolbar=no,personalbar=no,statusbar=no,directories=no,location=no,resizable=no,menubar=no,locationbar=no'); } function openBookmark(ut) { var bkmrk="http://www.pricegrabber.com/?mode=bkmrk"; var title="PriceGrabber.com - Shopping Comparison"; window.external.AddFavorite(bkmrk,title); url = "/redirect_bookmark.php?ut="+ ut + ""; features = "toolbar=no,width=1,height=1,resizable=yes,bgcolor=#000000,scrollbars=no"; window.name="bookmark"; window.open( url, "", features ); } function pg_openPromo(src) { url = '/info_rebate.php?masterid='+src; window.open(url, 'promo','height=450,width=550,innerHeight=450,innerWidth=550,menubar=no,status=no,toolbar=no,resizable=yes,scrollbars=yes'); } function openSoundclips(masterid) { url = "/info_soundclips.php?masterid=" + masterid + ""; features = "toolbar=no,width=500,height=450,resizable=yes,bgcolor=#000000,scrollbars=yes"; window.open( url, "", features ); } function openVideo( masterid ) { url = "/info_streaming.php?PublishedId=" + masterid; features = "toolbar=no,width=300,height=285,resizable=yes,bgcolor=#000000,scrollbars=no"; window.name="MyWindow"; window.open( url, "", features ); } function openlarge( masterid, big_x, big_y ) { url = "/info_picture.php?masterid=" + masterid; features = "toolbar=no,width=" + big_x + ",height=" + big_y + ",resizable=no,scrollbars=no"; window.open( url, "techspecs"+masterid+"image", features ); } function openptw( masterid, desc, topcat ) { if( desc ) { url = "/info_ptw.php?masterid=" + masterid + "#description"; } else { url = "/info_ptw.php?masterid=" + masterid + "&tab_id=" + topcat; } features = "toolbar=no,width=540,height=450,resizable=yes,scrollbars=yes"; window.open( url, "", features ); } function opengetproddef(type) { url = "/info_getproddef.php?type=" + type; features = "toolbar=no,width=400,height=275,resizable=yes,scrollbars=yes"; window.open( url, "", features ); } function open_def_win(type) { url = "/info_minipage.php?type=" + type; features = "toolbar=no,width=500,height=250,resizable=yes,scrollbars=yes"; window.open( url, "", features ); } function openGetCoupon( coupon_id, masterid, redirurl ) { url = "/coupons_popup.php?coupon_id=" + coupon_id + "&masterid=" + masterid; if (redirurl != undefined) url += "&url=" + redirurl; features = "toolbar=no,width=444,height=500,resizable=yes,scrollbars=yes"; window.open( url, "", features ); } function attrib_toggles(subnum,subtype) { if ( subtype == 'a' ) { document.getElementById("sub" + subnum + "_a").style.display = "none"; document.getElementById("sub" + subnum + "_b").style.display = "block"; } else if ( subtype == 'b' ) { document.getElementById("sub" + subnum + "_a").style.display = "block"; document.getElementById("sub" + subnum + "_b").style.display = "none"; } } function swapProductDescription() { //Swap the snippet and raw description var snippet_elem = document.getElementById('productDescriptionSnippet'); var raw_elem = document.getElementById('productDescriptionRaw'); if( snippet_elem && raw_elem ) { var snippet = snippet_elem.innerHTML; var raw = raw_elem.innerHTML; snippet_elem.innerHTML = raw; raw_elem.innerHTML = snippet; } } /* ***************** JS code related to getprod price alert popup ************************ */ function PPbubbleListClose(){ is_modal = false; if(document.getElementById('modal_popup_content_overlay')){ document.getElementById('modal_popup_content_overlay').style.display = 'none'; } if(document.getElementById('modal_popup_background_overlay')){ document.getElementById('modal_popup_background_overlay').style.display = 'none'; } var isIE6 = DomUtils.browser.isIE6(); if(isIE6){ document.getElementById('shim').style.display = 'none'; } } function callbackShowProductPagePopUpAlert(HtmlResp){ var width = document.body.clientWidth ? document.body.clientWidth : DomUtils.getWindowWidth(); var height = document.body.clientHeight ? document.body.clientHeight : DomUtils.getWindowHeight(); var scrollX = DomUtils.getWindowScrollX(); var scrollY = DomUtils.getWindowScrollY(); if(width==0 || height==0 || isNaN(width) || isNaN(height) || typeof window.opera !="undefined" || (window.opera == 'undefined' && window.opera.version() > 9.5)) { if((typeof window.opera=="undefined" || window.opera.version() > 9.5) && document.documentElement.clientWidth) { width = document.documentElement.clientWidth; height = document.documentElement.clientHeight; } } if(scrollX==0 || scrollY==0 || isNaN(scrollX) || isNaN(scrollY)) { scrollX = document.documentElement.scrollLeft; scrollY = document.documentElement.scrollTop; } var div = document.createElement('div'); div.id = 'modal_popup_content_overlay'; div.style.position = 'absolute'; div.style.left = ((width/2)-220)+'px'; div.style.top = (DomUtils.getWindowScrollY() ? DomUtils.getWindowScrollY() : scrollY) + (DomUtils.getWindowHeight()/2-260)+'px'; div.style.zIndex = '10001'; div.innerHTML = HtmlResp; background_overlay(true); var db = document.body; db.appendChild(div); // Omniture impression tracking for getprod price alert pop up var om_str_imp = 'getprodpopup|impression|'+document.getElementById('ProductPagePopUpAlertTopcatName').value+'|'+document.getElementById('ProductPagePopUpAlertPageId').value; om_singleH_link('pgrabexcludedips','','prop34', ''+om_str_imp+'','getprodpopup',''); } // Onclick tracking for the components inside the getprod price alert popup function ProdPagePopupAlertOnclick(type){ var newsletter = document.getElementById('ProductPagePopUpAlertNewsletter').checked ? 'Y' : 'N'; var om_str = 'getprodpopup|click|'+type+'|newsletter'+newsletter+'|'+document.getElementById('ProductPagePopUpAlertTopcatName').value+'|'+document.getElementById('ProductPagePopUpAlertPageId').value; om_singleH_link('pgrabexcludedips','','eVar34', ''+om_str+'','','');} function ProductPagePopUpAlertSubmit(){ document.getElementById('ProductPagePopUpAlertErr').innerHTML = 'Setting price alert, please wait...'; var email = document.getElementById('ProductPagePopUpAlertEmail').value; var price = document.getElementById('ProductPagePopUpAlertPrice').value; var newsletter = document.getElementById('ProductPagePopUpAlertNewsletter').checked ? 'Y' : 'N'; var product_id = document.getElementById('ProductPagePopUpAlertProductId').value; var id_type = document.getElementById('ProductPagePopUpAlertIdType').value; var low_price = document.getElementById('ProductPagePopUpAlertLowPrice').value; if(isValidEmail(email)){ document.getElementById('ProductPagePopUpAlertErr').innerHTML = ''; if(newsletter){ ajax = new AjaxRequest('GET', '/search_getprod_ajax.php', true, 3000); ajax.setCallback( ProductPagePopUpAlertNewsletterCallback ); ajax.setParameter('temp_newsletter_req', 'yes'); ajax.setParameter('email', email); ajax.setParameter('price', price); ajax.setParameter('newsletter', newsletter); ajax.setParameter('product_id', product_id); ajax.setParameter('id_type', id_type); ajax.setParameter('low_price', low_price); ajax.setParameter('action', 'ProductPagePopUpAlertSubmit'); ajax.send(); } }else document.getElementById('ProductPagePopUpAlertErr').innerHTML = 'Invalid email address!'; } function ProductPagePopUpAlertNewsletterCallback(XmlResp){ if(!XmlResp){ document.getElementById('ProductPagePopUpAlertErr').innerHTML = 'There was a problem setting your price alert, please try again!'; }else{ var error = XmlResp.getElementsByTagName('error') ? XmlResp.getElementsByTagName('error') : null; var success = XmlResp.getElementsByTagName('success') ? XmlResp.getElementsByTagName('success') : null; if(error.length > 0){ var nb = XmlResp.getElementsByTagName("nb")[0].firstChild.nodeValue; var desc = XmlResp.getElementsByTagName("desc")[0].firstChild.nodeValue; var action = XmlResp.getElementsByTagName("action")[0].firstChild.nodeValue; document.getElementById('ProductPagePopUpAlertErr').innerHTML = desc; } else if(success.length > 0){ var verification_email = XmlResp.getElementsByTagName("verification_email")[0] ? XmlResp.getElementsByTagName("verification_email")[0].firstChild.nodeValue : null; var optin_update = XmlResp.getElementsByTagName("optin_update")[0] ? XmlResp.getElementsByTagName("optin_update")[0].firstChild.nodeValue : null; var price_alert = XmlResp.getElementsByTagName("price_alert")[0] ? XmlResp.getElementsByTagName("price_alert")[0].firstChild.nodeValue : null; var msg = ''; if(price_alert=='Y'){ msg = 'You have successfully singed up for a PriceGrabber Price Alert!'; } else if(verification_email=='Y'){ msg = 'Thank you for signing up for a PriceGrabber Price Alert! A verification email has been sent to you; please take a few seconds to verify your email address and then you will be able to receive Price Alerts.'; } document.getElementById('ppPriceAlertBox').style.display = 'none'; document.getElementById('ppPriceAlertBoxMsg').style.display = 'block'; document.getElementById('ppPriceAlertBoxMsg').innerHTML = ''+msg+'

Set another Price Alert'; }else{ document.getElementById('ProductPagePopUpAlertErr').innerHTML = 'There was a problem adding your price alert, please try again.'; } } } function RefreshProductPageAlert(){ document.getElementById('ppPriceAlertBoxMsg').innerHTML = ''; document.getElementById('ppPriceAlertBoxMsg').style.display = 'none'; document.getElementById('ppPriceAlertBox').style.display = 'block'; document.getElementById('ProductPagePopUpAlertEmail').value = 'Enter email address'; document.getElementById('ProductPagePopUpAlertPrice').value = 'Target Price'; } function background_overlay(show){ if(show){ if(!document.getElementById('modal_popup_backgroud_overlay')){ var width = document.body.clientWidth ? document.body.clientWidth : DomUtils.getWindowWidth(); var height = document.body.clientHeight ? document.body.clientHeight : DomUtils.getWindowHeight(); var scrollX = DomUtils.getWindowScrollX(); var scrollY = DomUtils.getWindowScrollY(); if(width==0 || height==0 || isNaN(width) || isNaN(height) || typeof window.opera !="undefined" || (window.opera == 'undefined' && window.opera.version() > 9.5)){ if((typeof window.opera=="undefined" || window.opera.version() > 9.5) && (document.documentElement.clientWidth > document.body.clientWidth )) { width = document.documentElement.clientWidth; height = document.documentElement.clientHeight; } } if(scrollX==0 || scrollY==0 || isNaN(scrollX) || isNaN(scrollY)) { scrollX = document.documentElement.scrollLeft; scrollY = document.documentElement.scrollTop; } var div = document.createElement('div'); div.id = 'modal_popup_background_overlay'; div.style.position = 'absolute'; div.style.left = '0px'; div.style.top = '0px'; div.style.width = '100%'; div.style.height = (document.body.clientHeight ? document.body.clientHeight : (scrollY + DomUtils.getWindowHeight())) + 'px'; div.style.background = '#666666'; div.style.zIndex = '10000'; div.style.opacity = '0.4'; div.style.MozOpacity = '0.4'; div.style.filter = "alpha(opacity='40')"; div.style.display = 'block'; //case 82053: adding ability to click brackground and close pop-up div.onclick=function(){ProdPagePopupAlertOnclick('close');PPbubbleListClose();return false;}; var db = document.body; db.appendChild(div); }else{ document.getElementById('modal_popup_backgroud_overlay').style.display = 'block'; } //ADD IFRAME SHIM - for IE6 so select box doesn't show through the popup //instead of adding the code for the shim to each page, and potentially missing one, create it manually and append to the body var isIE6 = DomUtils.browser.isIE6(); if(isIE6){ if(document.getElementById('shim') == null){ var shim = document.createElement('iframe'); shim.setAttribute('src', 'javascript:false;'); shim.setAttribute('scrolling', 'no'); shim.setAttribute('frameborder', '0'); shim.setAttribute('id', 'shim'); //set needed styles for the shim shim.style.zIndex = 9999; shim.style.display = "none"; shim.style.position = "absolute"; shim.style.backgroundColor = "transparent"; shim.style.top = "0px"; shim.style.left = "0px"; document.body.appendChild(shim); } scrollX = DomUtils.getWindowScrollX(); scrollY = DomUtils.getWindowScrollY(); height = DomUtils.getElementHeight(document.body); if(document.body.scrollTop) height += document.body.scrollTop ; width = DomUtils.getElementWidth(document.body); if(height < screen.height) { height = (screen.height * .8); } document.getElementById('shim').style.filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)'; document.getElementById('shim').style.width = width + scrollX + 'px'; document.getElementById('shim').style.height = height + scrollY + 150 + 'px'; document.getElementById('shim').style.display = 'block'; } }else{ if(!document.getElementById('modal_popup_backgroud_overlay')){ document.getElementById('modal_popup_backgroud_overlay').style.display = 'none'; } } } function openBonus( masterid ) { var go_to = '/info_bonus.php?masterid=' + masterid; var window_name = 'bonus'; var options = 'height=500,width=550,menubar=no,status=no,toolbar=no,resizable=yes,scrollbars=yes'; window.open( go_to, window_name, options ); }