function showLink(URL,pid,anchorname) {
	var anchor = document.getElementById(anchorname);
	var link = "http://"+URL+"?pid=" + pid; 
	var share = "<div id='Link-box'><div class='Link-boxinner'><div class='Link-boxheader'>Link<a class='Link-boxHideButton' href='javascript:void(0)' onclick=\"closelink(document.getElementById('"+anchorname+"'));\">Close</a></div>To link to this podcast, use the URL below:<input type='text' id='Link' name='link' readonly value='"+link+"' size='40'></div></div>";
	anchor.innerHTML = share;
	var obj = document.getElementById('Link-box');
	obj.style.top = obj.style.top - 125 + "px";
	obj.style.left = obj.style.left + 45 + "px";	
	obj.style.display = 'block';
} 

function showEmbed(account_url,show,post,enclosure,anchorname,type) {
	var anchor = document.getElementById(anchorname);
	if (type == 'video') {
		var eurl = "<embed src=&quot;http://"+account_url+"/FlowPlayerLight.swf?config={embedded:true,videoFile:%27http://"+ account_url +"/download/"+show+"/"+post+"/"+enclosure+"%27,initialScale:%27scale%27,controlBarBackgroundColor:%270x778899%27,autoBuffering:false,loop:false,autoPlay:false}&quot; width=&quot;400&quot; height=&quot;325&quot; scale=&quot;fit&quot; type=&quot;application/x-shockwave-flash&quot; pluginspage=&quot;http://www.macromedia.com/go/getflashplayer&quot;></embed>";
	} else {
		var eurl = "<embed src=&quot;http://"+account_url+"/FlowPlayerLight.swf?config={embedded:true,videoFile:%27http://"+ account_url +"/download/"+show+"/"+post+"/"+enclosure+"%27,initialScale:%27scale%27,controlBarBackgroundColor:%270x778899%27,autoBuffering:false,loop:false,autoPlay:false}&quot; width=&quot;400&quot; height=&quot;25&quot; scale=&quot;fit&quot; type=&quot;application/x-shockwave-flash&quot; pluginspage=&quot;http://www.macromedia.com/go/getflashplayer&quot;></embed>";
	}
	var share = "<div id='Embed-box'><div class='Embed-boxinner'><div class='Embed-boxheader'>Embed<a class='Embed-boxHideButton' href='javascript:void(0)' onclick=\"closelink(document.getElementById('"+anchorname+"'));\">Close</a></div>To embed this podcast, use the text below: <input type='text' id='Embed' name='embed' readonly value='"+eurl+"' size='40'></div></div>";
	anchor.innerHTML = share;
/*	while (!anchor.offsetTop) {
	anchor = anchor.offsetParent;
	}*/
	var obj = document.getElementById('Embed-box');
/*	obj.style.top = (parseInt(anchor.offsetTop)) - 125 + "px";
	obj.style.left = 300 + "px"; */	
	obj.style.top = obj.style.top - 125 + "px";
	obj.style.left = obj.style.left + 45 + "px";
	obj.style.display = 'block'; 
}

function showShare(URL,title,anchorname) {
	var anchor = document.getElementById(anchorname);
	var articleURL = URL;
	var docTitle=title;
	var linkface='http://www.facebook.com/sharer.php?u='; 
	var linkdeli='http://del.icio.us/post?v=4&noui&jump=close&url='; 
	var linkredd='http://reddit.com/submit?url='; 
	var linkdigg='http://digg.com/submit?url='; 
	var linkstumble='http://www.stumbleupon.com/submit?url=';
	var linkmixx='http://www.mixx.com/submit?page_url=';
	var linkpropel='http://www.propeller.com/submit/?U=';
	var linklinkedin='http://www.linkedin.com/shareArticle?mini=true&url=';
	var linkyahoo='http://buzz.yahoo.com/buzz?guid=';
	var linktwitter='http://twitter.com/home?status=';
	var sharedeli='<li id="delicious"> <a target="new"  title="Post this story to Delicious" href="'+linkdeli+articleURL+'&title='+docTitle+'"><span class="linktext">Delicious</span></a> </li>'; 
	var shareredd='<li id="reddit"> <a target="new"  title="Post this story to reddit" href="'+linkredd+articleURL+'&title='+docTitle+'"><span class="linktext">reddit</span></a> </li>'; 
	var sharedigg='<li id="digg"> <a target="new"  title="Post this story to Digg" href="'+linkdigg+articleURL+'&title='+docTitle+'"><span class="linktext">Digg</span></a> </li>'; 
	var sharestumble='<li id="stumbleupon"> <a target="new"  title="Post this story to StumbleUpon" href="'+linkstumble+articleURL+'&title='+docTitle+'"><span class="linktext">stumbleupon</span></a> </li>';
	var sharebuzz ='<li id="yahooBuzz"><span id="yahooBuzzBadge"></span></li>';
	var shareface='<li id="facebook"> <a target="new"  title="Post this story to Facebook" href="'+linkface+articleURL+'&t='+docTitle+'"><span class="linktext">Facebook</span></a> </li>';
	var sharemixx='<li id="mixx"> <a target="new"  title="Post this story to Mixx" href="'+linkmixx+articleURL+'&title='+docTitle+'"><span class="linktext">Mixx</span></a> </li>';
	var sharepropel='<li id="propeller"> <a target="new"  title="Post this story to Propeller" href="'+linkpropel+articleURL+'&title='+docTitle+'"><span class="linktext">Propeller</span></a> </li>';
	var sharelinkedin='<li id="linkedin"> <a target="new"  title="Post this story to LinkedIn" href="'+linklinkedin+articleURL+'&title='+docTitle+'"><span class="linktext">LinkedIn</span></a> </li>';
	var sharetwitter='<li id="twitter"> <a target="new"  title="Post this story to Twitter" href="'+linktwitter+docTitle+'+-+'+articleURL+'"><span class="linktext">Twitter</span></a> </li>';
	var shareyahoo = '<li id="yahoobuzz"> <a target="new" title="Post this story to Yahoo Buzz" href="'+linkyahoo+articleURL+'"><span class="linktext">Yahoo! Buzz</span></a> </li>';
	var sharecontent = '<ul id="shareslist" style="margin-top:0;">'+sharedeli+sharedigg+shareface+sharelinkedin+sharemixx+'</ul>';
	sharecontent +='<ul id="shareslist" style="margin-top:0;">'+sharepropel+shareredd+sharestumble+sharetwitter+shareyahoo+'</ul>';
//	var share = "<div id='Share-box'><div class='Share-boxinner'><div class='Share-boxheader'>Share<a class='Share-boxHideButton' href='javascript:void(0)' onclick=\"document.getElementById('Share-box').style.display = 'none';\">Close</a></div>"+sharecontent+"</div></div>";
	var share = "<div id='Share-box'><div class='Share-boxinner'><div class='Share-boxheader'>Share<a class='Share-boxHideButton' href='javascript:void(0)' onclick=\"closelink(document.getElementById('"+anchorname+"'));\">Close</a></div>"+sharecontent+"</div></div>";
	anchor.innerHTML = share;
	var obj = document.getElementById('Share-box');
	obj.style.top = obj.style.top - 170 + "px";
	obj.style.left = obj.style.left - 50 + "px";	
	obj.style.display = 'block';
} 

function closelink(anchor) {
	anchor.innerHTML = "";
}
