//------------------リダイレクト設定--------------

//1:通常リンク(外部遷移)、0:リスト表示
force_redirect = 0;

now_list_get = new Array();
function get_list_ajax(this_eid,this_ch){
	if(force_redirect || redirect_flag[this_eid] || (!redirect_flag[this_eid] && now_list_get[this_eid] == 1)){return true;}//外部遷移
	if(now_list_get[this_eid] == 1){return false;}//無反応
	now_list_get[this_eid] = 1;
	eid = this_eid;
	
	get_this_next_url = $('jumplink_'+this_eid).href;
	split_tmp_url = get_this_next_url.split("&url=");
	split_tmp_url[1] = split_tmp_url[1].replace("http://","");
	split_tmp_url[1] = split_tmp_url[1].replace(/\//g,"-_-");
	split_tmp_url[1] = split_tmp_url[1].replace("?","%3F");
	make_cahce_url = "http://eroog.com/cache/"+split_tmp_url[1];
	location.href = make_cahce_url;
/*
	var base_url = "http://eroog.com/delete.php?mode=get_list&eid="+eid+"&output=html";
	httpObj3 = createXMLHttpRequest(res_get_list_ajax);
	if(httpObj3){
		httpObj3.open("GET",base_url,true);
		httpObj3.send(null);
	}
	try {pageTracker._trackPageview("/counter/no-redirect/ch/"+this_ch);} catch(err) {}
*/
	return false;
}

function res_get_list_ajax(){
	if((httpObj3.readyState == 4) && (httpObj3.status == 200)){
		$("dcinfo_"+eid).innerHTML = httpObj3.responseText;
	}
}

//------------------違反通報設定------------------

function ihan_init(u_vid){

	$("vote").innerHTML = '<select id="ihan_select" style="background-color:black"><option selected value="0">違反理由を選択してください</option><option value="10">無修正サムネイル画像(このページの縮小画像)</option><option value="20">被写体が18歳未満</option><option value="30">タイトルと無関係の動画</option><option value="40">その他権利侵害</option></select><a href="javascript:void(0)" onclick="ihan('+u_vid+')">[決定]</a>';

}

function ihan(u_vid){

	ihan_num = $('ihan_select').value;
	if(ihan_num == "0"){alert("違反理由を選択してください");return false;}
	try {pageTracker._trackPageview("/counter/report/vid/"+u_vid+"/"+ihan_num);} catch(err) {}
	$("vote").innerHTML = '通報にご協力いただきましてありがとうございます。管理者が確認を行います。';
}

//------------------クッキー埋め込み--------------

function cookie_write(){

	//訪問確認クッキー自動埋込
	exp = new Date();
	exp.setTime(exp.getTime()+1000*60*60*24*1);
	document.cookie = "readads=1; domain=eroog.com; expires="+exp.toGMTString();

}

function cookie_read(){

	return ((document.cookie+";").match("readads=([^;]*);")!=null)? unescape(RegExp.$1):null;

}