function blogPostShare(linkObj,site,title,byline,keyword,pubdate,description,section,popUpUrl){  

	switch (site) {
	case "baiducang":
		return postPopUp(linkObj, 'http://cang.baidu.com/do/add?it=' + title + '&iu=' + popUpUrl + '&fr=sp#nw=1');
		break;
	case "baidutieba":
		return postPopUp(linkObj, 'http://tieba.baidu.com/i/sys/share?link=' + popUpUrl + '&type=text&title=' + title + '&content=' + description);
		break;
	case "qqshuqian":
		return postPopUp(linkObj, 'http://shuqian.qq.com/post?from=3&title=' + title + '&uri=' + popUpUrl + '&jumpback=2&noui=1');
		break;
	case "qqrizhi":
		return false;
		break;
	case "googleshuqian":
		return postPopUp(linkObj, 'http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=' + popUpUrl + '&amp;title=' + title);
		break;
	case "yahoobuzz":
    	return postPopUp(linkObj, 'http://myweb.cn.yahoo.com/popadd.html?title='+title+'&url='+popUpUrl+'&tag=&summary=' + description);
		break;	
	case "sinavivi":		
		return postPopUp(linkObj, 'http://v.t.sina.com.cn/share/share.php?title='+title+'&url='+popUpUrl+'&source='+window.location.host);
		break;
	case "xiaonei":
    	return postPopUp(linkObj, 'http://share.renren.com/share/buttonshare.do?link='+ popUpUrl+'&title='+title);
		break;
    case "kaixin":
    	return postPopUp(linkObj, 'http://www.kaixin001.com/repaste/share.php?rtitle='+title+'&rcontent='+description+'&rurl='+popUpUrl);
		break;
	case "wealink":
    	return postPopUp(linkObj, 'http://share.wealink.com/share/add/?title='+title+'&content='+description+'&url='+popUpUrl);
		break;
	case "douban":
		return postPopUp(linkObj, 'http://www.douban.com/recommend/?url='+popUpUrl + '&title='+title );
		break;
	case "sohu":
		return postPopUp(linkObj, 'http://z.sohu.com/storeit.do?t='+escape(title)+'&u='+escape(popUpUrl)+'&c='+escape(description) );
		break;	
	case "fangfou":
		return postPopUp(linkObj, 'http://www.fanfou.com/sharer?u='+popUpUrl+'?t='+title+'?d='+description+'?s=bl');
		break;
	case "zuosha":
		return postPopUp(linkObj, 'http://zuosa.com/collect/Collect.aspx?t=' + title + '&u=' + popUpUrl);
		break;
	case 'sohubaishehui':
		return postPopUp(linkObj, 'http://bai.sohu.com/share/blank/addbutton.do?from=pcds&link='+popUpUrl+'&title='+title);
		break;
	case 'myspace':
		return postPopUp(linkObj, 'http://www.myspace.com/index.cfm?fuseaction=postto&u='+popUpUrl+'&t='+title+'&c='+description);
		break;
	case '163vivi':
		return postPopUp(linkObj, 'http://t.163.com/article/user/checkLogin.do?link='+popUpUrl+'&source='+description+'&info='+title+' '+popUpUrl+'&'+new Date().getTime());
		break;

	//guo wai
	case "facebook":
		return postPopUp(linkObj, 'http://www.facebook.com/sharer.php?u=' + popUpUrl + '&t=' + title);
		break;
   	case "digg":
		return postPopUp(linkObj, 'http://digg.com/remote-submit?phase=2&url=' + popUpUrl + '&title=' + title + '&bodytext=' + description);
		break;
	case "permalink":
		return postPopUp(linkObj, 'http://www.nytimes.com/export_html/common/new_article_post.html?url=' + popUpUrl + '&title=' + title+ '&summary=' + description + '&section=' + section + '&pubdate=' + pubdate + '&byline=' + byline);
		break;
	case "delicious":
		return postPopUp(linkObj, 'http://del.icio.us/post?v=4&partner=nyt&noui&jump=close&url=' + popUpUrl + '&title=' + title + '&bodytext=' + description);
		break;
	case "twitter":		
		return postPopUp(linkObj, 'http://twitter.com/home?status='+popUpUrl+' '+title);
		break;
	case "mixx":
		try {
		    var otherParams =
			     '&title='       + title
			   + '&description=' + description
			   + '&tags='        + keywords
			   + '&partner=http://'     + window.location.host;
		    return postPopUp(linkObj, 
			   'http://mini.mixx.com/submit/story'
			   + '?page_url='    + popUpUrl
			   + otherParams);
		} catch(e) {
		    return postPopUp(linkObj, 
			   'http://mini.mixx.com/submit/story'
			   + '?page_url='    + popUpUrl
			   + '&title='       + title
			   + '&description=' + description
			   + '&partner=http://'     + window.location.host);
		}
		break;

	case "linkedin":
        return postPopUp(linkObj, 
		     'http://www.linkedin.com/shareArticle?mini=true'
			   + '&url='         + popUpUrl
			   + '&title='       + title
			   + '&summary='     + description
			   + '&source=http://'      + window.location.host
		  );
		break;
	}
	
	hiddenShareDiv('shareiddiv');
}

function postPopUp(linkObj,url){
	
	var newwind=window.open(url,'_blank','');
	newwind.focus();
	return true;
}

function createXmlHttpRequestObject3()
{ 
 	var xmlHttp;
   	if(window.ActiveXObject)
   	{
    	try
     	{
        	xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");            
     	}
     	catch (e) 
     	{
      		try
      		{
       			xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
      		}
        	catch (e)
        	{
        		xmlHttp = false;
        	}
     	}
   }
   else
   {
     	try 
     	{
       		xmlHttp = new XMLHttpRequest();
     	}
     	catch (e) 
     	{
       		xmlHttp = false;
     	}
   }
   return xmlHttp;
}

var xmlHttp = createXmlHttpRequestObject3(); 

function send2Mail(vto, vfrom, vcomment, vlang, type, id, yname) {
	
	if(xmlHttp && vto && vlang && yname && id && type){		
		if (xmlHttp.readyState == 4 || xmlHttp.readyState == 0)
		{
			var queryStrTmp = "vto="+vto+'&vfrom='+vfrom+'&vlang='+vlang+'&vcomment='+vcomment+'&id='+id+'&type='+type+'&vurl='+encodeURIComponent(document.location)+'&vyname='+yname;
			xmlHttp.open("post", "/vip/sendmail2frd.php", true); 
			xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
			xmlHttp.onreadystatechange = handleServerResponsesend2Mail;
			xmlHttp.send(queryStrTmp);
		}
		else {
			return false;
		}
	}
	else {
		return false;
	}
}

function handleServerResponsesend2Mail() {
	if (xmlHttp.readyState == 4) 
	{
		if (xmlHttp.status == 200) 
		{
			serverMsg = xmlHttp.responseText;
			//alert(serverMsg);
			if(serverMsg == 'success') {
				handleSuccess();
			}
			else {
				handleFail();
			}
		}
	}
}

function getvaluetxt( id ) {
	var obj;
	if(id) {
		obj = document.getElementById(id);
		if(obj) {
			return obj;
		}
		else {
			return false;
		}
	}
	else {
		return false;
	}
}
