// JavaScript Document
function winpopup(urlx,param,twidth,theight)
{
	var strurl= urlx + '?param=' + param;
	var tposx= (screen.width- twidth)/2
	var tposy= (screen.height- theight)/2;

	var newWin1=window.open(strurl,"format","toolbar=no,width="+ twidth+",height="+ theight+ ",directories=no,status=no,scrollbars=yes,resizable=no, menubar=no")
	newWin1.moveTo(tposx,tposy);
	newWin1.focus();
}

function myOpenWindow(urlx,twidth,theight) {
    myWindowHandle = window.open(urlx,'myWindowName',"toolbar=no,width="+ twidth+",height="+ theight+ ",directories=no,status=no,scrollbars=yes,resizable=no, menubar=no");
}

function IsNumeric(sText)
{
   //Kiem tra day co' phai la` 0 < sText <30.000
   
   var ValidChars = "0123456789";
   var IsNumber=true;
   var Char;
   if ((sText.length==0) || (sText.length>5))
   	   	return false;

   for (i = 0; i<sText.length; i++)
   {
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
         return false;
   }
   return true;
}