﻿<!--

//Search
que = getRequest();
if(que['en']){
	var url_en=que['en'].replace(/%2b|%E3%80%80|%EF%BC%8B/ig,"+");
	
	document.write('Opening. ');
	w_videolink("OPENING+"+url_en);
		document.write("<br>");

	document.write('Ending. ');
	w_videolink("ENDING+"+url_en);
	document.write("<br><br>");
	
	for( i=1 ; i<=400 ;i++){
		zeroplus=Math.floor(Math.log(i)/Math.LN10);
		anime_wa=i;
		document.write(anime_wa+". ");
		w_videolink(anime_wa+"+"+url_en);
		document.write("<br>");
		if(i<10){
			anime_wa="0"+i;
			document.write(anime_wa+". ");
			w_videolink(anime_wa+"+"+url_en);
			document.write("<br>");
		}
		document.write("<br>");
	}
	if(que['en']){var de_en=decodeURIComponent(que['en'].replace(/%2b|%E3%80%80|%EF%BC%8B|\+/ig,"%20"));}
}

window.onload=function(){
	if(get_cook("blogsearch")==1){
		document.getElementById('div_rssmain').style.display='none';
	}else{
		document.getElementById('div_rssmain').style.display='block';
	}
}

function showHideLAYER(layName){
	if (document.getElementById) {
		if (document.getElementById(layName).style.display != 'block') {
			document.getElementById(layName).style.display='block';
		} else {
			document.getElementById(layName).style.display='none';
		}
	} else if(document.all) {
		if (document.all(layName).style.display != 'block') {
			document.all(layName).style.display='block';
		} else {
			document.all(layName).style.display='none';
		}
	}
}

function getRequest(){
	var get = new Object();
	if(location.search){
		var ret = location.search.substr(1).split("&");
		for(var i = 0; i < ret.length; i++) {
			var r = ret[i].split("=");
			get[r[0]] = r[1];
		}
	}else{
		var str=location.pathname.substr(location.pathname.indexOf("v-")+2);
		get['en']=str.substr(0,str.lastIndexOf("."));
	}
	return get;
}

function w_videolink(url_parts){

	document.write('⇒');
	document.write('<a href="http://video.baidu.jp/v?ct=301989888&word='+url_parts+'" target="_blank"><img alt="baidu" src="./img/ba.ico" width=12 height=12 border=1></a> ');
	document.write('<a href="http://video.google.co.jp/videosearch?hl=ja&q='+url_parts+'" target="_blank"><img alt="google" src="./img/go.ico" width=12 height=12 border=1></a> ');
	document.write('<a href="http://movie.teacup.com/search?kw='+url_parts+'" target="_blank"><img alt="teacup" src="./img/te.ico" width=12 height=12 border=1></a> ');
	document.write('<a href="http://www.fooooo.com/search.php?q='+url_parts+'" target="_blank"><img alt="fooooo" src="./img/fo.ico" width=12 height=12 border=1></a> ');

	document.write('⇒');
	document.write('<a href="http://so.tudou.com/isearch/'+url_parts+'" target="_blank"><img alt="tudou" src="./img/tu.ico" width=12 height=12 border=1></a> ');
	document.write('<a href="http://so.56.com/index?charset=utf-8&key='+url_parts+'" target="_blank"><img alt="56.com" src="./img/56.ico" width=12 height=12 border=1></a> ');
	document.write('<a href="http://search.pandora.tv/?sq=JP&query='+url_parts+'" target="_blank"><img alt="Pandora" src="./img/pa.ico" width=12 height=12 border=1></a> ');
	document.write('<a href="http://www.megavideo.com/?c=search&s='+url_parts+'" target="_blank"><img alt="MegaVideo" src="./img/me.ico" width=12 height=12 border=1></a> ');
	document.write('<a href="http://www.veoh.com/search/videos/q/'+url_parts+'" target="_blank"><img alt="Veoh" src="./img/ve.ico" width=12 height=12 border=1></a> ');
	document.write('<a href="http://www.dailymotion.com/relevance/search/'+url_parts+'" target="_blank"><img alt="Dailymotion" src="./img/da.ico" width=12 height=12 border=1></a> ');
	document.write('<a href="http://so.youku.com/search_video/q_'+url_parts+'" target="_blank"><img alt="youku" src="./img/yo_k.ico" width=12 height=12 border=1></a> ');
	document.write('<a href="http://www.youtube.com/results?search_query='+url_parts+'" target="_blank"><img alt="Youtube" src="./img/yo_t.ico" width=12 height=12 border=1></a> ');

}

function get_cook(coknam) {
	coktxt = document.cookie+";";
	stano = coktxt.indexOf(coknam);
	if (stano != -1){
		endno = coktxt.indexOf(";",stano);
		txt0 = unescape(coktxt.substring(stano+coknam.length+1,endno));
	}else{
		txt0 = "";
	}
	return txt0;
}

function sav_cook(coknam,txt0) {
	day0 = new Date();
	day0.setTime(day0.getTime()+60*60*24*1000);
	endday = day0.toGMTString();
	document.cookie = coknam+"="+escape(txt0)+";expires="+endday;
} 

-->