<!--//--><![CDATA[//><!--


function addEvent(func){
  if (!document.getElementById | !document.getElementsByTagName) return
  var oldonload=window.onload
  if (typeof window.onload != 'function') {window.onload=func}
  else {window.onload=function() {oldonload(); func()}}
}

addEvent(hideAll)


function hideAll(){
  var obj,nextul,anchor,content

  // get all spans
  obj=document.getElementsByTagName('p')

  // run through them
  for (var i=0;i<obj.length;i++){

    // if it has a class of helpLink
    if(/asset-share/.test(obj[i].className)){

      // get the adjacent span
      nextul=obj[i].nextSibling
      while(nextul.nodeType!=1) nextul=nextul.nextSibling

       // hide it
      nextul.style.display='none'

      //create a new link
      anchor=document.createElement('a')

      // copy original helpLink text and add attributes
      content=document.createTextNode(obj[i].firstChild.nodeValue)
      anchor.appendChild(content)
      anchor.href='#share'
      anchor.title='Share'
      anchor.className=obj[i].className
      anchor.nextul=nextul
      anchor.onclick=function(){showHide(this.nextul);changeTitle(this);return false}

      // replace span with created link
      obj[i].replaceChild(anchor,obj[i].firstChild)
    }
  }
}

// used to flip helpLink title
function changeTitle(obj){
  if(obj)
    obj.title = obj.title=='Share' ? 'Later' : 'Share'
}

// used to flip the display property
function showHide(obj){
  if(obj)
    obj.style.display = obj.style.display=='none' ? 'inline' : 'none'
}



//--><!]]>
