function Winop(name) { //v3.0
	<!-- iPhoneまたは、Androidの場合はウィンドウ表示しない -->
	if ((navigator.userAgent.indexOf('iPhone') > 0) || (navigator.userAgent.indexOf('iPad') > 0) || (navigator.userAgent.indexOf('iPod') > 0) || navigator.userAgent.indexOf('Android') > 0) {
		location.href = name;
	}else{
		window.open(name,"","location=no,menuber=no,status=no,scrollbars=yes,width=800,height="+(screen.height-100)+",resizable=yes");
	}
}

function DispSpPrice(DB_BD_Urine,DB_Oroshi_Urine,DB_Oroshi_kakeritu,DB_ND_Oroshi_Kosuu,DB_ND_Oroshi_Price,DB_AutoDisUrine) { //v3.0
	if(date1.match(/birthday/i)){
		document.write("<br>誕生日特価：\\" + DB_BD_Urine + "-");
	}else if(date2.match(/oroshi/i)){
		document.write("<br>卸価格：\\" + DB_Oroshi_Urine + "-(" + DB_Oroshi_kakeritu + "+5%)<br>" + DB_ND_Oroshi_Kosuu + DB_ND_Oroshi_Price);
	}else if(DB_AutoDisUrine > 0){
		document.write("<br>特価：\\" + DB_AutoDisUrine + "-");
	}
}

function DispAfiriData(Afiri_Pas) { //v3.0
	if(date3.match(/afiri/i)){
		Site_Name = date3.substr(6);
		Afiri_Addr = "http://www.tirakita.com/sys/afiri/enter.php?ST="+Site_Name+"&JP="+window.location.href;

		document.write("<table width='751' border='1' align='center' cellspacing='0' cellpadding='1' bordercolor='#CB96D8' align='center'><tr><td bgcolor='#CB96D8'><b>アフィリエイト情報</b></td></tr><tr><td>");
		if(Afiri_Pas) {
			document.write("このページの商品の平均アフィリパーセント：" + Afiri_Pas + "％<br>");
		}
		document.write("この商品のアフィリエイトアドレス：<br><br>" + Afiri_Addr + "<br><br>各商品のアフィリエイト金額は個別の商品ページにございます。個別の商品は在庫切れが起こりやすいので極力このページにリンクを貼られることをお勧めいたします<br><br><a href='https://www.tirakita.com/sys/afiri/afiri_make.php'>簡単アフィリページ作成ツール</a>もぜひご利用ください</td></tr></table><br><br>");
	}
}

function DispBirthdayGif() { //v3.0
	if(date1.match(/birthday/i)){
		document.write("<img style='padding-bottom:10px;' src='http://www.tirakita.com/Gif/birthday.gif'>");
	}
}
function DispBirthdayGif_iPod() { //v3.0
	if(date1.match(/birthday/i)){
		document.write("<img style='padding-bottom:10px;' src='http://www.tirakita.com/Gif/birthday.gif' width='640px'>");
	}
}


function getCookie(start){
	thedate=document.cookie+";";
	thedate1=thedate.indexOf(start,0);
	if(thedate1!=-1){
		thedate=thedate.substring(thedate1, thedate.length);
		start=thedate.indexOf("=", 0)+ 1;
		end=thedate.indexOf(";", start);
		return(unescape(thedate.substring(start, end)));
	}
	return("");
}

function SetCookie (name,value,expires) {
document.cookie = name + "=" + escape (value) +
((expires) ? "; expires=" + expires.toGMTString() : "");
}

date1=getCookie("http://www.tirakita.com/cgi-bin/pricechg/birthday.cgi");
date2=getCookie("http://www.tirakita.com/cgi-bin/pricechg/oroshi.cgi");
date3=getCookie("http://www.tirakita.com/cgi-bin/pricechg/afiri_users.cgi");

<!--　　スパム回避   -->

function SpamDisp() {
var emailarray1022= new Array(110,97,110,100,101,109,111,95,111,107,111,116,97,101,64,116,105,114,97,107,105,116,97,46,99,111,109)
var postemail1022=''
for (i=0;i<emailarray1022.length;i++)
postemail1022+=String.fromCharCode(emailarray1022[i])

document.write('<a href="mailto:'+postemail1022+'?subject=%82%A8%96%E2%82%A2%8D%87%82%ED%82%B9"')

}

function Mail_Addr_Disp() {
var emailarray1022= new Array(110,97,110,100,101,109,111,95,111,107,111,116,97,101,64,116,105,114,97,107,105,116,97,46,99,111,109)
var postemail1022=''
for (i=0;i<emailarray1022.length;i++)
postemail1022+=String.fromCharCode(emailarray1022[i])
document.write(postemail1022)

}
	
/*-------------------------------------------------
		検索窓-オートコンプリート
-------------------------------------------------*/

jQuery(document.body).ready(function($){
  $('#kensaku_text').ajaxSuggest('http://www.tirakita.com/sys/HP_Make/autocomplete_ajax.php',{limit:15,width_add:60});
});

/*-------------------------------------------------
		Twitterで読み込み遅延が起きないようにする
		indexのみ
-------------------------------------------------*/
$(document).ready(function(){
		if(($(location).attr('href') == "http://www.tirakita.com/") ||
			 ($(location).attr('href') == "http://tirakita.com/") ||
			 ($(location).attr('href') == "http://www.tirakita.com/index.shtml") ||
			 ($(location).attr('href') == "http://tirakita.com/index.shtml") ||
			 ($(location).attr('href') == "http://localhost/tirakita/") ||
			 ($(location).attr('href') == "tirakita.com")){
	    var script_tag     = document.createElement("script");
	    script_tag.type    = "text/javascript";
	    script_tag.src     = "http://twitter.com/javascripts/blogger.js";
	    script_tag.charset = "utf-8";
	    $("body").append(script_tag);

	    var script_tag     = document.createElement("script");
	    script_tag.type    = "text/javascript";
	    script_tag.src     = "http://twitter.com/statuses/user_timeline/tirakita_com.json?callback=twitterCallback2&count=5";
	    script_tag.charset = "utf-8";
	    $("body").append(script_tag);
	}
})


