/*--TV番組情報---*/
function setTvCookie (name,value) {
	var argv = setTvCookie.arguments;
	var argc = setTvCookie.arguments.length;
	var path = "/";
	var domain = ".home.ne.jp";
	var secure = (argc > 4) ? argv[4] : false;
	var expires = new Date();
	expires.setTime(expires.getTime() + (1*365*24*60*60*1000));
	document.cookie = name + "=" + escape (value) +
	((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
	((path == null) ? "" : ("; path=" + path)) +
	((domain == null) ? "" : ("; domain=" + domain)) +
	((secure == true) ? "; secure" : "");
}

function dispTvTop() {
	var substationid = "";
	substationid = GetCookie("sub_station_id");
	if(substationid == null || substationid == ""){
		var mainid = "";
		var stationid = "";
		mainid = GetCookie("main_id");
		stationid = GetCookie("station_id");
		setTvCookie("main_id", mainid);
		setTvCookie("station_id", stationid);
	}

	var strurl= "http://www.tvprogram.home.ne.jp/";
	window.location=strurl;
}

/*--TV番組情報---*/


function getCntName(){
	pathName_array = pathName.split("/");
	cntName = pathName_array.slice(4,5);
	cntName2 = pathName_array.slice(2,3);
	cntName_season = pathName_array.slice(6,7);
}

var pathName = self.document.URL;
getCntName();
//alert("cntName  " + cntName);

if(cntName == "include"){
	var pathName = parent.document.URL;
	getCntName();
}


//alert("cntName  " + cntName);


function changeTitle() {
	document.title = gen_title;
}

function kanrenLink(num){
	//alert("gen_txt  " + gen_txt[num-1] + "  gen_url  " + gen_url[num-1] + "  gen_target  " + gen_target[num-1]);
	document.write("<a href='" + gen_url[num-1] + "' target='" + gen_target[num-1] + "' onClick='ANT_ClickBeacon(\"c0000" + [num] + "\")'>" + gen_txt[num-1] + "</a>");
}

function setGenTitle(){
	document.write("<a href='" + gen_title_url + "' target='_top'><img src='http://open.home.ne.jp/common/images/share/ch_top/"+ gen_gif +"' alt='"+ gen_title +"' border='0'></a>");
}

function setLineColor(){
	document.write("<td bgcolor="+ gen_color +">");
}

function setLogo(){
var anh_hostname = GetCookie("anh_hostname");
var m_ID = GetCookie("main_id");
var hostcheck = location.hostname.search("www");
	if(anh_hostname == null){
		document.write("<img src='http://open.home.ne.jp/common/images/logo_ch/at.gif' border='0'>");
	} else if(getJFlag() && hostcheck > -1){
		document.write("<a href='http://www.zaq.home.ne.jp/' target='_top'><img src='http://open.home.ne.jp"+getLogoImg()+"' border='0'></a>");
		} else {
		document.write("<a href='http://" + anh_hostname + "/' target='_top'><img src='http://open.home.ne.jp"+getLogoImg()+"' border='0'></a>");
		}
}