var index=1;
var IsPPC = navigator.appName.indexOf("Pocket")>0;
var FootSize = 9;
if (IsPPC) FootSize = 8;

document.write("<title>GotChaWare Website</title>");
document.write("<style>");
document.write("BODY			{ MARGIN: 0px; PADDING-BOTTOM: 5px; PADDING-LEFT: 5px; PADDING-RIGHT: 5px; PADDING-TOP: 5px }");
document.write("BODY			{ Color: #FFFFFF; }");
document.write("TH				{ Color: #FFFFFF; }");
document.write("TD				{ Color: #FFFFFF; }");
document.write("A:link				{ Color: #FFFF00; TEXT-DECORATION: none }");
document.write("A:visited		{ Color: #00FFFF; TEXT-DECORATION: none }");
document.write("A:active			{ Color: #FF0000; TEXT-DECORATION: underline }");
document.write("A:hover			{ Color: #FF0000; TEXT-DECORATION: underline }");
document.write(".menu1			{ background:#FFFFFF; Color:#2B7ABA; font-weight:bold }");
document.write(".menu2			{ background:#1BBABA; Color: #FFFFFF; }");
document.write(".menu3			{ background:#1BAABA; Color: #FFFFFF; }");
document.write(".menu4			{ background:#1B9ABA; Color: #FFFFFF; }");
document.write(".menu5			{ background:#1B8ABA; Color: #FFFFFF; }");
document.write(".menu6			{ background:#1B7ABA; Color: #FFFFFF; }");
document.write(".menu7			{ background:#1B6ABA; Color: #FFFFFF; }");
document.write(".menu8			{ background:#1B5ABA; Color: #FFFFFF; }");
document.write(".footer			{ background:#1BBABA; Color: #FFFFFF; font-size:"+FootSize+"px }");
document.write("UL				{ list-style-type: square; }");
document.write("OL,UL			{ margin: 0px 0px 0px 30px; }");
document.write("DD				{ margin: 0px 0px 0px 20px; }");
document.write("DL,DT,form	{ margin: 0px 0px 0px 0px; }");
document.write("</style>");

function PrintImageHeader() { 
if (IsPPC)
	document.write("<center><img src=\"image/GotChaWare2.gif\"></center>");
else
	document.write("<center><img src=\"image/GotChaWare1.gif\"></center>");
}

function PrintCodeTitle() { 
document.write("<center><table cellspacing=0 cellpadding=2><tr>");
document.write("<td class=\"menu1\" align=right>Software&nbsp;name&nbsp;&nbsp;</td>");
document.write("<td class=\"menu1\">Unlock&nbsp;Code</td></tr>"); }

function PrintCode(Serial, Unlock, BgColor) { 
document.write("<tr bgcolor=" + BgColor + "><td align=right>" + Serial + "&nbsp;:</td><td>" + Unlock + "</td></tr>" ); }

function PrintFrom(Device) { 
if (Device==0) Device="";
document.write("กรุณาพิมพ์ Device Code");
document.write("<table border=0 cellpadding=0 cellspacing=0>");
document.write("<tr><td align=\"right\">Device&nbsp;Code</td>");
document.write(" <td><input name=\"Device\" type=\"text\" value=\"" + Device + "\" size=\"10\" maxlength=\"10\"></td></tr>");
document.write("</table><br>");
document.write("<input name=\"submit\" type=\"submit\" value=\"Check Unlock Code\">"); }

function PrintUnlockCode(Device, Serial, Unlock) { 
if (Device==0) Device="";
if (Serial==0) Serial="";
if (Unlock==0) Unlock="";
document.write("กรุณาพิมพ์ Device Code, Serial Code และ Unlock Code");
document.write("<table border=0 cellpadding=0 cellspacing=0>");
document.write("<tr><td align=\"right\">Device&nbsp;</td>");
document.write(" <td><input name=\"device\" type=\"text\" value=\"" + Device + "\" size=\"10\" maxlength=\"10\"></td></tr>");
document.write("<tr><td align=\"right\">Serial&nbsp;</td>");
document.write(" <td><input name=\"serial\" type=\"text\" value=\"" + Serial + "\" size=\"10\" maxlength=\"10\"></td></tr>");
document.write("<tr><td align=\"right\">Unlock&nbsp;</td>");
document.write(" <td><input name=\"unlock\" type=\"text\" value=\"" + Unlock + "\" size=\"10\" maxlength=\"10\"></td></tr>");
document.write("</table><br>");
document.write("<input name=\"submit\" type=\"submit\" value=\"Submit\">"); }

function SetLink(szName, szLink) { 
document.write("<tr><td class=\"menu"+index+"\">&nbsp;&nbsp;<a href=\"" + szLink+ "\">" + szName + "</a></td></tr>");
index++; if (index>7) index=7; }

