/* awap hilight */
function swaphilight(h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,s1) { 
  document.getElementById(h1).style.display = "none" ;
  document.getElementById(h2).style.display = "none" ;
  document.getElementById(h3).style.display = "none" ;
  document.getElementById(h4).style.display = "none" ;
  document.getElementById(h5).style.display = "none" ;
  document.getElementById(h6).style.display = "none" ;
  document.getElementById(h7).style.display = "none" ;
  document.getElementById(h8).style.display = "none" ;
  document.getElementById(h9).style.display = "none" ;
  document.getElementById(h10).style.display = "none" ;
  document.getElementById(s1).style.display = "block" ;
}

/* open browser image */
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

/* change lang */
chl = new Array(5);
chl[0]=".html",
chl[1]=".htm",
chl[2]=".aspx",
chl[3]=".asp",
chl[4]=".php",
chl[5]=".jsp";
function chlangen() {
	for (i = 0; i <= 5 ; i++) {
		var url=document.URL;
		(found =(document.URL).replace(chl[i],''))!= false;
			if (found) {
			alert(chl[i]);
			newurl =(document.URL).replace(chl[i],'_en'+chl[i]);
			window.location=newurl;
			break;
			}
		}
}
function chlangth() {
		var url=document.URL;
			newurl =(document.URL).replace('_en','');
			window.location=newurl;
}

/* print - th */
function fixprint()
{ 
  var disp_setting="toolbar=yes,location=no,directories=yes,menubar=yes,"; 
      disp_setting+="scrollbars=yes,width=650, height=600, left=100, top=25"; 
  var content_P = document.getElementById("tb_printtitle").innerHTML; 
  var content_H = document.getElementById("tb_heading").innerHTML;
  var content_C= document.getElementById("print_content").innerHTML; 
  
  var docprint=window.open("","",disp_setting); 
   docprint.document.open(); 
   docprint.document.write('<html><head><title>Government Savings Bank</title>'); 
   docprint.document.write('<link href="http://www.gsb.or.th/css/global.css" rel="stylesheet" type="text/css"></head><body onLoad="self.print()">');
   docprint.document.write('<table width="590" border="0" align="center" cellpadding="0" cellspacing="0"><tr><td width="210">');
   docprint.document.write('<img src="http://www.gsb.or.th/engine/print/logo.gif" width="210" height="83"></td><td>');
   docprint.document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td>&nbsp;</td></tr><tr><td align="right" height="25" valign="bottom"  class="pathhead">');
   docprint.document.write(content_P);
   docprint.document.write('</td></tr><tr><td align="right" valign="top" class="pathurl" height="25">');
   docprint.document.write('<script>document.write(document.URL)</script>');
   docprint.document.write('</td></tr></table></td></tr></table>');  
   docprint.document.write('<table width="590" border="0" align="center" cellpadding="0" cellspacing="0"><tr><td>');
   docprint.document.write(content_H);
   docprint.document.write('</td></tr></table><table width="590" border="0" align="center" cellpadding="0" cellspacing="0"><tr><td valign="top">');
   docprint.document.write(content_C);
   docprint.document.write('</td></tr></table>');
   docprint.document.write('<table width="590" border="0" align="center" cellpadding="0" cellspacing="0"><tr><td valign="bottom">');
   docprint.document.write('<img src="http://www.gsb.or.th/engine/print/footer.gif" width="590" height="100" /></td></tr></table>');
   docprint.document.write('</body></html>'); 
   docprint.document.close(); 
   docprint.focus(); 
}