//------------------------------------------------------------
//        ■Googld AD
//------------------------------------------------------------
function Show_GAdUp(){	/* Googld AD （上部用 : 基本情報、歴史、タイ語ページ等)　*/
	google_ad_client = "pub-7471896074105470";
	google_ad_width = 468;
	google_ad_height = 60;
	google_ad_format = "468x60_as";
	google_ad_type = "text";
	//2007-05-28: EnglishUp
	google_ad_channel = "8527629904";
	google_color_border = "fffaec"; // old feeecf
	google_color_bg = "fffaec"; // old feeecf
	google_color_link = "C40000";
	google_color_text = "663300";
	google_color_url = "C40000";

	document.write("<script type='text/javascript' src='http://pagead2.googlesyndication.com/pagead/show_ads.js'></script>");
}

function Show_GAdDown(){	/* Googld AD (下部用 : 基本情報、歴史、タイ語ページ等） */
	google_ad_client = "pub-7471896074105470";
	google_ad_width = 468;
	google_ad_height = 60;
	google_ad_format = "468x60_as";
	google_ad_type = "text";
	//2007-05-28: EnglishDown
	google_ad_channel = "5451834176";
	google_color_border = "fffaec"; // old feeecf
	google_color_bg = "fffaec"; // old feeecf
	google_color_link = "C40000";
	google_color_text = "663300";
	google_color_url = "C40000";

	document.write("<script type='text/javascript' src='http://pagead2.googlesyndication.com/pagead/show_ads.js'></script>");
}

function show_Gad160600Top(){	/* Googld AD TOPページ右メニュー用 */
	google_ad_client = "pub-7471896074105470";
	google_ad_width = 160;
	google_ad_height = 600;
	google_ad_format = "160x600_as";
	google_ad_type = "text";
	//2007-05-28: EnglishTop
	google_ad_channel = "3850244904";
	google_color_border = "FFFFFF";
	google_color_bg = "FFFFFF";
	google_color_link = "CC0000";
	google_color_text = "660000";
	google_color_url = "660033";

	document.write("<script type='text/javascript' src='http://pagead2.googlesyndication.com/pagead/show_ads.js'></script>");
}

function show_Gad160600(){	/* Googld AD (左メインメニュー：背景 DarkBrown)用 */
	google_ad_client = "pub-7471896074105470";
	google_ad_width = 160;
	google_ad_height = 600;
	google_ad_format = "160x600_as";
	google_ad_type = "text";
	//2007-05-28: EnglishLeft
	google_ad_channel = "4155287164";
	google_color_border = "503020";
	google_color_bg = "503020";
	google_color_link = "efd089";
	google_color_text = "FFCC66";
	google_color_url = "F2984C";

	document.write("<script type='text/javascript' src='http://pagead2.googlesyndication.com/pagead/show_ads.js'></script>");
}

function show_GadTopRight(){	/* Googld AD TOPページ右メニュー用 */
google_ad_client = "pub-7471896074105470";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_type = "text";
//2007-05-28: EnglishTop
google_ad_channel = "3850244904";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "CC0000";
google_color_text = "660000";
google_color_url = "660033";
	document.write("<script type='text/javascript' src='http://pagead2.googlesyndication.com/pagead/show_ads.js'></script>");
}
//------------------------------------------------------------
//        ■カウンター
//------------------------------------------------------------
function cntt() {	// today: Topページ用
	document.write("<img src='http://sv222.lolipop.jp/cnt/accnt.php?cnt_id=1078102&ac_id=LA09136817&mode=today'>");
}

function cnty() {	// yesterday: Topページ用
	document.write("<img src='http://sv222.lolipop.jp/cnt/accnt.php?cnt_id=1078102&ac_id=LA09136817&mode=yesterday'>");
}

function cntttl() {// total: Topページ用
	document.write("<img src='http://sv222.lolipop.jp/cnt/accnt.php?cnt_id=1078102&ac_id=LA09136817&mode=total'>");
}

function cntttl2() { //--- 非表示カウント
	document.write("<img src='http://sv222.lolipop.jp/cnt/accnt.php?cnt_id=1078102&ac_id=LA09136817&mode=total' width='0' height='0'>");
}