function WriteMenu1() { 
document.write("<table width=150>");
document.write("<tr><th class=\"menu1\">เมนูหลัก</th></tr>");
 index=2;
 SetLink('เกี่ยวกับโปรแกรม', 'about.html');
 SetLink('การติดตั้งและใช้งาน', 'howto.html');
 SetLink('ชำระค่าลงทะเบียน', 'transfer.html');
 SetLink('ตรวจสอบรหัสการใช้งาน', 'checking.php');
 SetLink('ลงทะเบียน', 'registry.html');
 SetLink('ดาวน์โหลด', 'gcIExplorer100.zip');
 SetLink('ติดต่อสอบถาม', 'mailto:gotchaware@hotmail.com');
document.write("</table>"); }

function WriteMenu2() { 
if (IsPPC) return;
document.write("<table width=150>");
document.write("<tr><th class=\"menu1\">หนังสือพิมพ์ รายวัน</th></tr>");
 index=2;
 SetLink('บ้านเมือง', 'http://banmuang.co.th/');
 SetLink('แนวหน้า', 'http://naewna.com/');
 SetLink('สยามรัฐ', 'http://siamrath.co.th/');
 SetLink('ไทยรัฐ', 'http://thairath.co.th/');
 SetLink('เดลินิวส์', 'http://www.dailynews.co.th/dailynews/pages/front_th/home/');
 SetLink('ไทยโพสต์', 'http://www.thaipost.net/');
 SetLink('ข่าวสด', 'http://www.matichon.co.th/khaosod/');
 SetLink('มติชน', 'http://www.matichon.co.th/matichon/');
 SetLink('มติชนสุดสัปดาห์', 'http://www.matichon.co.th/weekly/');
 SetLink('ประชาชาติธุรกิจ', 'http://www.matichon.co.th/prachachart/');
 SetLink('คม-ชัด-ลึก', 'http://komchadluek.com');
 SetLink('คม-ชัด-ลึก PDA', 'http://komchadluek.com/pda/');
 SetLink('ผู้จัดการ', 'http://www.manager.co.th/lite/');
 SetLink('ผู้จัดการรายสัปดาห์', 'http://www.manager.co.th/mgrweekly/');
 SetLink('ผู้จัดการรายเดือน', 'http://www.gotomanager.com/');
 SetLink('โพสต์ทูเดย์', 'http://www.posttoday.com/');
 SetLink('กรุงเทพธุรกิจ', 'http://bangkokbiznews.com/');
 SetLink('ฐานเศรษฐกิจ', 'http://www.thannews.th.com/');
 SetLink('เส้นทางเศรษฐกิจ', 'http://www.sentangonline.com/');
 SetLink('เนชั่นสุดสัปดาห์', 'http://www.nationweekend.com/');
 SetLink('สยามธุรกิจ', 'http://www.siamturakij.com/');
 SetLink('กระแสหุ้น', 'http://www.stockwave.in.th/');
 SetLink('เทเลคอมเจอร์นัล', 'http://www.tj.co.th/');
 SetLink('เนชั่นแชนแนล', 'http://www.nationchannel.com/');
 SetLink('บิสิเนสไทย', 'http://www.businessthai.in.th/');
 SetLink('บางกอกโพสต์', 'http://www.bangkokpost.com/');
 SetLink('เดอะเนชั่น', 'http://www.nationmultimedia.com');
document.write("</table>"); }

function BankTransfer() { 
document.write("<center>");
document.write("<table cellspacing=0 cellpadding=3 border=0>");
document.write("<tr class=\"menu3\"><td align=right valign=top>ธนาคาร</td>			<td nowrap>กสิกรไทย</td></tr>");
document.write("<tr class=\"menu5\"><td align=right valign=top>บัญชี</td>			<td nowrap>ออมทรัพย์</td></tr>");
document.write("<tr class=\"menu3\"><td align=right valign=top>เลขที่</td>			<td nowrap>721-2-28302-3</td></tr>");
document.write("<tr class=\"menu5\"><td align=right valign=top>ชื่อบัญชีี่</td>		<td nowrap>ATSADANG&nbsp;B</td></tr>");
document.write("<tr class=\"menu3\"><td align=right valign=top>จำนวนเงิน</td>		<td nowrap>555 บาท</td></tr>");
document.write("<tr class=\"menu5\"><td align=right valign=top>โทรศัพท์</td>		<td nowrap>0813750832</td></tr>");
document.write("<tr class=\"menu3\"><td align=right valign=top>รหัสอ้างอิง</td>		<td nowrap>หมายเลข Unlock Code</td></tr>");

document.write("</table>");
document.write("</center>"); }