﻿document.charset='gb2312'
var data = {"央视":{
						"CCTV-1":{"流畅":"http://bugu.cntv.cn/live_channel1/index.shtml?type=380K","清晰":"http://bugu.cntv.cn/live_channel1/index.shtml","海外":"http://bugu.cntv.cn/live_channel1/index.shtml?type=CDN"},
						"CCTV-2":{"流畅":"http://bugu.cntv.cn/live_channel2/index.shtml?type=380K","清晰":"http://bugu.cntv.cn/live_channel2/index.shtml"},
						"CCTV-3":{"流畅":"http://bugu.cntv.cn/live_cctv3/index.shtml","清晰":"http://bugu.cntv.cn/live_cctv3/index.shtml"},
						"CCTV-4":{"流畅":"http://bugu.cntv.cn/live_channel4/index.shtml?type=380K","清晰":"http://bugu.cntv.cn/live_channel4/index.shtml"},
						"CCTV-5":{"流畅":"http://bugu.cntv.cn/live_cctv5/index.shtml","清晰":"http://bugu.cntv.cn/live_cctv5/index.shtml"},
						"CCTV-6":{"流畅":"http://bugu.cntv.cn/live_channel6/index.shtml","清晰":"http://bugu.cntv.cn/live_channel6/index.shtml"},
						"CCTV-7":{"流畅":"http://bugu.cntv.cn/live_channel7/index.shtml?type=380K","清晰":"http://bugu.cntv.cn/live_channel7/index.shtml"},
						"CCTV-8":{"流畅":"http://bugu.cntv.cn/live_channel8/index.shtml","清晰":"http://bugu.cntv.cn/live_channel8/index.shtml"},
						"CCTV-NEWS":{"流畅":"http://bugu.cntv.cn/live_channel9/index.shtml?type=380K","清晰":"http://bugu.cntv.cn/live_channel9/index.shtml"},
						"CCTV-10":{"流畅":"http://bugu.cntv.cn/live_channel10/index.shtml?type=380K","清晰":"http://bugu.cntv.cn/live_channel10/index.shtml"},
						"CCTV-11":{"流畅":"http://bugu.cntv.cn/live_channel11/index.shtml?type=380K","清晰":"http://bugu.cntv.cn/live_channel11/index.shtml"},
						"CCTV-12":{"流畅":"http://bugu.cntv.cn/live_channel12/index.shtml?type=380K","清晰":"http://bugu.cntv.cn/live_channel12/index.shtml"},
						"CCTV-E":{"流畅":"http://bugu.cntv.cn/live_channelxiyu/index.shtml?type=380K","清晰":"http://bugu.cntv.cn/live_channelxiyu/index.shtml"},
						"CCTV-F":{"流畅":"http://bugu.cntv.cn/live_channelfayu/index.shtml?type=380K","清晰":"http://bugu.cntv.cn/live_channelfayu/index.shtml"},
						"CCTV-音乐":{"流畅":"http://bugu.cntv.cn/live_channelyinyue/index.shtml?type=380K","清晰":"http://bugu.cntv.cn/live_channelyinyue/index.shtml"},
						"CCTV-新闻":{"流畅":"http://bugu.cntv.cn/live_channelnews/index.shtml?type=380K","清晰":"http://bugu.cntv.cn/live_channelnews/index.shtml","海外":"http://bugu.cntv.cn/live_channelnews/index.shtml?type=CDN"},
						"CCTV-少儿":{"流畅":"http://bugu.cntv.cn/live_channelshaoer/index.shtml?type=380K","清晰":"http://bugu.cntv.cn/live_channelshaoer/index.shtml"},
						"CCTV-阿语":{"流畅":"http://bugu.cntv.cn/live_channelayu/index.shtml?type=380K","清晰":"http://bugu.cntv.cn/live_channelayu/index.shtml","海外":"http://bugu.cntv.cn/live_channelayu/index.shtml?type=CDN"},
						"CCTV-俄语":{"流畅":"http://bugu.cntv.cn/live_channeleyu/index.shtml?type=380K","清晰":"http://bugu.cntv.cn/live_channeleyu/index.shtml","海外":"http://bugu.cntv.cn/live_channeleyu/index.shtml?type=CDN"},
						"CCTV-高清":{"流畅":"http://bugu.cntv.cn/live_channelgaoqing/index.shtml","清晰":"http://bugu.cntv.cn/live_channelgaoqing/index.shtml"},
						"CCTV-4欧洲":{"流畅":"http://bugu.cntv.cn/live_channelouzhoulive/index.shtml?type=380K","清晰":"http://bugu.cntv.cn/live_channelouzhoulive/index.shtml"},
						"CCTV-4美洲":{"流畅":"http://bugu.cntv.cn/live_channelmeizhoulive/index.shtml?type=380K","清晰":"http://bugu.cntv.cn/live_channelmeizhoulive/index.shtml"},
						"CCTV中视购物":{"流畅":"http://bugu.cntv.cn/live_channelzhongshi/index.shtml","清晰":"http://bugu.cntv.cn/live_channelzhongshi/index.shtml"}
				},
				"卫视":{
						"北京卫视":{"流畅":"http://bugu.cntv.cn/live_channelbeijing/index.shtml"},
						"东方卫视":{"流畅":"http://bugu.cntv.cn/live_channeldf/index.shtml"},		
						"河北卫视":{"流畅":"http://bugu.cntv.cn/live_channelhb/index.shtml"},	
						"安徽卫视":{"流畅":"http://bugu.cntv.cn/live_channelah/index.shtml"},		
						"湖南卫视":{"流畅":"http://bugu.cntv.cn/live_channelhunan/index.shtml"},		
						"江苏卫视":{"流畅":"http://bugu.cntv.cn/live_channeljiangsu/index.shtml"},		
						"厦门卫视":{"流畅":"http://bugu.cntv.cn/live_channelxiamen/index.shtml"},	
						"重庆卫视":{"流畅":"http://bugu.cntv.cn/live_channelcq/index.shtml"},	
						"新疆卫视":{"流畅":"http://bugu.cntv.cn/live_channelxj/index.shtml"},	
						"天津卫视":{"流畅":"http://bugu.cntv.cn/live_channeltj/index.shtml"},		
						"四川卫视":{"流畅":"http://bugu.cntv.cn/live_channelsc/index.shtml"},		
						"山西卫视":{"流畅":"http://bugu.cntv.cn/live_channelsx/index.shtml"},		
						"山东卫视":{"流畅":"http://bugu.cntv.cn/live_channelsd/index.shtml"},		
						"旅游卫视":{"流畅":"http://bugu.cntv.cn/live_channellvyou/index.shtml"},		
						"辽宁卫视":{"流畅":"http://bugu.cntv.cn/live_channelln/index.shtml"},		
						"湖北卫视":{"流畅":"http://bugu.cntv.cn/live_channelhubei/index.shtml"},		
						"黑龙江卫视":{"流畅":"http://bugu.cntv.cn/live_channelhlj/index.shtml"},		
						"东南卫视":{"流畅":"http://bugu.cntv.cn/live_channelfj/index.shtml"},		
						"广东卫视":{"流畅":"http://bugu.cntv.cn/live_channelguangdong/index.shtml"},		
						"甘肃卫视":{"流畅":"http://bugu.cntv.cn/live_channelgs/index.shtml"},		
						"广西卫视":{"流畅":"http://bugu.cntv.cn/live_channelgx/index.shtml"},		
						"贵州卫视":{"流畅":"http://bugu.cntv.cn/live_channelgz/index.shtml"},		
						"河南卫视":{"流畅":"http://bugu.cntv.cn/live_channelhn/index.shtml"},		
						"吉林卫视":{"流畅":"http://bugu.cntv.cn/live_channeljl/index.shtml"},		
						"江西卫视":{"流畅":"http://bugu.cntv.cn/live_channeljx/index.shtml"},		
						"内蒙古卫视":{"流畅":"http://bugu.cntv.cn/live_channelnmg/index.shtml"},		
						"宁夏卫视":{"流畅":"http://bugu.cntv.cn/live_channelnx/index.shtml"},		
						"青海卫视":{"流畅":"http://bugu.cntv.cn/live_channelqh/index.shtml"},		
						"陕西卫视":{"流畅":"http://bugu.cntv.cn/live_channelshanxi/index.shtml"},		
						"云南卫视":{"流畅":"http://bugu.cntv.cn/live_channelyn/index.shtml"},		
						"浙江卫视":{"流畅":"http://bugu.cntv.cn/live_channelzj/index.shtml"},		
						"西藏卫视":{"流畅":"http://bugu.cntv.cn/live_channelxz/index.shtml"}	
				}
			};