//------------------------------------------------------------
//        ■Weather(wonderground.com)（leftMenu）
//------------------------------------------------------------
function Show_weather(){
	document.write("<a href='http://www.wunderground.com/global/stations/48456.html?bannertypeclick=gizmotimetemp24' target='_blank'>");
	document.write("<img src='http://banners.wunderground.com/weathersticker/gizmotimetemp_metric24/language/www/global/stations/48456.gif' border=0 ");
	document.write("alt='Click for Bangkok, Thailand Forecast' height=41 width=127></a>");
}

//------------------------------------------------------------
//        ■著作権 年度表示
//------------------------------------------------------------
function cry() { // copy right year
	document.write("Copyright 2004-2010 <A href='http://www.thaismile.jp/' target='_top'>ThaiSmile.jp</A> All rights reserved.<BR>");
	document.write("No reproduction or republication without written permission.");
}
function cry2() { // copy right year
	document.write("2004-2010");
}

//------------------------------------------------------------
//        ■アクセス集計用
//------------------------------------------------------------
function page(pagename) {
	var pg = pagename;
	var a = "&&";
	var pf = navigator.platform + a; 
	var lng = navigator.language + a;
	var swh = screen.width + "x" + screen.height + a;
	var cd = screen.colorDepth + a; 
	var pd = screen.pixelDepth + a;
	var rf = parent.document.referrer;
	var now = new Date();

	document.write("<img src='http://www.thaismile.jp/cgi/e_access/dsw.cgi?xx=",now.getSeconds(),"&&p=n&&md=j&&");
	document.write("pg="+pg+a+"pf="+pf+"lng="+lng+"swh="+swh+"cd="+cd+"pd="+pd+"rf="+rf);
	document.write("' alt='CGI' border=0>");
}
//------------------------------------------------------------
//        ■フォト表示用
//------------------------------------------------------------
//----------- ■フォトギャラリー（その他花達）用（タイトル表示あり、ワクなし）-------------------
function _HpbJumpURL2(url, str) 
{
	document.write('<HTML>');
	document.write('<HEAD>');
	document.write('<SCRIPT language="JavaScript" src="../ThaiSmileScripts_e2.js"></SCRIPT>'); // J
	document.write('</HEAD>');
	document.write('<BODY bgcolor="#000000" style="font-size : 12px;font-family : Verdana,serif,sans-serif;" >');
	document.write('<CENTER>');

	document.write('<TABLE width="700" height="500"');
	document.write('<TR><TD><CENTER>');
	document.write('<IMG src="'+ url + '"' + ' onClick=history.back()' + ' style="cursor : pointer;">');
	document.write('</CENTER></TD></TR>');
	document.write('</TABLE>');

      if(str != null){
		document.write('<BR><BR><FONT color = "#cccccc" style="font-size : 14px;">' + '< '+str + ' >' + '</FONT><BR>');
	}

	document.write('<HR>');
	document.write('<INPUT type="button" value="&nbsp;back&nbsp;" onClick=history.back() style="cursor : pointer;">');
	document.write('<FONT color = "#cccccc" style="font-size : 12px;">&nbsp; &nbsp; Copyright(C) 2004-2010 ThaiSmile.jp   All rights reserved.</FONT>');
	document.write('<BR><BR><BR>');
	document.write('<SCRIPT LANGUAGE="JavaScript">Show_GAd3()</SCRIPT>');
	document.write('</CENTER>');
	document.write('</BODY>');
	document.write('</html>');

//	page(url);
}
//----------- ■壁紙用（背景黒で、タイトル表示あり）-------------------
function _HpbJumpURL3(url, filename, page) 
{
	document.write('<HTML>');
	document.write('<HEAD>');
	
	if(page=='each'){
		document.write('<SCRIPT language="JavaScript" src="../../ThaiSmileScripts_e2.js"></SCRIPT>');
	}
	else{
		document.write('<SCRIPT language="JavaScript" src="../ThaiSmileScripts_e2.js"></SCRIPT>');
	}
	document.write('</HEAD>');
	
	document.write('<BODY bgcolor="#000000">');
	document.write('<CENTER>');

	document.write('<TABLE width="1024" height="480">');
	document.write('<TR><TD>');
	document.write('<IMG src="'+ url + '"' + ' onClick=history.back()' + ' style="cursor : pointer;">');
	document.write('</TR>');

	document.write('<TR><TD align="center">');
      if(filename != null){
		document.write('<FONT color = "#cccccc" style="font-size : 14px;">' + filename + '</FONT><BR>');
	}
	document.write('</TD></TR>');

	document.write('<TR><TD>');
	document.write('<HR>');
	document.write('</TD></TR>');

	document.write('<TR><TD align="center">');
	document.write('<INPUT type="button" value="&nbsp;back&nbsp;" onClick=history.back() style="cursor : pointer;">');
	document.write('<FONT color = "#cccccc" style="font-size : 12px;">&nbsp; &nbsp; Copyright(C) 2004-2010 ThaiSmile.jp   All rights reserved.</FONT>');
	document.write('</TD></TR>');

	document.write('</TABLE>');
	document.write('<BR><BR>');
	document.write('<SCRIPT LANGUAGE="JavaScript">Show_GAd3()</SCRIPT>');
	document.write('</CENTER>');
	document.write('<BR>');

	document.write('</BODY>');
	document.write('</html>');
}

