////VARIABLES
var sServerName = "";
var sTitle = "";
///////////////


function psn_click(snp,s){
			var u = top.location.href;
			
			var t;
			if(sTitle.length>0) 
			{
				t = sTitle;
			}
			else
			{
				t = top.document.title;
			}
			var d = "";
			var s = GetSiteURL();
			var meta = top.document.getElementsByTagName('meta');
			var l = meta.length;
			
			for(var x=0; x<l; x++){
				if(meta[x].name.toLowerCase() == "description"){
					d = meta[x].content;
				}
			}
			
			
			switch(snp){
				case 'fb':
				window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'_blank','toolbar=0,resizable=1,status=no,width=900,height=700');
				break;
				
				case 'tw':
				window.open('http://twitter.com/home?status=Currently reading '+encodeURIComponent(u),'_blank','toolbar=0,resizable=1,status=no,width=900,height=700');
				break;
				
				case 'li':
				window.open('http://www.linkedin.com/shareArticle?mini=true&url='+encodeURIComponent(u)+'&title='+encodeURIComponent(t)+'&summary='+encodeURIComponent(d)+'&source='+encodeURIComponent(s),'_blank','toolbar=0,resizable=1,status=no,width=900,height=700');
				break;
				
				case 'ms':
				window.open('http://www.myspace.com/index.cfm?fuseaction=postto&t='+encodeURIComponent(t)+'&u='+encodeURIComponent(u)+'&c='+encodeURIComponent(d)+'&l=2','_blank','toolbar=0,status=no,resizable=1,width=900,height=700')
				break;
				
				default: break;
			}
			return false;
		}
		
function GetSiteURL()
{
	var hr = top.location.href;
	var sr = sServerName;
	var r = "";
	r = hr.substring(0,hr.search(sr));
	return r+sr;
}
