// This script and many more are available free online at -->
// The JavaScript Source!! http://javascript.internet.com -->
// Original:  Russ (NewXS3@aol.com) -->
// Web Site:  http://dblast.cjb.net -->

function copyit(theField) {

var tempval=eval("document."+theField)

tempval.focus()

tempval.select()

therange=tempval.createTextRange()

therange.execCommand("Copy")

}


function Hideme(item) {

   obj=document.getElementById(item);

   visible=(obj.style.display!="none")  

   //if (visible) {

     obj.style.display="none";

   //} else {

   //   obj.style.display="block";

   //}

}



function Showme(item) {

Hideme('normal');

Hideme('shift');

Hideme('cap');

//Hideme('a4');



   obj=document.getElementById(item);

   visible=(obj.style.display!="none")  

   //if (visible) {

    //  obj.style.display="none";

   //} else {

     obj.style.display="block";

   //}

}




    function addChar(character){
	
	input = document.ThaiAdd.display;	

	if(input.value == null || input.value == "0")

		input.value = character

	else

	   input.value+= character

	   }



	   function delChar(){
	   
		input = document.ThaiAdd.display;	
	   
	   input.value = input.value.substring(0, input.value.length - 1) 

	   }





    function SaddChar(character){

	input = document.ThaiAdd.display;	
	
	if(input.value == null || input.value == "0")

		input.value = character

	else

	   //MM_showHideLayers('shift','','hide')

	   Showme('normal');

	   input.value+= character

	   }



    function CaddChar(character){

	input = document.ThaiAdd.display;
	
	if(input.value == null || input.value == "0")

		input.value = character

	else

	   input.value+= character

	   }





	   function shiftt(){

		//javascript:MM_showHideLayers('shift','','show')

		//Showme('normal');



		}

	   
		// ส่งคำค้นหาไปที่ช่อง search
	   function SearchGoogle(){
		document.googlebox.q.value = document.ThaiAdd.display.value;
	   
	   }