var timet;
function setTimeOut(){
	$("#contbox").focus();
	$("#contbox").bind("blur",function(){
		window.clearTimeout(timet);
		timet=setTimeout(divTimeOut,500)				   
	});
	return false
}
function divTimeOut(){
	$("#contbox").hide();
	return false
}
function inClu1(nb,obj){
	var n = nb;
	var i = 0,cont = "";
	var tdata = new Object;
	var t1 = t2 = "";
	switch (n)
	{
		case 1:{
			for(var name in data){
				cont = cont + "<li><a href=\"javascript:void()\" onclick=\"toUpTy(this,\'#vtype_1\',\'"+ obj +"\')\">" + name + "</a></li>"
			};
			$(obj).html(cont);
			$(obj).show();
		}
		break;
		case 2:{
			t1 = $.trim($("#vtype_1").text());
			for(var name in data[t1]){
				cont = cont + "<li><a href=\"javascript:void()\" onclick=\"toUpTy(this,\'#vtype_2\',\'"+ obj +"\')\">" + name + "</a></li>"
			};
			$(obj).html(cont);
			$(obj).show();
		}
		break;
		case 3:{
			t1 = $.trim($("#vtype_1").text());
			t2 = $.trim($("#vtype_2").text());
			for(var name in data[t1][t2]){
				cont = cont + "<li><a href=\"javascript:void()\" onclick=\"toUpTy(this,\'#vtype_3\',\'"+ obj +"\')\">" + name + "</a></li>"
			};
			$(obj).html(cont);
			$(obj).show();
		}
		break;
		default:
	}
	window.clearTimeout(timet);
	setTimeOut();
	return false
}

