function reallyover(src) 
{
  if (window.event) 
  {
      var event = window.event;
      
      var from = event.fromElement;
      
      var to = event.toElement;
      
      return ( to == src || src.contains(to) ) && !src.contains(from) && src != from;
  }
  
  return true;
}

function reallyout(src) 
{
  if (window.event)
  {
      var event = window.event;
      
      var from = event.fromElement;
      
      var to = event.toElement;
      
      return (src == from || src.contains(from)) && !src.contains(to) && src != to;
  }
  
  return true;
}

function ShowHideShareBlock(block1, block2)
{
    document.getElementById(block1).style.display = 'block';
    
    document.getElementById(block2).style.display = 'none';
}

function openSharingSite(target, title)
{
	var url = window.location;
	
	switch(target)
	{
		case 'facebook':
		
			window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(url)+'&t='+encodeURIComponent(title),'sharer','toolbar=0,status=0,width=626,height=436');
		
			break;
		
		case 'delicious':
		
			window.open('http://delicious.com/save?v=5&amp;noui&amp;jump=close&amp;url='+ encodeURIComponent(url)+'&amp;title='+ encodeURIComponent(title), 'delicious','toolbar=no,width=550,height=550');
		
			break;
			
		case 'digg':                    
		
			window.open('http://digg.com/submit?url=' + encodeURIComponent(url) + '&title=' + encodeURIComponent(title) + '&bodytext=DESCRIPTION&media=MEDIA&topic=TOPIC');
			
			break;
			
		case 'twitter':                    
	
			window.open('http://twitter.com/home?status=' + encodeURIComponent(url));
		
			break;
			
		case 'newsvine':
		
			window.open('http://www.newsvine.com/_tools/seed?popoff=1&u=' + encodeURIComponent(url));
		
			break;
			
		case 'reddit':
		
			window.open('http://www.reddit.com/r/reddit.com/submit?url=' + encodeURIComponent(url));
		
			break;
			
		case 'stumbleupon':
		
			window.open('http://www.stumbleupon.com/submit?url=' + encodeURIComponent(url));
		
			break;
	}

	return false;
}

function SetMailTo(link, subject)
{
    if (subject.length > 0)
    {
        link.href = 'mailto:?subject=' + subject + '&body=' + subject + '%0D%0A' + window.location;
    }
    else
    {
        link.href = 'mailto:?body=' + window.location;
    }
}

