﻿//加为好友或聊天
function AddFriend(str)
{
    var myKugooID = getCookie();
    if(str=="")
    {
        alert("你还没有登录，请先登录！");
        location="/member/login.aspx";
    }
	try
	{
		var KugooObj=new ActiveXObject("KuGoo3DownXControl.KuGoo3Down");
		KugooObj.SendString(5,1,str+','+myKugooID);
	}
	catch(e)
	{
		alterinfo();
	}
}
// 读 cookie
function getCookie()
{
var MyCookie=unescape(document.cookie).toLowerCase();
re=/kugooid=(\d+)&/g; 
if(re.test(MyCookie))
{
	var KugooID= RegExp.$1;
	return KugooID;
}
else
return "";
}
//提示安装软件
function alterinfo()
{
	if (confirm("需要安装KuGoo软件才能使用，您是否需要下载安装？"))
			location.href="http://download.kugou.com";
}
function showdetail() {
  document.getElementById('CI_div').style.overflow='visible';
  document.getElementById('showdetail').style.display='none';
  document.getElementById('hidedetail').style.display='block';
}
function hidedetail() {
  document.getElementById('CI_div').style.overflow='hidden';
  document.getElementById('showdetail').style.display='block';
  document.getElementById('hidedetail').style.display='none';
}