function go_facebook(str, type, domain, plurk)
{
	var url="countFbPl.php";
	url=url+"?Sn="+str+"&type="+type;
	url=url+"&sid="+Math.random();
	xmlHttp=GetXmlHttpObject();
	xmlHttp.open("GET",url,true);
	xmlHttp.onreadystatechange=function(){countChanged(str, type, domain, plurk);}
	xmlHttp.send(null);
} 

function countChanged( fOrP, typeJudge, site, pString ) 
{ 
    var link_string = 'http://'+site+'/search.php?sn='+fOrP+'&cou=137';
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
		if ( typeJudge == 'facebook' ){
			void(window.open('http://www.facebook.com/share.php?u='+link_string));
		}
		else if ( typeJudge == 'plurk' ){
			var link_string = 'http://www.plurk.com/?status=' .concat(encodeURIComponent(link_string)) .concat(' ') .concat('&#40;') .concat(encodeURIComponent(pString)) .concat('&#41;').concat('&qualifier=shares');
			link_string = link_string.replace("&#40;","%28");
			link_string = link_string.replace("&#41;","%29");
			void(window.open(link_string));
		}
	}
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 // Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}
