articleDate=new Date();
articleUrl=document.location.href;
articleQ=articleUrl.indexOf("?");
special =articleUrl.indexOf("&status");
articleS=articleUrl.indexOf("_");
articleR="";
if(articleQ!=-1 && articleS==-1)
{  
	articleR=articleUrl.substr(articleQ+1);
	document.write("<img src='http://count.tool.hexun.com/count.aspx?siteid=1&"+articleR+"&time="+articleDate.getTime()+"&url="+articleUrl+"' height=0>");
}
else if(articleS!=-1)
{
	tempArr=articleUrl.split('/');
	tempStr=tempArr[tempArr.length-1];

	idArr=tempStr.split('_');
	subjectId=idArr[0];
	
	index=idArr[1].indexOf('.');
	temp=idArr[1].substring(0,index);
	
	subjectType="lm";
	articleId="";

	if(isNaN(temp))
	{
		
		str=temp.substr(temp.length-1,1);
		if(str.toUpperCase()=="A")
		{
			subjectType="lm";
			articleId=temp.substr(0,temp.length-1);
		}
		else if(str.toUpperCase()=="C")
		{
			subjectType="sl";
			articleId=temp.substr(0,temp.length-1);
		}
	}
	else
	{
		articleId=temp;
	}
	articleR=subjectType+"="+subjectId+"&id="+articleId;
	document.write("<img src='http://count.tool.hexun.com/count.aspx?siteid=1&"+articleR+"&time="+articleDate.getTime()+"&url="+articleUrl+"' height=0>");
     
}
else
{
	aTemp = articleUrl.split('/');
	aLen = aTemp.length;
	articleR = "id=" + aTemp[aLen-1].substr(0, aTemp[aLen-1].length-6);
	if(aTemp[aLen-3] == "lm" || aTemp[aLen-3] == "sl" )
		articleR += "&" + aTemp[aLen-3] + "=" + aTemp[aLen-2];
	document.write("<img src='http://count.tool.hexun.com/count.aspx?siteid=1&"+articleR+"&time="+articleDate.getTime()+"&url="+articleUrl+"' height=0>");
}

var info_status=-1;

if(special >= 0)
	info_status=articleUrl.indexOf("&status");
else
	info_status=articleUrl.indexOf("?status");

if(info_status >= 0)
	window.location.href="http://analysis.hexun.com/article/infodetail.asp?"+articleR;
