siteno='';
design='';
kaerebaq='';
dekounyu='';
appid='';
imgsize='';
kadomaru='';
en='';
//tolink='';
nofollow='';
function kaerebasearch(){
kaerebaq=document.getElementById('kaerebaq').value.replace('/', ' ').replace('?', ' ');
if(kaerebaq){
document.location='https://pochireba.com/search/q_'+kaerebaq+'/s_'+document.getElementById('searchkind').value+'/';
}
}
function kaerebasearch1(){
appid0=document.getElementById('kaerebaq1').value;
if(document.getElementById('appid').value){
document.getElementById('appid').value=appid0;
}
hyouji(appid0);
}
function hyouji(appid){
if(appid==''){
appid=document.getElementById('appid').value;
}
if (appid.match(/^[0-9]+$/i) || appid=='') {
siteno=document.getElementById('siteno').value;
design=document.getElementById('design').value;
imgsize=document.getElementById('imgsize').value;
en=document.getElementById('en').value;
kadomaru=document.getElementById('kadomaru').value;
//tolink=document.getElementById('tolink').value;
nofollow=document.getElementById('nofollow').value;
document.cookie = 'iphoneapplinkmaker2=appid,'+appid+'::siteno,'+siteno+'::design,'+design+'::en,'+en+'::imgsize,'+imgsize+'::kadomaru,'+kadomaru+'::nofollow,'+nofollow+'; expires=Tue, '+date(60*60*24*365*20)+';';
url='https://pochireba.com/makelinkcode.php?type=jsonp&appid='+appid+'&siteno='+siteno+'&design='+design+'&en='+en+'&imgsize='+imgsize+'&kadomaru='+kadomaru+'&nofollow='+nofollow;
jsondata=new JSONscriptRequest(url);
jsondata.buildScriptTag();
jsondata.addScriptTag();
document.getElementById('mihon').innerHTML='

';
document.getElementById('linkcode').innerHTML='
';
}else if(appid){
document.location='https://pochireba.com/search/q_'+appid+'/s_'+document.getElementById('searchkind').value+'/';
}
}
function makelinkcode(data) {
document.getElementById('mihon').innerHTML='';
document.getElementById('linkcode').innerHTML='';
document.getElementById('textafilinkcode').innerHTML='';
document.getElementById('imgafilinkcode').innerHTML='';
document.getElementById('mihon').innerHTML+=data.value1;
document.getElementById('linkcode').innerHTML+=data.value2;
document.getElementById('textafilinkcode').innerHTML+=data.value3;
document.getElementById('imgafilinkcode').innerHTML+=data.value4;
document.getElementById('kaerebaq1').value='';
jsondata.removeScriptTag();
}
function nextsearch(q,nth,start,searchKind){
nth0=nth;
url='https://pochireba.com/searchcore.php?type=jsonp&q='+q+'&nth='+nth0+'&start='+start+'&searchKind='+searchKind;
jsondata=new JSONscriptRequest(url);
jsondata.buildScriptTag();
jsondata.addScriptTag();
document.getElementById('list'+nth0).innerHTML+='
';
}
function nextsearchlist(data) {
document.getElementById('list'+nth0).innerHTML='';
rd=data.value;
document.getElementById('list'+nth0).innerHTML+=rd;
jsondata.removeScriptTag();
}
function JSONscriptRequest(fullUrl) {
this.fullUrl=fullUrl;
this.noCacheIE='&noCacheIE='+(new Date()).getTime();
this.headLoc=document.getElementsByTagName("head").item(0);
this.scriptId='JscriptId'+JSONscriptRequest.scriptCounter++;
};
function date(sec){
var xDay = new Date;
xDay.setTime(xDay.getTime()+sec*1000);
xDay = xDay.toGMTString();
return xDay;
}
JSONscriptRequest.scriptCounter=1;
JSONscriptRequest.prototype.buildScriptTag=function () {
this.scriptObj=document.createElement("script");
this.scriptObj.setAttribute("type", "text/javascript");
this.scriptObj.setAttribute("charset", "utf-8");
this.scriptObj.setAttribute("src", this.fullUrl+this.noCacheIE);
this.scriptObj.setAttribute("id", this.scriptId);
};
JSONscriptRequest.prototype.removeScriptTag=function () {
this.headLoc.removeChild(this.scriptObj);
};
JSONscriptRequest.prototype.addScriptTag=function () {
this.headLoc.appendChild(this.scriptObj);
};