﻿/**
* convert layer from normal to absolute so can fix the x, y position and make it absolute
* insert image on div without scaled
**/
function insertImage(id,src)
{
	if(check==1)
	{
		document.getElementById(id).style.position = 'absolute';
		document.getElementById(id).innerHTML = '<img src="'+src+'" border=1>';
		check = 0;
	}
	else
	{
		document.getElementById(id).innerHTML = '';
		check = 1;
	}
}

/*
* check the string if is number or not
**/
function IsNumeric(sText)

{
   var ValidChars = "0123456789";
   var IsNumber=true;
   var Char;
   
   for (i = 0; i < sText.length && IsNumber == true; i++) 
      { 
	      Char = sText.charAt(i); 
	      if (ValidChars.indexOf(Char) == -1) 
	         {
	        	 IsNumber = false;
	         }
      }
   return IsNumber;
   
 }