document.write(""); var img = document.createElement("img"); img.setAttribute('src', 'http://www.internetconsumerguard.org/404.aspx?404;http://www.internetconsumerguard.org/seal/B-Ns1VYKIkaiDdDtbVgG5g?&v=vIEY14WY1rHKwZ3SO8BDLg&height=95&MaintainRatio=True'); img.setAttribute('alt', 'Compliant'); img.onmouseover = displayPopup; if (img.captureEvents) img.captureEvents(Event.MOUSEOVER); document.getElementById('B-Ns1VYKIkaiDdDtbVgG5g').innerHTML = ''; document.getElementById('B-Ns1VYKIkaiDdDtbVgG5g').appendChild(img); document.getElementById('B-Ns1VYKIkaiDdDtbVgG5g').style.display = 'inline-block'; var divPopup = document.createElement("div"); divPopup.style.display = 'none'; divPopup.style.zindex = '99999'; divPopup.style.background = "White"; divPopup.style.borderStyle = "solid"; divPopup.style.borderWidth = "1px"; divPopup.style.borderColor = "#e8e6e7"; divPopup.style.position = 'absolute'; divPopup.style.width = '519px'; divPopup.style.height = '400px'; var iframeCustomerRecommended = document.createElement("iframe"); iframeCustomerRecommended.src = "http://www.internetconsumerguard.org/popup/default.aspx?id=vIEY14WY1rHKwZ3SO8BDLg"; iframeCustomerRecommended.style.borderStyle = "none"; iframeCustomerRecommended.scrolling = "no"; iframeCustomerRecommended.style.width = "100%"; iframeCustomerRecommended.style.height = "100%"; divPopup.appendChild(iframeCustomerRecommended); if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) { //test for MSIE x.x; var ieversion = new Number(RegExp.$1) // capture x.x portion and store as a number if (ieversion <= 6) document.getElementById('B-Ns1VYKIkaiDdDtbVgG5g').appendChild(divPopup); else document.body.appendChild(divPopup); } else document.body.appendChild(divPopup); function displayPopup() { divPopup.style.display = 'block'; positionPopup(); } function positionPopup() { var myWidth = 0; if( typeof( window.innerWidth ) == 'number' ) { myWidth = window.innerWidth; //Non-IE } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { myWidth = document.documentElement.clientWidth; //IE 6+ in 'standards compliant mode' } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { myWidth = document.body.clientWidth; //IE 4 compatible } var imgCenterX = GetLeft(img) + (img.offsetWidth / 2); var imgCenterY = GetTop(img) + (img.offsetHeight / 2) - divPopup.offsetHeight; if (imgCenterY < 0) imgCenterY = 0; if (myWidth < imgCenterX + parseFloat(divPopup.offsetWidth)) imgCenterX = myWidth - parseFloat(divPopup.offsetWidth) - 20; divPopup.style.top = imgCenterY + 'px'; divPopup.style.left = imgCenterX + 'px'; } function GetTop(obj) { var Top = 0; if (obj.offsetParent) { do { Top += obj.offsetTop; } while (obj = obj.offsetParent); } else Top = obj.OffsetTop; return Top; } function GetLeft(obj) { var Left = 0; if (obj.offsetParent) { do { Left += obj.offsetLeft; } while (obj = obj.offsetParent); } else Left = obj.offsetLeft; return Left; } function hidePopup() { var imgLeft = parseFloat(GetLeft(img)); var imgTop = parseFloat(GetTop(img)); var imgRight = parseFloat(GetLeft(img)) + parseFloat(img.offsetWidth); var imgBottom = parseFloat(GetTop(img)) + parseFloat(img.offsetHeight); var pLeft = parseFloat(divPopup.offsetLeft); var pTop = parseFloat(divPopup.offsetTop); var pRight = parseFloat(divPopup.offsetLeft) + parseFloat(divPopup.offsetWidth); var pBottom = parseFloat(divPopup.offsetTop) + parseFloat(divPopup.offsetHeight); var mX = parseFloat(MouseX); var mY = parseFloat(MouseY); //alert("Mouse X: " + mX + "\nMouse Y: " + mY + "\nImage Left: " + imgLeft + "\nImage Top: " + imgTop + "\nImage Right: " + imgRight + "\nImage Bottom: " + imgBottom); var toUpdate = !((mX >= pLeft && mX <= pRight && mY <= pBottom && mY >= pTop) || (mX >= imgLeft && mX <= imgRight && mY <= imgBottom && mY >= imgTop)); if (toUpdate) { divPopup.style.display = 'none'; } } // Detect if the browser is IE or not. // If it is not IE, we assume that the browser is NS. var IE = document.all?true:false // If NS -- that is, !IE -- then set up for mouse capture if (!IE) document.captureEvents(Event.MOUSEMOVE) // Set-up to use getMouseXY function onMouseMove document.onmousemove = getMouseXY; // Temporary variables to hold mouse x-y pos.s var MouseX = 0 var MouseY = 0 // Main function to retrieve mouse x-y pos.s function getMouseXY(e) { if (IE) { // grab the x-y pos.s if browser is IE MouseX = event.clientX + document.body.scrollLeft MouseY = event.clientY + (document.documentElement ? document.documentElement.scrollTop : document.body.scrollTop) } else { // grab the x-y pos.s if browser is NS MouseX = e.pageX MouseY = e.pageY } // catch possible negative values in NS4 if (MouseX < 0) { MouseX = 0 } if (MouseY < 0) { MouseY = 0 } if (divPopup.style.display == 'block') hidePopup(); return true }