//复制内容
function CopyText(id) {
	document.getElementById(id).select();
	copy(document.getElementById(id).value);
	alert("复制成功，请粘贴到你的QQ/MSN上推荐给你的好友！谢谢支持！");
}
function copy(text2copy) {
	if (window.clipboardData) {
		window.clipboardData.setData("Text",text2copy);
	} else {
		var flashcopier = 'flashcopier';
		if(!document.getElementById(flashcopier)) {
		var divholder = document.createElement('div');
		divholder.id = flashcopier;
		document.body.appendChild(divholder);
		}

		document.getElementById(flashcopier).innerHTML = '';
		var divinfo = '<embed src="./clipboard.swf" FlashVars="clipboard='+encodeURIComponent(text2copy)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';//这里是关键
		document.getElementById(flashcopier).innerHTML = divinfo;

	}
}

//获取id值
if  (String(window.document.location.href).indexOf("#p")!=-1){
  var movieurl = String(window.document.location.href);
  var resault = movieurl.substring(movieurl.lastIndexOf("#p")+2, movieurl.length);
  
} else {
	resault = '';
}

//播放页加入收藏
function addfilmfavorite(title)
{
   if (document.all)
   {
      window.external.addFavorite(vhref[0],title);
   }
   else if (window.sidebar)
   {
      window.sidebar.addPanel(title, vhref[0], "");
   }
}

//拷贝当前播放地址
function cb(playingid){
    if(playingid){
	var Content =vtitle + document.getElementById(playingid).title +'\r\n';
	Content+= vhref[0] + '#p' +playingid;
	}else{
	var Content= '惊魂下一秒(Next)\r\n' + vhref[0];
	}
	copy(Content);
	alert("复制成功，请粘贴到你的QQ/MSN上推荐给你的好友！谢谢支持！\r\n\r\n内容如下：\r\n" + Content);
}