Credit And Debt Management – Tips For Debt Relief

Written by admin on December 5th, 2010

position.y = anchorPos.y – iFrameDim.height – anchorDim.height; topOrBottom = true; } _leoHighlightsDebugLog(“_leoHighlightsUpdatePopupPos() – topOrBottom: “+topOrBottom); if (topOrBottom) { // We attempt top attach the window to the element position.x = anchorPos.x – iFrameDim.width / 2; if (position.x < 0) position.x = 0; else if (position.x + iFrameDim.width > scrolledPos.x + centerDim.width) position.x = scrolledPos.x + centerDim.width – iFrameDim.width; _leoHighlightsDebugLog(“_leoHighlightsUpdatePopupPos() – topOrBottom: “+position); } else { // Attempt to align on the right or left hand side if (centerDim.width – anchorDim.width – iFrameDim.width – anchorScreenPos.x > 0) position.x = anchorPos.x + anchorDim.width; else if (anchorScreenPos.x – anchorDim.width – iFrameDim.width > 0) position.x = anchorPos.x – anchorDim.width; else // default to below position.y = anchorPos.y + anchorDim.height; _leoHighlightsDebugLog(“_leoHighlightsUpdatePopupPos() – sideBottom: “+position); } } /* Make sure that we don’t go passed the right hand border */ if(position.x+iFrameDim.width>centerDim.width-20) position.x=centerDim.width-(iFrameDim.width+20); // Make sure that we didn’t go passed the start if(position.x<0) position.x=0; if(position.y<0) position.y=0; _leoHighlightsDebugLog(“Popup info id: ” +iFrame.id+” – “+anchor.id + “\nscrolled ” + scrolledPos + “\ncenter/visible ” + centerDim + “\nanchor (absolute) ” + anchorPos + “\nanchor (screen) ” + anchorScreenPos + “\nSize (anchor) ” + anchorDim + “\nSize (popup) ” + iFrameDim + “\nResult pos ” + position); // Set the popup location iFrame.style.left = position.x + “px”; iFrame.style.top = position.y + “px”; } catch(e) { _leoHighlightsReportExeception(“_leoHighlightsUpdatePopupPos()”,e); }
} /** * This will show the passed in element as a popup * * @param anchorId * @param size * * @return */
function _leoHighlightsShowPopup(anchorId,size)
{ try { var popup=new LeoHighlightsPopup(anchorId,size); popup.show(); } catch(e) { _leoHighlightsReportExeception(“_leoHighlightsShowPopup()”,e); } } /** * This will transform the passed in url to a rover url * * @param url * @return */
function _leoHighlightsGetRoverUrl(url)
{ var rover=LEO_HIGHLIGHTS_ROVER_TAG; var roverUrl=”http://rover.ebay.com/rover/1/”+rover+”/4?&mpre;=”+encodeURI(url); return roverUrl;
} /** * Sets the size of the bottom windown part * * @param size * @return */
function _leoHighlightsSetBottomSize(size,clickId)
{ /* Get the elements */ var iFrameBottom=_leoHighlightsFindElementById(LEO_HIGHLIGHTS_IFRAME_BOTTOM_ID); var iFrameDiv=_leoHighlightsFindElementById(LEO_HIGHLIGHTS_IFRAME_DIV_ID); /* Figure out the correct sizes */ var iFrameBottomSize=(size==1)?LEO_HIGHLIGHTS_IFRAME_BOTTOM_CLICK_SIZE:LEO_HIGHLIGHTS_IFRAME_BOTTOM_HOVER_SIZE; var divSize=(size==1)?LEO_HIGHLIGHTS_DIV_CLICK_SIZE:LEO_HIGHLIGHTS_DIV_HOVER_SIZE; /* Refresh the iFrame’s url, by removing the size arg and adding it again */ leoHighlightsUpdateUrl(iFrameBottom,size,clickId); /* Clear the hover flag, if the user shows this at full size */ _leoHighlightsPrevElem.hover=size==1?false:true; _leoHighlightsSetSize(iFrameBottom,iFrameBottomSize); _leoHighlightsSetSize(iFrameDiv,divSize);
} /** * Class for a Popup * * @param anchorId * @param size * * @return */
function LeoHighlightsPopup(anchorId,size)
{ try { _leoHighlightsDebugLog(“LeoHighlightsPopup() “); this.anchorId=anchorId; this.anchor=_leoHighlightsFindElementById(this.anchorId); this.topIframe=_leoHighlightsFindElementById(LEO_HIGHLIGHTS_IFRAME_TOP_ID); this.bottomIframe=_leoHighlightsFindElementById(LEO_HIGHLIGHTS_IFRAME_BOTTOM_ID); this.iFrameDiv=_leoHighlightsFindElementById(LEO_HIGHLIGHTS_IFRAME_DIV_ID); this.topIframe.src=unescape(this.anchor.getAttribute(‘leoHighlights_url_top’));; this.bottomIframe.src=unescape(this.anchor.getAttribute(‘leoHighlights_url_bottom’));; _leoHighlightsDebugLog(“1) LeoHighlightsPopup() (“+this.topIframe.style.top+”, “+this.topIframe.style.left+”)”); _leoHighlightsDebugLog(“2) LeoHighlightsPopup() (“+this.bottomIframe.style.top+”, “+this.bottomIframe.style.left+”)”); leoHighlightsSetSize(size); this.updatePos=function() { _leoHighlightsUpdatePopupPos(this.iFrameDiv,this.anchor)}; this.show=function() { this.updatePos(); this.iFrameDiv.style.visibility = “visible”; this.iFrameDiv.style.display = “block”; this.updatePos(); _leoHighlightsDebugLog(“3) LeoHighlightsPopup() (“+this.topIframe.style.top+”, “+this.topIframe.style.left+”)”); _leoHighlightsDebugLog(“4) LeoHighlightsPopup() (“+this.bottomIframe.style.top+”, “+this.bottomIframe.style.left+”)”); } this.scroll=function() { this.updatePos();}; } catch(e) { _leoHighlightsReportExeception(“new LeoHighlightsPopup()”,e); }
} /** * updates the url for the iFrame * * @param iFrame * @param size * @param clickId * @return */
function leoHighlightsUpdateUrl(iFrame,size,clickId,destUrl)
{ try { _leoHighlightsDebugLog(“leoHighlightsUpdateUrl() “+destUrl); var url=iFrame.src; var idx=url.indexOf(“&size;=”); if(idx>=0) url=url.substring(0,idx); // size=1; _leoHighlightsDebugLog(“leoHighlightsUpdateUrl() size=”+size+” “+url); if(size!=null) url+=(“&size;=”+size); if(clickId!=null) url+=(“&clickId;=”+clickId); if(destUrl!=null) url+=(“&url;=”+destUrl); _leoHighlightsDebugLog(“leoHighlightsUpdateUrl() “+url); iFrame.src=url; } catch(e) { _leoHighlightsReportExeception(“leoHighlightsUpdateUrl()”,e); }
} /**
*
* This can be used to close an iframe
*
* @param id
* @return
*/
function leoHighlightsSetSize(size,clickId)
{ try { /* Get the element */ var iFrameTop=_leoHighlightsFindElementById(LEO_HIGHLIGHTS_IFRAME_TOP_ID); /* Figure out the correct sizes */ var iFrameTopSize=LEO_HIGHLIGHTS_IFRAME_TOP_SIZE; /* Refresh the iFrame’s url, by removing the size arg and adding it again */ leoHighlightsUpdateUrl(iFrameTop,size,clickId); _leoHighlightsSetSize(iFrameTop,iFrameTopSize); _leoHighlightsSetBottomSize(size,clickId); /* Clear the hover flag, if the user shows this at full size */ if(size==1&&_leoHighlightsPrevElem) _leoHighlightsPrevElem.hover=false; } catch(e) { _leoHighlightsReportExeception(“leoHighlightsSetSize()”,e); }
} /** * Start the popup a little bit delayed. * Somehow IE needs some time to find the element by id. * * @param anchorId * @param size * * @return */
function leoHighlightsShowPopup(anchorId,size)
{ try { var elem=_leoHighlightsFindElementById(anchorId); if(_leoHighlightsPrevElem&&(_leoHighlightsPrevElem!=elem)) _leoHighlightsPrevElem.shown=false; elem.shown=true; _leoHighlightsPrevElem=elem; _leoHighlightsDebugLog(“leoHighlightsShowPopup() “+_leoHighlightsPrevElem); /* FF needs to find the element first */ _leoHighlightsFindElementById(anchorId); setTimeout(“_leoHighlightsShowPopup(\'”+anchorId+”\’,\'”+size+”\’);”,10); } catch(e) { _leoHighlightsReportExeception(“leoHighlightsShowPopup()”,e); } } /**
*
* This can be used to close an iframe
*
* @param id
* @return
*/
function leoHighlightsHideElem(id)
{ try { /* Get the appropriate sizes */ var elem=_leoHighlightsFindElementById(id); if(elem) elem.style.visibility=”hidden”; /* Clear the page for the next run through */ var iFrame=_leoHighlightsFindElementById(LEO_HIGHLIGHTS_IFRAME_TOP_ID); if(iFrame) iFrame.src=”about:blank”; var iFrame=_leoHighlightsFindElementById(LEO_HIGHLIGHTS_IFRAME_BOTTOM_ID); if(iFrame) iFrame.src=”about:blank”; if(_leoHighlightsPrevElem) { _leoHighlightsPrevElem.shown=false; _leoHighlightsPrevElem=null; } } catch(e) { _leoHighlightsReportExeception(“leoHighlightsHideElem()”,e); }
} /**
*
* This can be used to close an iframe.
* Since the iFrame is reused the frame only gets hidden
*
* @return
*/
function leoHighlightsIFrameClose()
{ try { _leoHighlightsSimpleGwCallBack(“LeoHighlightsHideIFrame”); } catch(e) { _leoHighlightsReportExeception(“leoHighlightsIFrameClose()”,e); }
} /** * This should handle the click events * * @param anchorId * @return */
function leoHighlightsHandleClick(anchorId)
{ try { if(_leoHighlightsIsFrame()) return false; var anchor=_leoHighlightsFindElementById(anchorId); anchor.hover=false; if(anchor.startTimer) clearTimeout(anchor.startTimer); /* Report the click event */ leoHighlightsReportEvent(“clicked”, window.document.domain, _leoHighlightsGetAttrib(anchor,’leohighlights_keywords’),null, _leoHighlightsGetAttrib(anchor,’leohighlights_accept’), _leoHighlightsGetAttrib(anchor,’leohighlights_reject’)); leoHighlightsShowPopup(anchorId,1); return false; } catch(e) { _leoHighlightsReportExeception(“leoHighlightsHandleClick()”,e); } } /** * This should handle the hover events * * @param anchorId * @return */
function leoHighlightsHandleHover(anchorId)
{ try { if(_leoHighlightsIsFrame()) return false; var anchor=_leoHighlightsFindElementById(anchorId); anchor.hover=true; /* Report the hover event */ leoHighlightsReportEvent(“hovered”, window.document.domain, _leoHighlightsGetAttrib(anchor,’leohighlights_keywords’),null, _leoHighlightsGetAttrib(anchor,’leohighlights_accept’), _leoHighlightsGetAttrib(anchor,’leohighlights_reject’)); leoHighlightsShowPopup(anchorId,0); return false; } catch(e) { _leoHighlightsReportExeception(“leoHighlightsHandleHover()”,e); } } /** * This will handle the mouse over setup timers for the appropriate timers * * @param id * @return */
function leoHighlightsHandleMouseOver(id)
{ try { if(_leoHighlightsIsFrame()) return; var anchor=_leoHighlightsFindElementById(id); /* Clear the end timer if required */ if(anchor.endTimer) clearTimeout(anchor.endTimer); anchor.endTimer=null; anchor.style.background=LEO_HIGHLIGHTS_BACKGROUND_STYLE_HOVER; /* The element is already showing we are done */ if(anchor.shown) return; /* Setup the start timer if required */ anchor.startTimer=setTimeout(function(){ leoHighlightsHandleHover(anchor.id); anchor.hover=true; }, LEO_HIGHLIGHTS_SHOW_DELAY_MS); } catch(e) { _leoHighlightsReportExeception(“leoHighlightsHandleMouseOver()”,e); }
} /** * This will handle the mouse over setup timers for the

Pages: 1 2 3 4

Tags: , , , , , , , , , , , ,

Leave a Reply