/* open browser image */
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
/* jump menu */
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
/* tab menu */
function resizeup(){
parent.outerFr.rows = "80,*";
parent.innerFr.cols = "200,*";
}
function resizedown(){
parent.outerFr.rows = "80,*";
parent.innerFr.cols = "18,*";
}
function showmenu(){
document.getElementById('tab').style.display = "block";
document.getElementById('menuS').style.display = "block";
document.getElementById('menuSa').style.display = "block";
document.getElementById('menuH').style.display = "none";
document.getElementById('menuHa').style.display = "none";
}
function hidemenu(){
document.getElementById('tab').style.display = "none";
document.getElementById('menuS').style.display = "none";
document.getElementById('menuSa').style.display = "none";
document.getElementById('menuH').style.display = "block";
document.getElementById('menuHa').style.display = "block";
}
//-->


/* cross frame  onchang*/
function crossframeOnchange(id){

str = id.split("#");
url=str[0];
id1=str[1];
id2=str[2];
id3=str[3];

	if(url!=''){
	parent.crumbs.location="cmscrumbs.php?crumb1=" +id1+"&crumb2=" +id2;
	parent.mainFrame.location=url+"?MenuName="+id2+"&MenuID="+id3;
	}
}

/* cross frame  onclick*/
function crossframe(url,id1,id2,id3){
parent.crumbs.location="cmscrumbs.php?crumb1=" +id1+"&crumb2=" +id2;
parent.mainFrame.location=url+"?MenuName="+id2+"&MenuID="+id3;
}

/* 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></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(); 
}