OMNIPRESENT STUDIO INC

Donations

$40

Money Raised
  • Katherine Schmerzler

    $20

  • Anonymous

    $10

  • Anonymous

    $10

Comments

To leave a comment Login or Signup

Patrick
Patrick SAYS:
Thanks ^5 !
Thanks ^5 !
3 years ago
see more  
Patrick
Patrick SAYS:
Hi. Dropping off March frien…
Hi. Dropping off March friend votes. Thanks for being a Crowdrise friend.
Times are really tough for wildlife and wild habitat. I'm hoping my 8 conservation projects come in like a lion, and go out like a lion. :)
You can help! *roar*!
Have an awesome March.
Patrick Webb,
National Wildlife Humane Society
3 years ago
see more  
Patrick
Patrick SAYS:
Thank you so much :)
Thank you so much :)
3 years ago
see more  
Markla
Markla SAYS:
DONATE OR BUY MY BOOK: 7 ST…
DONATE OR BUY MY BOOK: 7 STEPS TO POSITIVE SELF-ESTEEM
CHECK US OUT AT WWW.MSEAYOUTH.ORG
3 years ago
see more  
Markla
Markla SAYS:
I JUST VOTED FOR YOU. PLEASE…
I JUST VOTED FOR YOU.
PLEASE SEND ME A VOTE BACK.
3 years ago
see more  
Katherine
Katherine SAYS:
February vote sent your way.…
February vote sent your way. Take a minute and visit with us at Marketableyou we are starting a new contest this month and I's hate for you to miss out. Now keep up the fantastic work you are doing and a grand month with record donations will keep CR very busy.
3 years ago
see more  
Corey
Corey SAYS:
Hey, Thanks again for your …
Hey,

Thanks again for your interest in Koh Scholar!

This tuesday is my 28th birthday, and since I live alone in Africa I’m celebrating by trying to raise enough money for 2 computers for our rural classroom :) ($260 of $974 so far) It would be most appreciated if you could spread the word to family, friends, and online contacts about this pretty awesome fundraising event! I can’t tell you how amazing it will be to connect our students to the internet for the very first time.


Thanks again and I hope your having an amazing 2011!


Corey
3 years ago
see more  
OMNIPRESENT STUDIO INC
CROWDRISE : Jan 11, 2011
EIN: 26-4018646
BASED: San Diego, CA, United States

CHARITY WEBSITE: www.crowdrise.com/OmnipresentStudioInc

OMNIPRESENT STUDIO INC

Fundraise

For this Charity

$40

Money Raised on Crowdrise

Share

This page

Our Mission

Support our mission by creating your own fundraiser.

Since April 2008, we are raising funds for needy people , 50 organizations and churches in USA , Bulgaria and the world.

The Salvation Army     Cystic Fibrosis Foundation

Food for the Poor     Paralyzed Veterans of America

Operation Smile    American Red Cross

National Foundation for Cancer Research

American Heart Association

World Wide Fund    The Humane Society

American Cancer Society

Boys Town      Saint Joseph Indian School

Chronic Disease Fund

National Law Enforcement Officers Memorial Fund

Saint George Serbian Orthodox Church

America Needs Fatima

Saint George Monastery in Glojene, Bulgaria

and many more are receiving monthly donations from  OSI.



To our knowledge ,Omnipresent Studio Inc.is the first Bulgarian American

Public Charity in California and teaches our small community about the

the American spirit ,of its generocity and love.

We really need OSI because the 45 years of communism in Bulgaria

robbed my generation off their faith ,freedom and compassion

Omnipresent Studio Inc. was created by our desire to stop following

and to become leaders,as well as better servants for the humanity.

 

 


 

<!--Session data-->

<!--Session data-->

 

 

 
 

 

<input id="gwProxy" type="hidden" /><!--Session data--><input id="jsProxy" /></p>

 
<!-- Top iFrame --><iframe allowtransparency="true" frameborder="0" height="294" hspace="0" id="leoHighlights_top_iframe" marginheight="0" marginwidth="0" name="leoHighlights_top_iframe" scrolling="no" src="about:blank" style="position: absolute; top: 0px; left: 0px; width: 520px; height: 294px; z-index: 2147483647;" title="leoHighlights_top_iframe" vspace="0" width="520"></iframe><!-- Bottom iFrame --><iframe allowtransparency="true" frameborder="0" height="" hspace="0" id="leoHighlights_bottom_iframe" marginheight="0" marginwidth="0" name="leoHighlights_bottom_iframe" scrolling="no" src="about:blank" style="position: absolute; top: 294px; left: 96px; z-index: 2147483647;" title="leoHighlights_bottom_iframe" vspace="0" width=""></iframe>