//----------- ■フォトギャラリー用（タイ王国編）（ワクあり、タイトル表示あり）640x480用-------------------
function _HpbJumpURL(url, str, page) 
{
	document.write('<HTML>');
	document.write('<HEAD>');
	if(page == '1st'){
		document.write('<SCRIPT language="JavaScript" src="ThaiSmileScripts_e2.js"></SCRIPT>');
	}
	else if(page == '2nd'){
		document.write('<SCRIPT language="JavaScript" src="../ThaiSmileScripts_e2.js"></SCRIPT>');
	}
	else{
		document.write('<SCRIPT language="JavaScript" src="../../ThaiSmileScripts_e2.js"></SCRIPT>');
	}
	document.write('</HEAD>');
	
	document.write('<BODY bgcolor="#000000" text="#cccccc" style="font-family : Verdana,serif;">');
	document.write('<CENTER>');

	document.write('<TABLE width="700" height="500" border="1" bgcolor="#ffffff">');
	document.write('<TR><TD><CENTER>');
	document.write('<IMG src="'+ url + '"'+' border="1"'+ ' onClick=history.back()'+' style="cursor : pointer;">');
	document.write('</CENTER></TD></TR>');
	document.write('</TABLE>');

      if(str != null){
		document.write('<TABLE border="0" cellspacing="10"><TBODY><TR><TD style="font-size : 14px;">' + str + '</TD></TR></TBODY></TABLE>');
	}
	document.write('<HR>');
	document.write('<INPUT type="button" value="&nbsp;back&nbsp;" onClick=history.back() style="cursor : pointer;">');
	document.write('<FONT color = "#cccccc" style="font-size : 12px;">&nbsp; &nbsp; Copyright(C) 2004-2010 ThaiSmile.jp   All rights reserved.</FONT>');
	document.write('<BR><BR>');
	document.write('<SCRIPT LANGUAGE="JavaScript">Show_GAd3()</SCRIPT>');
	document.write('</CENTER>');

	document.write('</BODY>');
	document.write('</html>');

//--	page(url);

}

//----------- ■フォトギャラリー用（タイ王国編）2（ワクあり、タイトル表示あり）700x525用-------------------
function _HpbJumpURL700(url, str) 
{
	document.write('<HTML>');
	document.write('<HEAD>');
	document.write('<SCRIPT language="JavaScript" src="../../ThaiSmileScripts_e2.js"></SCRIPT>');
	document.write('</HEAD>');

	document.write('<BODY bgcolor="#000000" text="#cccccc" style="font-family : Verdana,serif;">');
	document.write('<CENTER>');
	document.write('<TABLE width="760" height="545" border="1" bgcolor="#ffffff">');
	document.write('<TR><TD><CENTER>');
	document.write('<IMG src="'+ url + '"'+' border="1"'+ ' onClick=history.back()'+' style="cursor : pointer;">');
	document.write('</CENTER></TD></TR>');
	document.write('</TABLE>');

	if(str != null){
		document.write('<TABLE border="0" cellspacing="10"><TBODY><TR><TD style="font-size : 14px;">' + str + '</TD></TR></TBODY></TABLE>');
	}
	document.write('<HR>');
	document.write('<INPUT type="button" value="&nbsp;back&nbsp;" onClick=history.back() style="cursor : pointer;">');
	document.write('<FONT color = "#cccccc" style="font-size : 12px;">&nbsp; &nbsp; Copyright(C) 2004-2010 ThaiSmile.jp   All rights reserved.</FONT>');
	document.write('<BR><BR>');
	document.write('<SCRIPT LANGUAGE="JavaScript">Show_GAd3()</SCRIPT>');
	document.write('</CENTER>');

	document.write('</BODY>');
	document.write('</html>');
}