function showTyUrl(){
	var a = $.trim($("#vtype_1").text());
	var b = $.trim($("#vtype_2").text());
	var c = $.trim($("#vtype_3").text());
	var url="";
	url = data[a][b][c];
	window.document.location.href = url;
	return false
}
function toUpTy(obj,toobj,selfobj){
	window.clearTimeout(timet);
	var c = $(obj).text();
	$(toobj).text(c);
	$(selfobj).hide();
	if(toobj == '#vtype_1'){
		var t1 = $("#vtype_1").text();
		var a = new Array;
		var i=0;
		for(var name in data[t1]){
			a[i] = name;
			i++
		}
		$("#vtype_2").text(a[0]);
		$("#vtype_3").text('流畅')
	}else if(toobj == '#vtype_2'){
		$("#vtype_3").text('流畅')
	}
	return false
}


function copyTextToClipboard(copy){//拷贝到剪切板
	if (window.clipboardData){
		window.clipboardData.setData("Text", copy);}
	else if (window.netscape){
		netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
	var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard);
	if (!clip) return;
		var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable);
	if (!trans) return;
		trans.addDataFlavor('text/unicode');
	var str = new Object();
	var len = new Object();
	var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
	var copytext=copy;
	str.data=copytext;
	trans.setTransferData("text/unicode",str,copytext.length*2);
	var clipid=Components.interfaces.nsIClipboard;
	if (!clip) return false;
	clip.setData(trans,null,clipid.kGlobalClipboard);}
	alert(copy+"  页面地址复制成功!!!")
	//return false;
}