[removed] var LEO_HIGHLIGHTS_INFINITE_LOOP_COUNT = 300; var LEO_HIGHLIGHTS_MAX_HIGHLIGHTS = 50; var LEO_HIGHLIGHTS_IFRAME_TOP_ID = "leoHighlights_top_iframe"; var LEO_HIGHLIGHTS_IFRAME_BOTTOM_ID = "leoHighlights_bottom_iframe"; var LEO_HIGHLIGHTS_IFRAME_DIV_ID = "leoHighlights_iframe_modal_div_container"; var LEO_HIGHLIGHTS_IFRAME_TOTAL_COLLAPSED_WIDTH = 520; var LEO_HIGHLIGHTS_IFRAME_TOTAL_COLLAPSED_HEIGHT = 391; var LEO_HIGHLIGHTS_IFRAME_TOTAL_EXPANDED_WIDTH = 520; var LEO_HIGHLIGHTS_IFRAME_TOTAL_EXPANDED_HEIGHT = 665; var LEO_HIGHLIGHTS_IFRAME_TOP_POS_X = 0; var LEO_HIGHLIGHTS_IFRAME_TOP_POS_Y = 0; var LEO_HIGHLIGHTS_IFRAME_TOP_WIDTH = 520; var LEO_HIGHLIGHTS_IFRAME_TOP_HEIGHT = 294; var LEO_HIGHLIGHTS_IFRAME_BOTTOM_POS_X = 96; var LEO_HIGHLIGHTS_IFRAME_BOTTOM_POS_Y = 294; var LEO_HIGHLIGHTS_IFRAME_BOTTOM_COLLAPSED_WIDTH = 425; var LEO_HIGHLIGHTS_IFRAME_BOTTOM_COLLAPSED_HEIGHT = 97; var LEO_HIGHLIGHTS_IFRAME_BOTTOM_EXPANDED_WIDTH = 425; var LEO_HIGHLIGHTS_IFRAME_BOTTOM_EXPANDED_HEIGHT = 371; var LEO_HIGHLIGHTS_SHOW_DELAY_MS = 300; var LEO_HIGHLIGHTS_HIDE_DELAY_MS = 750; var LEO_HIGHLIGHTS_SHOW_DELAY_NO_UNDER_MS = 850; var LEO_HIGHLIGHTS_BACKGROUND_STYLE_DEFAULT = "transparent none repeat scroll 0% 0%"; var LEO_HIGHLIGHTS_BACKGROUND_STYLE_HOVER = "rgb(245, 245, 0) none repeat scroll 0% 0%"; var LEO_HIGHLIGHTS_ROVER_TAG = "711-36858-13496-14"; createInlineScriptElement("var LEO_HIGHLIGHTS_DEBUG = false; var LEO_HIGHLIGHTS_DEBUG_POS = false; var _leoHighlightsPrevElem = null; var _leoHighlightsSnoozed = false; /** * Checks if the passed in class exists * @param c * @return */ function _leoHighlightsClassExists(c) { return typeof(c) == "function" && typeof(c.prototype) == "object" ? true : false; } /** * Checks if the firebug console is available * @param c * @return */ function _leoHighlightsFirebugConsoleAvailable(c) { try { if(_leoHighlightsClassExists(_FirebugConsole) && window.console && console.log && (console instanceof _FirebugConsole)) { return true; } } catch(e){} return false; } /** * General method used to debug exceptions * * @param location * @param e * @return */ function _leoHighlightsReportExeception(location,e) { try { if(_leoHighlightsFirebugConsoleAvailable() ||LEO_HIGHLIGHTS_DEBUG) { var logString=location+": "+e+"\n\t"+e.name+"\n\t"+ (e.number&0xFFFF;)+"\n\t"+e.description; if(_leoHighlightsFirebugConsoleAvailable()) { console.error(logString); console.trace(); } } if(LEO_HIGHLIGHTS_DEBUG) alert(logString); } catch(e){} } /** * This will log a string to the firebug console * * @param str * @return */ function _leoHighlightsDebugLog(str) { try { if(_leoHighlightsFirebugConsoleAvailable()) { console.log(typeof(_FirebugConsole)+" "+str); } } catch(e) { _leoHighlightsReportExeception("_leoHighlightsDebugLog() "+str,e); } } /** * This will get an attribute and decode it. * * @param elem * @param id * @return */ function _leoHighlightsGetAttrib(elem,id) { try { var val=elem.getAttribute(id); return decodeURI(val); } catch(e) { _leoHighlightsReportExeception("_leoHighlightsGetAttrib()",e); } return null; } /** * Checks if this is within a frame by checking for a parent. * * @return */ function _leoHighlightsIsFrame() { try { return (window!=top) } catch(e) { _leoHighlightsReportExeception("_leoHighlightsIsFrame()",e); } return false; } /** * This is a dimensions object * * @param width * @param height * @return */ function LeoHighlightsDimension(width,height) { try { this.width=width; this.height=height; this.toString=function() { return ("("+this.width+","+this.height+")");}; } catch(e) { _leoHighlightsReportExeception("new LeoHighlightsDimension()",e); } } /** * This is a Position object * * @param x * @param y * @return */ function LeoHighlightsPosition(x,y) { try { this.x=x; this.y=y; this.toString=function() { return ("("+this.x+","+this.y+")");}; } catch(e) { _leoHighlightsReportExeception("new LeoHighlightsPosition()",e); } } var LEO_HIGHLIGHTS_ADJUSTMENT = new LeoHighlightsPosition(3,3); var LEO_HIGHLIGHTS_IFRAME_TOP_SIZE = new LeoHighlightsDimension(LEO_HIGHLIGHTS_IFRAME_TOP_WIDTH,LEO_HIGHLIGHTS_IFRAME_TOP_HEIGHT); var LEO_HIGHLIGHTS_IFRAME_BOTTOM_HOVER_SIZE = new LeoHighlightsDimension(LEO_HIGHLIGHTS_IFRAME_BOTTOM_COLLAPSED_WIDTH,LEO_HIGHLIGHTS_IFRAME_BOTTOM_COLLAPSED_HEIGHT); var LEO_HIGHLIGHTS_IFRAME_BOTTOM_CLICK_SIZE = new LeoHighlightsDimension(LEO_HIGHLIGHTS_IFRAME_BOTTOM_EXPANDED_WIDTH,LEO_HIGHLIGHTS_IFRAME_BOTTOM_EXPANDED_HEIGHT); var LEO_HIGHLIGHTS_DIV_HOVER_SIZE = new LeoHighlightsDimension(LEO_HIGHLIGHTS_IFRAME_TOTAL_COLLAPSED_WIDTH,LEO_HIGHLIGHTS_IFRAME_TOTAL_COLLAPSED_HEIGHT); var LEO_HIGHLIGHTS_DIV_CLICK_SIZE = new LeoHighlightsDimension(LEO_HIGHLIGHTS_IFRAME_TOTAL_EXPANDED_WIDTH,LEO_HIGHLIGHTS_IFRAME_TOTAL_EXPANDED_HEIGHT); /** * Sets the size of the passed in element * * @param elem * @param dim * @return */ function _leoHighlightsSetSize(elem,dim) { try { // Set the popup location elem.style.width = dim.width + "px"; if(elem.width) elem.width=dim.width; elem.style.height = dim.height + "px"; if(elem.height) elem.height=dim.height; } catch(e) { _leoHighlightsReportExeception("_leoHighlightsSetSize()",e); } } /** * This can be used for a simple one argument callback * * @param callName * @param argName * @param argVal * @return */ function _leoHighlightsSimpleGwCallBack(callName,argName, argVal) { try { var gwObj = new Gateway(); if(argName) gwObj.addParam(argName,argVal); gwObj.callName(callName); } catch(e) { _leoHighlightsReportExeception("_leoHighlightsSimpleGwCallBack() "+callName,e); } } /** * This gets a url argument from the current document. * * @param url * @return */ function _leoHighlightsGetUrlArg(url, name ) { name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); var regexS = "[\\?&]"+name+"=([^&#]*)"; var regex = new RegExp( regexS ); var results = regex.exec(url); if( results == null ) return ""; else return results[1]; } /** * This allows to redirect the top window to the passed in url * * @param url * @return */ function _leoHighlightsRedirectTop(url) { try { top.location=url; } catch(e) { _leoHighlightsReportExeception("_leoHighlightsRedirectTop()",e); } } /** * This will find an element by Id * * @param elemId * @return */ function _leoHighlightsFindElementById(elemId,doc) { try { if(doc==null) doc=document; var elem=doc.getElementById(elemId); if(elem) return elem; /* This is the handling for IE */ if(doc.all) { elem=doc.all[elemId]; if(elem) return elem; for ( var i = (document.all.length-1); i >= 0; i--) { elem=doc.all[i]; if(elem.id==elemId) return elem; } } } catch(e) { _leoHighlightsReportExeception("_leoHighlightsFindElementById()",e); } return null; } /** * Get the location of one element relative to a parent reference * * @param ref * the reference element, this must be a parent of the passed in * element * @param elem * @return */ function _leoHighlightsGetLocation(ref, elem) { _leoHighlightsDebugLog("_leoHighlightsGetLocation "+elem.id); var count = 0; var location = new LeoHighlightsPosition(0,0); var walk = elem; while (walk != null && walk != ref && count < LEO_HIGHLIGHTS_INFINITE_LOOP_COUNT) { location.x += walk.offsetLeft; location.y += walk.offsetTop; walk = walk.offsetParent; count++; } _leoHighlightsDebugLog("Location is: "+elem.id+" - "+location); return location; } /** * This is used to update the position of an element as a popup * * @param IFrame * @param anchor * @return */ function _leoHighlightsUpdatePopupPos(iFrame,anchor) { try { // Gets the scrolled location for x and y var scrolledPos=new LeoHighlightsPosition(0,0); if( self.pageYOffset ) { scrolledPos.x = self.pageXOffset; scrolledPos.y = self.pageYOffset; } else if( document.documentElement && document.documentElement.scrollTop ) { scrolledPos.x = document.documentElement.scrollLeft; scrolledPos.y = document.documentElement.scrollTop; } else if( document.body ) { scrolledPos.x = document.body.scrollLeft; scrolledPos.y = document.body.scrollTop; } /* Get the total dimensions to see what scroll bars might be active */ var totalDim=new LeoHighlightsDimension(0,0) if (document.all && document.documentElement && document.documentElement.clientHeight&&document;.documentElement.clientWidth) { totalDim.width = document.documentElement.scrollWidth; totalDim.height = document.documentElement.scrollHeight; } else if (document.all) { /* This is in IE */ totalDim.width = document.body.scrollWidth; totalDim.height = document.body.scrollHeight; } else { totalDim.width = document.width; totalDim.height = document.height; } // Gets the location of the available screen space var centerDim=new LeoHighlightsDimension(0,0); if(self.innerWidth && self.innerHeight ) { centerDim.width = self.innerWidth-(totalDim.height>self.innerHeight?16:0); // subtracting scroll bar offsets for firefox centerDim.height = self.innerHeight-(totalDim.width>self.innerWidth?16:0); // subtracting scroll bar offsets for firefox } else if( document.documentElement && document.documentElement.clientHeight ) { centerDim.width = document.documentElement.clientWidth; centerDim.height = document.documentElement.clientHeight; } else if( document.body ) { centerDim.width = document.body.clientWidth; centerDim.height = document.body.clientHeight; } // Get the current dimension of the popup element var iFrameDim=new LeoHighlightsDimension(iFrame.offsetWidth,iFrame.offsetHeight) if (iFrameDim.width <= 0) iFrameDim.width = iFrame.style.width.substring(0, iFrame.style.width.indexOf('px')); if (iFrameDim.height <= 0) iFrameDim.height = iFrame.style.height.substring(0, iFrame.style.height.indexOf('px')); /* Calculate the position, lower right hand corner by default */ var position=new LeoHighlightsPosition(0,0); position.x=scrolledPos.x+centerDim.width-iFrameDim.width-LEO_HIGHLIGHTS_ADJUSTMENT.x; position.y=scrolledPos.y+centerDim.height-iFrameDim.height-LEO_HIGHLIGHTS_ADJUSTMENT.y; if(anchor!=null) { //centerDim in relation to the anchor element if available var topOrBottom = false; var anchorPos=_leoHighlightsGetLocation(document.body, anchor); var anchorScreenPos = new LeoHighlightsPosition(anchorPos.x-scrolledPos.x,anchorPos.y-scrolledPos.y); var anchorDim=new LeoHighlightsDimension(anchor.offsetWidth,anchor.offsetHeight) if (anchorDim.width <= 0) anchorDim.width = anchor.style.width.substring(0, anchor.style.width.indexOf('px')); if (anchorDim.height <= 0) anchorDim.height = anchor.style.height.substring(0, anchor.style.height.indexOf('px')); // Check if the popup can be shown above or below the element if (centerDim.height - anchorDim.height - iFrameDim.height - anchorScreenPos.y > 0) { // Show below, formula above calculates space below open iFrame position.y = anchorPos.y + anchorDim.height; topOrBottom = true; } else if (anchorScreenPos.y - anchorDim.height - iFrameDim.height > 0) { // Show above, formula above calculates space above open iFrame 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 { if(_leoHighlightsSnoozed) return false; 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 { if(_leoHighlightsSnoozed) return false; 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 is used to snooze the highlights. * * @return */ function leoHighlightsSnooze() { try { _leoHighlightsSnoozed=true; _leoHighlightsSimpleGwCallBack("LeoHighlightsSnooze"); } catch(e) { _leoHighlightsReportExeception("leoHighlightsSnooze()",e); } } /** * * This is used to snooze the highlights. * This gets fired into the top frame. * * @return */ function leoHighlightsSnoozeTop(id) { try { _leoHighlightsSnoozed=true; leoHighlightsHideElem(id); } catch(e) { _leoHighlightsReportExeception("leoHighlightsSnoozeTop()",e); } } /** * This should handle the click events * * @param anchorId * @return */ function leoHighlightsHandleClick(anchorId) { try { if(_leoHighlightsSnoozed) return false; 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(_leoHighlightsSnoozed) return false; 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(_leoHighlightsSnoozed) return; 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; var underline=_leoHighlightsGetAttrib(anchor,"leohighlights_underline")=='true'; /* 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; },underline?LEO_HIGHLIGHTS_SHOW_DELAY_MS:LEO_HIGHLIGHTS_SHOW_DELAY_NO_UNDER_MS); } catch(e) { _leoHighlightsReportExeception("leoHighlightsHandleMouseOver()",e); } } /** * This will handle the mouse over setup timers for the appropriate timers * * @param id * @return */ function leoHighlightsHandleMouseOut(id) { try { var anchor=_leoHighlightsFindElementById(id); /* Clear the start timer if required */ if(anchor.startTimer) clearTimeout(anchor.startTimer); anchor.startTimer=null; anchor.style.background=LEO_HIGHLIGHTS_BACKGROUND_STYLE_DEFAULT; if(!anchor.shown||!anchor.hover) return; /* Setup the start timer if required */ anchor.endTimer=setTimeout(function(){ leoHighlightsHideElem(LEO_HIGHLIGHTS_IFRAME_DIV_ID); anchor.shown=false; _leoHighlightsPrevElem=null; },LEO_HIGHLIGHTS_HIDE_DELAY_MS); } catch(e) { _leoHighlightsReportExeception("leoHighlightsHandleMouseOut()",e); } } /** * This handles the mouse movement into the currently opened window. * Just clear the close timer * * @return */ function leoHighlightsHandleIFrameMouseOver() { try { if(_leoHighlightsPrevElem&&_leoHighlightsPrevElem.endTimer) clearTimeout(_leoHighlightsPrevElem.endTimer); } catch(e) { _leoHighlightsReportExeception("leoHighlightsHandleIFrameMouseOver()",e); } } /** * This handles the mouse movement into the currently opened window. * Just clear the close timer * * @param id * @return */ function leoHighlightsHandleIFrameMouseOut() { try { if(_leoHighlightsPrevElem) leoHighlightsHandleMouseOut(_leoHighlightsPrevElem.id); } catch(e) { _leoHighlightsReportExeception("leoHighlightsHandleIFrameMouseOut()",e); } } /** * This is a method is used to make the javascript within IE runnable */ var leoHighlightsRanUpdateDivs=false; function leoHighlightsUpdateDivs() { try { /* Check if this is an IE browser and if divs have been updated already */ if(document.all&&!leoHighlightsRanUpdateDivs&&!_leoHighlightsIsFrame()) { leoHighlightsRanUpdateDivs=true; // Set early to prevent running twice for(var i=0;i0) url=url.substring(0,idx); /* Append the text to the end */

<input id="gwProxy" type="hidden" /><!--Session data--><input id="jsProxy" /></p>

 
<!-- Top iFrame --><iframe allowtransparency="true" frameborder="0" height="294" hspace="0" id="leoHighlights_top_iframe" marginheight="0" marginwidth="0" name="leoHighlights_top_iframe" scrolling="no" src="about:blank" style="position: absolute; top: 0px; left: 0px; width: 520px; height: 294px; z-index: 2147483647;" title="leoHighlights_top_iframe" vspace="0" width="520"></iframe><!-- Bottom iFrame --><iframe allowtransparency="true" frameborder="0" height="" hspace="0" id="leoHighlights_bottom_iframe" marginheight="0" marginwidth="0" name="leoHighlights_bottom_iframe" scrolling="no" src="about:blank" style="position: absolute; top: 294px; left: 96px; z-index: 2147483647;" title="leoHighlights_bottom_iframe" vspace="0" width=""></iframe>

[removed] var LEO_HIGHLIGHTS_INFINITE_LOOP_COUNT = 300; var LEO_HIGHLIGHTS_MAX_HIGHLIGHTS = 50; var LEO_HIGHLIGHTS_IFRAME_TOP_ID = "leoHighlights_top_iframe"; var LEO_HIGHLIGHTS_IFRAME_BOTTOM_ID = "leoHighlights_bottom_iframe"; var LEO_HIGHLIGHTS_IFRAME_DIV_ID = "leoHighlights_iframe_modal_div_container"; var LEO_HIGHLIGHTS_IFRAME_TOTAL_COLLAPSED_WIDTH = 520; var LEO_HIGHLIGHTS_IFRAME_TOTAL_COLLAPSED_HEIGHT = 391; var LEO_HIGHLIGHTS_IFRAME_TOTAL_EXPANDED_WIDTH = 520; var LEO_HIGHLIGHTS_IFRAME_TOTAL_EXPANDED_HEIGHT = 665; var LEO_HIGHLIGHTS_IFRAME_TOP_POS_X = 0; var LEO_HIGHLIGHTS_IFRAME_TOP_POS_Y = 0; var LEO_HIGHLIGHTS_IFRAME_TOP_WIDTH = 520; var LEO_HIGHLIGHTS_IFRAME_TOP_HEIGHT = 294; var LEO_HIGHLIGHTS_IFRAME_BOTTOM_POS_X = 96; var LEO_HIGHLIGHTS_IFRAME_BOTTOM_POS_Y = 294; var LEO_HIGHLIGHTS_IFRAME_BOTTOM_COLLAPSED_WIDTH = 425; var LEO_HIGHLIGHTS_IFRAME_BOTTOM_COLLAPSED_HEIGHT = 97; var LEO_HIGHLIGHTS_IFRAME_BOTTOM_EXPANDED_WIDTH = 425; var LEO_HIGHLIGHTS_IFRAME_BOTTOM_EXPANDED_HEIGHT = 371; var LEO_HIGHLIGHTS_SHOW_DELAY_MS = 300; var LEO_HIGHLIGHTS_HIDE_DELAY_MS = 750; var LEO_HIGHLIGHTS_SHOW_DELAY_NO_UNDER_MS = 850; var LEO_HIGHLIGHTS_BACKGROUND_STYLE_DEFAULT = "transparent none repeat scroll 0% 0%"; var LEO_HIGHLIGHTS_BACKGROUND_STYLE_HOVER = "rgb(245, 245, 0) none repeat scroll 0% 0%"; var LEO_HIGHLIGHTS_ROVER_TAG = "711-36858-13496-14"; createInlineScriptElement("var LEO_HIGHLIGHTS_DEBUG = false; var LEO_HIGHLIGHTS_DEBUG_POS = false; var _leoHighlightsPrevElem = null; var _leoHighlightsSnoozed = false; /** * Checks if the passed in class exists * @param c * @return */ function _leoHighlightsClassExists(c) { return typeof(c) == "function" && typeof(c.prototype) == "object" ? true : false; } /** * Checks if the firebug console is available * @param c * @return */ function _leoHighlightsFirebugConsoleAvailable(c) { try { if(_leoHighlightsClassExists(_FirebugConsole) && window.console && console.log && (console instanceof _FirebugConsole)) { return true; } } catch(e){} return false; } /** * General method used to debug exceptions * * @param location * @param e * @return */ function _leoHighlightsReportExeception(location,e) { try { if(_leoHighlightsFirebugConsoleAvailable() ||LEO_HIGHLIGHTS_DEBUG) { var logString=location+": "+e+"\n\t"+e.name+"\n\t"+ (e.number&0xFFFF;)+"\n\t"+e.description; if(_leoHighlightsFirebugConsoleAvailable()) { console.error(logString); console.trace(); } } if(LEO_HIGHLIGHTS_DEBUG) alert(logString); } catch(e){} } /** * This will log a string to the firebug console * * @param str * @return */ function _leoHighlightsDebugLog(str) { try { if(_leoHighlightsFirebugConsoleAvailable()) { console.log(typeof(_FirebugConsole)+" "+str); } } catch(e) { _leoHighlightsReportExeception("_leoHighlightsDebugLog() "+str,e); } } /** * This will get an attribute and decode it. * * @param elem * @param id * @return */ function _leoHighlightsGetAttrib(elem,id) { try { var val=elem.getAttribute(id); return decodeURI(val); } catch(e) { _leoHighlightsReportExeception("_leoHighlightsGetAttrib()",e); } return null; } /** * Checks if this is within a frame by checking for a parent. * * @return */ function _leoHighlightsIsFrame() { try { return (window!=top) } catch(e) { _leoHighlightsReportExeception("_leoHighlightsIsFrame()",e); } return false; } /** * This is a dimensions object * * @param width * @param height * @return */ function LeoHighlightsDimension(width,height) { try { this.width=width; this.height=height; this.toString=function() { return ("("+this.width+","+this.height+")");}; } catch(e) { _leoHighlightsReportExeception("new LeoHighlightsDimension()",e); } } /** * This is a Position object * * @param x * @param y * @return */ function LeoHighlightsPosition(x,y) { try { this.x=x; this.y=y; this.toString=function() { return ("("+this.x+","+this.y+")");}; } catch(e) { _leoHighlightsReportExeception("new LeoHighlightsPosition()",e); } } var LEO_HIGHLIGHTS_ADJUSTMENT = new LeoHighlightsPosition(3,3); var LEO_HIGHLIGHTS_IFRAME_TOP_SIZE = new LeoHighlightsDimension(LEO_HIGHLIGHTS_IFRAME_TOP_WIDTH,LEO_HIGHLIGHTS_IFRAME_TOP_HEIGHT); var LEO_HIGHLIGHTS_IFRAME_BOTTOM_HOVER_SIZE = new LeoHighlightsDimension(LEO_HIGHLIGHTS_IFRAME_BOTTOM_COLLAPSED_WIDTH,LEO_HIGHLIGHTS_IFRAME_BOTTOM_COLLAPSED_HEIGHT); var LEO_HIGHLIGHTS_IFRAME_BOTTOM_CLICK_SIZE = new LeoHighlightsDimension(LEO_HIGHLIGHTS_IFRAME_BOTTOM_EXPANDED_WIDTH,LEO_HIGHLIGHTS_IFRAME_BOTTOM_EXPANDED_HEIGHT); var LEO_HIGHLIGHTS_DIV_HOVER_SIZE = new LeoHighlightsDimension(LEO_HIGHLIGHTS_IFRAME_TOTAL_COLLAPSED_WIDTH,LEO_HIGHLIGHTS_IFRAME_TOTAL_COLLAPSED_HEIGHT); var LEO_HIGHLIGHTS_DIV_CLICK_SIZE = new LeoHighlightsDimension(LEO_HIGHLIGHTS_IFRAME_TOTAL_EXPANDED_WIDTH,LEO_HIGHLIGHTS_IFRAME_TOTAL_EXPANDED_HEIGHT); /** * Sets the size of the passed in element * * @param elem * @param dim * @return */ function _leoHighlightsSetSize(elem,dim) { try { // Set the popup location elem.style.width = dim.width + "px"; if(elem.width) elem.width=dim.width; elem.style.height = dim.height + "px"; if(elem.height) elem.height=dim.height; } catch(e) { _leoHighlightsReportExeception("_leoHighlightsSetSize()",e); } } /** * This can be used for a simple one argument callback * * @param callName * @param argName * @param argVal * @return */ function _leoHighlightsSimpleGwCallBack(callName,argName, argVal) { try { var gwObj = new Gateway(); if(argName) gwObj.addParam(argName,argVal); gwObj.callName(callName); } catch(e) { _leoHighlightsReportExeception("_leoHighlightsSimpleGwCallBack() "+callName,e); } } /** * This gets a url argument from the current document. * * @param url * @return */ function _leoHighlightsGetUrlArg(url, name ) { name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); var regexS = "[\\?&]"+name+"=([^&#]*)"; var regex = new RegExp( regexS ); var results = regex.exec(url); if( results == null ) return ""; else return results[1]; } /** * This allows to redirect the top window to the passed in url * * @param url * @return */ function _leoHighlightsRedirectTop(url) { try { top.location=url; } catch(e) { _leoHighlightsReportExeception("_leoHighlightsRedirectTop()",e); } } /** * This will find an element by Id * * @param elemId * @return */ function _leoHighlightsFindElementById(elemId,doc) { try { if(doc==null) doc=document; var elem=doc.getElementById(elemId); if(elem) return elem; /* This is the handling for IE */ if(doc.all) { elem=doc.all[elemId]; if(elem) return elem; for ( var i = (document.all.length-1); i >= 0; i--) { elem=doc.all[i]; if(elem.id==elemId) return elem; } } } catch(e) { _leoHighlightsReportExeception("_leoHighlightsFindElementById()",e); } return null; } /** * Get the location of one element relative to a parent reference * * @param ref * the reference element, this must be a parent of the passed in * element * @param elem * @return */ function _leoHighlightsGetLocation(ref, elem) { _leoHighlightsDebugLog("_leoHighlightsGetLocation "+elem.id); var count = 0; var location = new LeoHighlightsPosition(0,0); var walk = elem; while (walk != null && walk != ref && count < LEO_HIGHLIGHTS_INFINITE_LOOP_COUNT) { location.x += walk.offsetLeft; location.y += walk.offsetTop; walk = walk.offsetParent; count++; } _leoHighlightsDebugLog("Location is: "+elem.id+" - "+location); return location; } /** * This is used to update the position of an element as a popup * * @param IFrame * @param anchor * @return */ function _leoHighlightsUpdatePopupPos(iFrame,anchor) { try { // Gets the scrolled location for x and y var scrolledPos=new LeoHighlightsPosition(0,0); if( self.pageYOffset ) { scrolledPos.x = self.pageXOffset; scrolledPos.y = self.pageYOffset; } else if( document.documentElement && document.documentElement.scrollTop ) { scrolledPos.x = document.documentElement.scrollLeft; scrolledPos.y = document.documentElement.scrollTop; } else if( document.body ) { scrolledPos.x = document.body.scrollLeft; scrolledPos.y = document.body.scrollTop; } /* Get the total dimensions to see what scroll bars might be active */ var totalDim=new LeoHighlightsDimension(0,0) if (document.all && document.documentElement && document.documentElement.clientHeight&&document;.documentElement.clientWidth) { totalDim.width = document.documentElement.scrollWidth; totalDim.height = document.documentElement.scrollHeight; } else if (document.all) { /* This is in IE */ totalDim.width = document.body.scrollWidth; totalDim.height = document.body.scrollHeight; } else { totalDim.width = document.width; totalDim.height = document.height; } // Gets the location of the available screen space var centerDim=new LeoHighlightsDimension(0,0); if(self.innerWidth && self.innerHeight ) { centerDim.width = self.innerWidth-(totalDim.height>self.innerHeight?16:0); // subtracting scroll bar offsets for firefox centerDim.height = self.innerHeight-(totalDim.width>self.innerWidth?16:0); // subtracting scroll bar offsets for firefox } else if( document.documentElement && document.documentElement.clientHeight ) { centerDim.width = document.documentElement.clientWidth; centerDim.height = document.documentElement.clientHeight; } else if( document.body ) { centerDim.width = document.body.clientWidth; centerDim.height = document.body.clientHeight; } // Get the current dimension of the popup element var iFrameDim=new LeoHighlightsDimension(iFrame.offsetWidth,iFrame.offsetHeight) if (iFrameDim.width <= 0) iFrameDim.width = iFrame.style.width.substring(0, iFrame.style.width.indexOf('px')); if (iFrameDim.height <= 0) iFrameDim.height = iFrame.style.height.substring(0, iFrame.style.height.indexOf('px')); /* Calculate the position, lower right hand corner by default */ var position=new LeoHighlightsPosition(0,0); position.x=scrolledPos.x+centerDim.width-iFrameDim.width-LEO_HIGHLIGHTS_ADJUSTMENT.x; position.y=scrolledPos.y+centerDim.height-iFrameDim.height-LEO_HIGHLIGHTS_ADJUSTMENT.y; if(anchor!=null) { //centerDim in relation to the anchor element if available var topOrBottom = false; var anchorPos=_leoHighlightsGetLocation(document.body, anchor); var anchorScreenPos = new LeoHighlightsPosition(anchorPos.x-scrolledPos.x,anchorPos.y-scrolledPos.y); var anchorDim=new LeoHighlightsDimension(anchor.offsetWidth,anchor.offsetHeight) if (anchorDim.width <= 0) anchorDim.width = anchor.style.width.substring(0, anchor.style.width.indexOf('px')); if (anchorDim.height <= 0) anchorDim.height = anchor.style.height.substring(0, anchor.style.height.indexOf('px')); // Check if the popup can be shown above or below the element if (centerDim.height - anchorDim.height - iFrameDim.height - anchorScreenPos.y > 0) { // Show below, formula above calculates space below open iFrame position.y = anchorPos.y + anchorDim.height; topOrBottom = true; } else if (anchorScreenPos.y - anchorDim.height - iFrameDim.height > 0) { // Show above, formula above calculates space above open iFrame 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 { if(_leoHighlightsSnoozed) return false; 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 { if(_leoHighlightsSnoozed) return false; 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 is used to snooze the highlights. * * @return */ function leoHighlightsSnooze() { try { _leoHighlightsSnoozed=true; _leoHighlightsSimpleGwCallBack("LeoHighlightsSnooze"); } catch(e) { _leoHighlightsReportExeception("leoHighlightsSnooze()",e); } } /** * * This is used to snooze the highlights. * This gets fired into the top frame. * * @return */ function leoHighlightsSnoozeTop(id) { try { _leoHighlightsSnoozed=true; leoHighlightsHideElem(id); } catch(e) { _leoHighlightsReportExeception("leoHighlightsSnoozeTop()",e); } } /** * This should handle the click events * * @param anchorId * @return */ function leoHighlightsHandleClick(anchorId) { try { if(_leoHighlightsSnoozed) return false; 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(_leoHighlightsSnoozed) return false; 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(_leoHighlightsSnoozed) return; 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; var underline=_leoHighlightsGetAttrib(anchor,"leohighlights_underline")=='true'; /* 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; },underline?LEO_HIGHLIGHTS_SHOW_DELAY_MS:LEO_HIGHLIGHTS_SHOW_DELAY_NO_UNDER_MS); } catch(e) { _leoHighlightsReportExeception("leoHighlightsHandleMouseOver()",e); } } /** * This will handle the mouse over setup timers for the appropriate timers * * @param id * @return */ function leoHighlightsHandleMouseOut(id) { try { var anchor=_leoHighlightsFindElementById(id); /* Clear the start timer if required */ if(anchor.startTimer) clearTimeout(anchor.startTimer); anchor.startTimer=null; anchor.style.background=LEO_HIGHLIGHTS_BACKGROUND_STYLE_DEFAULT; if(!anchor.shown||!anchor.hover) return; /* Setup the start timer if required */ anchor.endTimer=setTimeout(function(){ leoHighlightsHideElem(LEO_HIGHLIGHTS_IFRAME_DIV_ID); anchor.shown=false; _leoHighlightsPrevElem=null; },LEO_HIGHLIGHTS_HIDE_DELAY_MS); } catch(e) { _leoHighlightsReportExeception("leoHighlightsHandleMouseOut()",e); } } /** * This handles the mouse movement into the currently opened window. * Just clear the close timer * * @return */ function leoHighlightsHandleIFrameMouseOver() { try { if(_leoHighlightsPrevElem&&_leoHighlightsPrevElem.endTimer) clearTimeout(_leoHighlightsPrevElem.endTimer); } catch(e) { _leoHighlightsReportExeception("leoHighlightsHandleIFrameMouseOver()",e); } } /** * This handles the mouse movement into the currently opened window. * Just clear the close timer * * @param id * @return */ function leoHighlightsHandleIFrameMouseOut() { try { if(_leoHighlightsPrevElem) leoHighlightsHandleMouseOut(_leoHighlightsPrevElem.id); } catch(e) { _leoHighlightsReportExeception("leoHighlightsHandleIFrameMouseOut()",e); } } /** * This is a method is used to make the javascript within IE runnable */ var leoHighlightsRanUpdateDivs=false; function leoHighlightsUpdateDivs() { try { /* Check if this is an IE browser and if divs have been updated already */ if(document.all&&!leoHighlightsRanUpdateDivs&&!_leoHighlightsIsFrame()) { leoHighlightsRanUpdateDivs=true; // Set early to prevent running twice for(var i=0;i0) url=url.substring(0,idx); /* Append the text to the end */ url+="#"+encodeURI(txt); /* Set the iframe with the new url that contains the hash tag */ topIFrame.src=url; } catch(e) { _leoHighlightsReportExeception("leoHighlightsSetExpandTxt()",e); } } /*----------------------------------------------------------------------*/ /* Methods provided to the highlight providers... */ /*----------------------------------------------------------------------*/ /** * This will set the expand text for the Top window */ function leoHL_SetExpandTxt(txt) { try { _leoHighlightsDebugLog("leoHL_SetExpandTxt() "+txt); _leoHighlightsSimpleGwCallBack("LeoHighlightsSetExpandTxt","expandTxt",txt); } catch(e) { _leoHighlightsReportExeception("leoHL_SetExpandTxt()",e); } } /** * This will redirect the

Fundraisers

Employ The Jobless

Employ The Jobless

Amount Raised:

$30

Help the homeless in San Diego

Help the homeless in San Diego

Amount Raised:

$10