//----------- ■フォトギャラリー用（タイ王国編）2（ワクあり、タイトル表示あり）720x480用-------------------
function _HpbJumpURL720(url, str) 
{
	document.write('<HTML>');
	document.write('<HEAD>');
	document.write('<SCRIPT language="JavaScript" src="../../ThaiSmileScripts_e2.js"></SCRIPT>');
	document.write('</HEAD>');

	document.write('<BODY bgcolor="#000000" text="#cccccc">');
	document.write('<CENTER>');
	document.write('<TABLE width="780" height="500" border="1" bgcolor="#ffffff">');
	document.write('<TR><TD><CENTER>');
	document.write('<IMG src="'+ url + '"'+' border="1"'+ ' onClick=history.back()'+' style="cursor : pointer;">');
	document.write('</CENTER></TD></TR>');
	document.write('</TABLE>');

	if(str != null){
		document.write('<TABLE border="0" cellspacing="10"><TBODY><TR><TD style="font-size : 14px;">' + str + '</TD></TR></TBODY></TABLE>');
	}
	document.write('<HR>');
	document.write('<INPUT type="button" value="&nbsp;back&nbsp;" onClick=history.back() style="cursor : pointer;">');
	document.write('<FONT color = "#cccccc" style="font-size : 12px;">&nbsp; &nbsp; Copyright(C) 2004-2010 ThaiSmile.jp   All rights reserved.</FONT>');
	document.write('<BR><BR>');
	document.write('<SCRIPT LANGUAGE="JavaScript">Show_GAd3()</SCRIPT>');
	document.write('</CENTER>');

	document.write('</BODY>');
	document.write('</html>');
}

//----------- ■フリー、ブラック（フォトギャラリーのスペシャル）用（背景黒で、タイトル表示あり）-------------------
function _HpbJumpURL4(url, filename) 
{
	document.write('<HTML>');
	document.write('<HEAD>');
	document.write('<SCRIPT language="JavaScript" src="../../ThaiSmileScripts_e2.js"></SCRIPT>');
	document.write('</HEAD>');

	document.write('<BODY bgcolor="#000000">');
	document.write('<CENTER>');

//	document.write('<TABLE width="1024" height="480">');
	document.write('<TABLE height="480">');
	document.write('<TR><TD align="center">');

	document.write('<IMG src="'+ url + '"' + ' onClick=history.back()' + ' style="cursor : pointer;">');
	document.write('</TR>');

	document.write('<TR><TD align="center">');
      if(filename != null){
		document.write('<br><FONT color = "#cccccc" style="font-size : 14px;">' + filename + '</FONT><BR>');
	}
	document.write('</TD></TR>');

	document.write('<TR><TD>');
	document.write('<HR>');
	document.write('</TD></TR>');

	document.write('<TR><TD align="center">');
	document.write('<INPUT type="button" value="&nbsp;back&nbsp;" onClick=history.back() style="cursor : pointer;">');
	document.write('<FONT color = "#cccccc" style="font-size : 12px;">&nbsp; &nbsp; Copyright(C) 2004-2010 ThaiSmile.jp   All rights reserved.</FONT>');
	document.write('</TD></TR>');

	document.write('</TABLE>');
	document.write('<BR><BR>');
	document.write('<SCRIPT LANGUAGE="JavaScript">Show_GAd3()</SCRIPT>');
	document.write('</CENTER>');
	document.write('<BR>');

	document.write('</BODY>');
	document.write('</html>');
}

//----------- ■画像のrandom読み込み-------------------
  function getImageNum(num) {
	var range = num 
	var number = Math.floor(Math.random()*range) + 1
	return(number)
	}

 function showImage() {
	var num = getImageNum(322) 
	var img_src = "http://www.thaismile.jp/wallpapers/" + "wp"+ num + ".JPG"
	document.write("<IMG border='0' SRC=" + img_src + " width='240' height='180'>")
 } 

function Show_GAd3(){	// 壁紙、個別の写真などの表示時用（背景黒用）
google_ad_client = "pub-7471896074105470";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text";
//2007-05-28: EnglishPhoto
google_ad_channel = "0337139719";
google_color_border = "000000";
google_color_bg = "000000";
google_color_link = "B3B3B3";
google_color_text = "999999";
google_color_url = "999999";
document.write("<script type='text/javascript' src='http://pagead2.googlesyndication.com/pagead/show_ads.js'></script>");
}